Skip to main content
POST
/
lp
/
create
Create a V3 or V4 LP position
curl --request POST \
  --url https://liquidity.api.uniswap.org/lp/create \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "walletAddress": "0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421",
  "existingPool": {
    "token0Address": "0x0000000000000000000000000000000000000000",
    "token1Address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "poolReference": "0x96d4b53a38337a5733179751781178a2613306063c511b78cd02684739288c0a"
  },
  "chainId": 8453,
  "protocol": "V4",
  "independentToken": {
    "tokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "amount": "3000000"
  },
  "dependentToken": {
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amount": "952630553245231"
  },
  "tickBounds": {
    "tickLower": -198950,
    "tickUpper": -198200
  },
  "simulateTransaction": false,
  "nativeTokenBalance": "19345734941139696"
}
'
{
  "requestId": "3e7960b1-496d-4810-b071-a989fc6c82c3",
  "token0": {
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amount": "953604746993169"
  },
  "token1": {
    "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "3000000"
  },
  "adjustedMinPrice": "0.000000002291623505250648965031523285",
  "adjustedMaxPrice": "0.000000002470095393846743765417492756",
  "tickLower": -198950,
  "tickUpper": -198200,
  "create": {
    "to": "0x7C5f5A4bBd8fD63184577525326123B519429bDc",
    "from": "0xC9bebBA9f481b12cE6f3EA54c4B182c9636ec421",
    "data": "0xdd46508f00...",
    "value": "0x0370d2117653fe",
    "chainId": 8453
  }
}

Documentation Index

Fetch the complete documentation index at: https://api-docs.uniswap.org/llms.txt

Use this file to discover all available pages before exploring further.

Creates a new liquidity position on Uniswap V3 or V4. This endpoint handles both creating a position in an existing pool and creating a new pool with an initial position. Supports any price range, including full-range positions. The caller specifies a price range (or tick range) and the amount of one token to deposit. The server computes the corresponding amount of the other token based on the current pool state and returns a fully-formed transaction to sign. For V2 positions, use the /lp/create_classic endpoint.

Pool Specification

Provide one of:
  • existing_pool — For an existing pool: includes token_0_address, token_1_address, and the pool_reference (pool address for V3, pool ID for V4). The server fetches current pool state (liquidity, tick, sqrtRatio) to compute the dependent token amount.
  • new_pool — For creating a new pool: includes token addresses, fee, tick_spacing, optional hooks (V4 only), and initial_price (as sqrtRatioX96 string). The server uses the initial price to compute the dependent amount.

Price Range

Provide one of:
  • price_bounds — Decimal price strings (min_price, max_price). The server converts these to ticks, snaps to valid tick spacing boundaries, and returns the adjusted prices in the response. These are the human readable price bounds for the position not the decimal normalized price.
  • tick_bounds — Raw tick values (tick_lower, tick_upper). Skips price-to-tick conversion. The server computes the corresponding prices for the response.

Key Parameters

  • independent_token — The token and amount the user wants to deposit
  • protocolV3 or V4
  • slippage_tolerance — Optional slippage tolerance as a decimal (e.g., 0.5 for 0.5%)
  • native_token_balance — For V4 native token pools, the user’s native token balance (used for slippage fitting)
  • batch_permit_data / signature — For V4 permit-based approvals

Response

Returns the computed token amounts (token_0, token_1), the snapped tick range (tick_lower, tick_upper), adjusted price bounds, and a fully-formed create transaction to sign. If simulate_transaction is true, also includes gas fee estimates.

Example Request

curl --location 'https://api.uniswap.org/lp/create' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XXXXX' \
--data '{
    "walletAddress": "XXXX",
    "existingPool": {
        "token0Address": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
        "token1Address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
        "poolReference": "0x3470447f3cecffac709d3e783a307790b0208d60"
    },
    "chainId": 1,
    "protocol": "V3",
    "independentToken": {
        "tokenAddress": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984",
        "amount": "198251669183062942"
    },
    "priceBounds": {
        "minPrice": "0.000000000003248988534520805528430529",
        "maxPrice": "0.000000000003936665827581813550758959"
    },
    "simulateTransaction": false
}'

Authorizations

x-api-key
string
header
required

Body

application/json
walletAddress
string
required
Pattern: ^(0x)?[0-9a-fA-F]{40}$
chainId
enum<number>
default:1
required

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

Available options:
1,
10,
56,
130,
137,
143,
196,
324,
480,
1868,
4217,
8453,
10143,
42161,
42220,
43114,
59144,
81457,
7777777,
1301,
84532,
11155111
protocol
enum<string>
required

The protocol to use for the swap/order.

Available options:
V2,
V3,
V4,
UNISWAPX,
UNISWAPX_V2,
UNISWAPX_V3
independentToken
object
required

The token whose amount you are specifying.

existingPool
object

Parameters for an existing pool. Provide either existingPool or newPool, not both.

newPool
object

Parameters for creating a new pool. Provide either existingPool or newPool, not both.

dependentToken
object

The other token. The server computes the required amount. If provided, the amount is used as a maximum.

priceBounds
object

Price bounds for the position range. Provide either priceBounds or tickBounds, not both.

tickBounds
object

Tick bounds for the position range. Provide either priceBounds or tickBounds, not both.

slippageTolerance
number

Slippage tolerance as a decimal (e.g., 0.5 for 0.5%).

deadline
integer

Unix timestamp after which the transaction will revert.

simulateTransaction
boolean

If true, the response will include the gas fee.

urgency
enum<string>

The urgency level for gas price estimation. Higher urgency results in higher gas price and faster transaction inclusion. Defaults to URGENT if not provided.

Available options:
NORMAL,
FAST,
URGENT
batchPermitData
object

Batch permit data for V4 positions.

signature
string

The signed permit.

nativeTokenBalance
string

The wallet's native token balance, used for wrapping calculations when one of the tokens is the native token.

Response

Create V3/V4 position successful.

requestId
string
required

A unique ID for the request.

token0
object
required

A token with its address and amount, used in LP operations.

token1
object
required

A token with its address and amount, used in LP operations.

adjustedMinPrice
string
required

The actual minimum price after tick adjustment.

adjustedMaxPrice
string
required

The actual maximum price after tick adjustment.

tickLower
integer
required

The adjusted lower tick.

tickUpper
integer
required

The adjusted upper tick.

create
object
required
gasFee
string

The total estimated gas cost of this transaction (eg. gasLimit multiplied by maxFeePerGas) in the base unit of the chain.