Create pool and position calldata

This request allows the caller to create a position in a pool or, if the pool does not yet exist, to create a new pool. If a new pool must be created, a transaction is returned for the pool creation. In either case, a transaction is returned to create the new position in the pool. If the parameter simulateTransaction is set to true, then the response will include the gas fee for the creation transaction(s).

Different fields are required depending on the pool version (V2, V3, or V4) into which a new position will be created, in addition to the fields which are always required. When creating a position in a V2 pool, the position object must contain token0 and token1 addresses. When creating a position in a V3 pool, the position object must contain all fields except for hooks which are not supported in V3 pools. When creating a position in a V4 pool, all fields within the position object are required except for hooks which is optional. Note that both V3 and V4 pools require the population of tickLower and tickUpper fields. Furthermore, poolLiquidity, currentTick, and sqrtRatioX96 are always required when creating a position in a V3 or V4 pool. All pool versions require the population of amount0 and amount1, which specify the quantity of tokens being entered into the pool.

When creating a pool, additional fields are required depending on the pool version being created, in addition to the fields which are always required. When creating a V3 or V4 pool, either initialPrice or poolLiquidity, currentTick, and sqrtRatioX96 are required. When creating a V2 pool, only initialPrice is required. V3 and V4 pools require amount0 and amount1 fields to be populated, as the creation of the pool must include seeding of liquidity. V2 pools may optionally have amount0 and amount1 populated; V2 pools do not require liquidity to be seeded when creating the pool.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum

The protocol to use for the swap/order.

Allowed:
position
object
string
number
enum

The unique ID of the blockchain. For a list of supported chains see the FAQ.

string
string

The amount of liquidity in the pool at a given tick. For more information see the Uniswap V3 Whitepaper.

number

The current tick of the pool. For more information see the Uniswap V3 Whitepaper.

string

The square root of the ratio of the token0 and token1 in the pool, as a Q64.64 number. For more information see the Uniswap V3 Whitepaper.

string

The quantity of tokens denominated in the token's base units. (For example, for an ERC20 token one token is 1x10^18 base units. For one USDC token one token is 1x10^6 base units.) This value must be greater than 0.

string

The quantity of tokens denominated in the token's base units. (For example, for an ERC20 token one token is 1x10^18 base units. For one USDC token one token is 1x10^6 base units.) This value must be greater than 0.

string

The quantity of tokens denominated in the token's base units. (For example, for an ERC20 token one token is 1x10^18 base units. For one USDC token one token is 1x10^6 base units.) This value must be greater than 0.

string
enum
Allowed:
string

The quantity of tokens denominated in the token's base units. (For example, for an ERC20 token one token is 1x10^18 base units. For one USDC token one token is 1x10^6 base units.) This value must be greater than 0.

string

The quantity of tokens denominated in the token's base units. (For example, for an ERC20 token one token is 1x10^18 base units. For one USDC token one token is 1x10^6 base units.) This value must be greater than 0.

number
number

The unix timestamp at which the order will be reverted if not filled.

string

The signed permit.

batchPermitData
object

the permit2 message object for the customer to sign to permit spending by the permit2 contract.

boolean
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json