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.
The protocol to use for the swap/order.
V2, V3, V4, UNISWAPX, UNISWAPX_V2, UNISWAPX_V3 The amount of liquidity in the pool at a given tick. For more information see the Uniswap V3 Whitepaper.
The current tick of the pool. For more information see the Uniswap V3 Whitepaper.
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.
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.
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.
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.
TOKEN_0, TOKEN_1 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.
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.
The unix timestamp at which the order will be reverted if not filled.
The signed permit.
the permit2 message object for the customer to sign to permit spending by the permit2 contract.
Create LP Position successful.
A unique ID for the request.
The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.
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.
The amount of liquidity in the pool at a given tick. For more information see the Uniswap V3 Whitepaper.
The current tick of the pool. For more information see the Uniswap V3 Whitepaper.
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.