Skip to main content
POST
/
lp
/
decrease
Decrease an LP position
curl --request POST \
  --url https://liquidity.api.uniswap.org/lp/decrease \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "walletAddress": "0x...",
  "chainId": 130,
  "protocol": "V4",
  "token0Address": "0x0000000000000000000000000000000000000000",
  "token1Address": "0x078D782b760474a361dDA0AF3839290b0EF57AD6",
  "nftTokenId": "1833079",
  "liquidityPercentageToDecrease": 25,
  "simulateTransaction": false
}
'
{
  "requestId": "<string>",
  "token0": {
    "tokenAddress": "<string>",
    "amount": "<string>"
  },
  "token1": {
    "tokenAddress": "<string>",
    "amount": "<string>"
  },
  "decrease": {
    "to": "<string>",
    "from": "<string>",
    "data": "<string>",
    "value": "<string>",
    "chainId": 1,
    "gasLimit": "<string>",
    "maxFeePerGas": "<string>",
    "maxPriorityFeePerGas": "<string>",
    "gasPrice": "<string>"
  },
  "gasFee": "<string>"
}
Removes liquidity from an existing Uniswap V2, V3, or V4 position. The caller specifies a percentage of their position to withdraw (1–100%), and the server computes the token amounts to be returned and generates the withdrawal transaction.

Key Parameters

  • protocol — The Uniswap protocol version (V2, V3, or V4)
  • chain_id — The blockchain network
  • token_0_address / token_1_address — The token pair addresses
  • nft_token_id — Required for V3 and V4 positions. The NFT token ID identifying the position.
  • liquidity_percentage_to_decrease — Integer from 1 to 100 representing the percentage of the position to withdraw
  • withdraw_as_weth — For V3 positions with native ETH: if false, unwraps WETH to native ETH in the withdrawal. Not applicable to V4.
  • slippage_tolerance — Optional slippage tolerance as a decimal

How It Works

  1. For V2: fetches pair reserves and user’s LP token balance to compute proportional withdrawal amounts
  2. For V3: fetches position data (ticks, liquidity, fees) and pool state on-chain. Uncollected fees are included in the withdrawal via the SDK’s removeCallParameters.
  3. For V4: fetches position data from the V4 PositionManager and generates the decrease calldata

Response

Returns the token amounts being withdrawn (token_0, token_1), and a fully-formed decrease transaction to sign. If simulate_transaction is true, also includes gas fee estimates.

Example Request

curl --location 'https://api.uniswap.org/lp/decrease' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XXXXX' \
--data '{
    "walletAddress": "XXXX",
    "chainId": 130,
    "protocol": "V4",
    "token0Address": "0x0000000000000000000000000000000000000000",
    "token1Address": "0x078D782b760474a361dDA0AF3839290b0EF57AD6",
    "nftTokenId": "1833079",
    "liquidityPercentageToDecrease": 25,
    "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
token0Address
string
required
Pattern: ^(0x)?[0-9a-fA-F]{40}$
token1Address
string
required
Pattern: ^(0x)?[0-9a-fA-F]{40}$
liquidityPercentageToDecrease
integer
required

The percentage of liquidity to remove (1-100).

nftTokenId
string

The NFT token ID for V3/V4 positions. Not required for V2.

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.

withdrawAsWeth
boolean

If true, native tokens will be withdrawn as WETH instead of unwrapping to ETH.

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

Response

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

decrease
object
required
gasFee
string

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