Skip to main content
POST
/
lp
/
create_classic
Create a classic (V2) LP position
curl --request POST \
  --url https://trade-api.gateway.uniswap.org/v1/lp/create_classic \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "walletAddress": "0x...",
  "poolParameters": {
    "token0Address": "0xc02fe7317d4eb8753a02c35fe019786854a92001",
    "token1Address": "0x0000000000000000000000000000000000000000",
    "chainId": 130
  },
  "independentToken": {
    "tokenAddress": "0xc02fe7317d4eb8753a02c35fe019786854a92001",
    "amount": "1000000000000000"
  },
  "dependentToken": {
    "tokenAddress": "0x0000000000000000000000000000000000000000",
    "amount": "1227700073369630"
  },
  "simulateTransaction": false
}
'
{
  "requestId": "<string>",
  "independentToken": {
    "tokenAddress": "<string>",
    "amount": "<string>"
  },
  "dependentToken": {
    "tokenAddress": "<string>",
    "amount": "<string>"
  },
  "create": {
    "to": "<string>",
    "from": "<string>",
    "data": "<string>",
    "value": "<string>",
    "chainId": 1,
    "gasLimit": "<string>",
    "maxFeePerGas": "<string>",
    "maxPriorityFeePerGas": "<string>",
    "gasPrice": "<string>"
  },
  "gasFee": "<string>"
}
Creates a liquidity position on a Uniswap V2 pair. V2 positions always provide liquidity across the entire price range (0 to infinity). This endpoint is exclusively for Uniswap V2. For V3 and V4 positions, use the /lp/create endpoint.

Key Parameters

  • wallet_address — The wallet creating the position
  • pool_parameters — The V2 pool parameters: token_0_address, token_1_address, and chain_id
  • independent_token — The token address and amount the user wants to deposit
  • dependent_token — Optional. If provided, used as the second token amount. If omitted, the server computes the optimal amount based on current pool reserves.
  • slippage_tolerance — Optional slippage tolerance as a decimal (e.g., 0.5 for 0.5%)

How It Works

  1. Looks up the V2 pair contract from the token addresses
  2. If the pair exists, fetches current reserves to compute the dependent token amount
  3. Generates the addLiquidity (or addLiquidityETH for native ETH pairs) calldata for the V2 Router

Response

Returns both token amounts (independent_token, dependent_token) 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_classic' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XXXXX' \
--data '{
    "walletAddress": "XXXX",
    "poolParameters": {
        "token0Address": "0xc02fe7317d4eb8753a02c35fe019786854a92001",
        "token1Address": "0x0000000000000000000000000000000000000000",
        "chainId": 130
    },
    "independentToken": {
        "tokenAddress": "0xc02fe7317d4eb8753a02c35fe019786854a92001",
        "amount": "1000000000000000"
    },
    "dependentToken": {
        "tokenAddress": "0x0000000000000000000000000000000000000000",
        "amount": "1227700073369630"
    },
    "simulateTransaction": false
}'

Authorizations

x-api-key
string
header
required

Body

application/json

Request to create a full-range V2 liquidity position.

walletAddress
string
required
Pattern: ^(0x)?[0-9a-fA-F]{40}$
poolParameters
object
required

Parameters identifying a V2 pool.

independentToken
object
required

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

dependentToken
object

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

slippageTolerance
number

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

deadline
integer

Transaction deadline in seconds.

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
includeApprovalSimulation
boolean

If true, the response will include approval simulation data.

Response

Create classic (V2) position successful.

requestId
string
required

A unique ID for the request.

independentToken
object
required

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

dependentToken
object
required

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

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.