Skip to main content
POST
/
lp
/
decrease
Decrease LP position calldata
curl --request POST \
  --url https://trade-api.gateway.uniswap.org/v1/lp/decrease \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "protocol": "V2",
  "tokenId": 123,
  "position": {
    "pool": {
      "token0": "<string>",
      "token1": "<string>",
      "fee": 123,
      "tickSpacing": 123,
      "hooks": "<string>"
    },
    "tickLower": 123,
    "tickUpper": 123
  },
  "walletAddress": "<string>",
  "chainId": 1,
  "liquidityPercentageToDecrease": 123,
  "liquidity0": "<string>",
  "liquidity1": "<string>",
  "slippageTolerance": 123,
  "poolLiquidity": "<string>",
  "currentTick": 123,
  "sqrtRatioX96": "<string>",
  "positionLiquidity": "<string>",
  "expectedTokenOwed0RawAmount": "<string>",
  "expectedTokenOwed1RawAmount": "<string>",
  "collectAsWETH": true,
  "deadline": 123,
  "simulateTransaction": true
}'
{
  "requestId": "<string>",
  "decrease": {
    "to": "<string>",
    "from": "<string>",
    "data": "<string>",
    "value": "<string>",
    "gasLimit": "<string>",
    "chainId": 1,
    "maxFeePerGas": "<string>",
    "maxPriorityFeePerGas": "<string>",
    "gasPrice": "<string>"
  },
  "gasFee": "<string>",
  "poolLiquidity": "<string>",
  "currentTick": 123,
  "sqrtRatioX96": "<string>"
}

Authorizations

x-api-key
string
header
required

Body

application/json
protocol
enum<string>

The protocol to use for the swap/order.

Available options:
V2,
V3,
V4,
UNISWAPX_V2,
UNISWAPX_V3
tokenId
number
position
object
walletAddress
string
chainId
enum<number>

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

Available options:
1,
10,
56,
130,
137,
324,
480,
1868,
8453,
10143,
42161,
42220,
43114,
81457,
7777777,
1301,
84532,
11155111
liquidityPercentageToDecrease
number
liquidity0
string
liquidity1
string
slippageTolerance
number
poolLiquidity
string

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

currentTick
number

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

sqrtRatioX96
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.

positionLiquidity
string
expectedTokenOwed0RawAmount
string
expectedTokenOwed1RawAmount
string
collectAsWETH
boolean
deadline
number

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

simulateTransaction
boolean

Response

Decrease LP Position successful.

requestId
string

A unique ID for the request.

decrease
object
gasFee
string

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

poolLiquidity
string

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

currentTick
number

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

sqrtRatioX96
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.

I