Skip to main content
POST
/
lp
/
check_approval
Check LP token approvals
curl --request POST \
  --url https://liquidity.api.uniswap.org/lp/check_approval \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "walletAddress": "0x...",
  "protocol": "V2",
  "chainId": 1,
  "lpTokens": [
    {
      "tokenAddress": "0x455e53cbb86018ac2b8092fdcd39d8444affc3f6",
      "amount": "1000000000000000000"
    },
    {
      "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "amount": "100650"
    }
  ],
  "action": "CREATE"
}
'
{
  "requestId": "<string>",
  "transactions": [
    {
      "transaction": {
        "to": "<string>",
        "from": "<string>",
        "data": "<string>",
        "value": "<string>",
        "chainId": 1,
        "gasLimit": "<string>",
        "maxFeePerGas": "<string>",
        "maxPriorityFeePerGas": "<string>",
        "gasPrice": "<string>"
      },
      "cancelApproval": true,
      "action": "CREATE",
      "gasFee": "<string>"
    }
  ],
  "v4BatchPermitData": {
    "domain": {},
    "values": {},
    "types": {}
  },
  "v3NftPermitData": {
    "domain": {},
    "values": {},
    "types": {}
  }
}
Checks whether the specified wallet has the necessary token approvals to perform a liquidity provisioning action (create, increase, decrease, or migrate) on a given protocol (V2, V3, or V4). If approvals are missing, returns fully-formed approval transactions for the caller to sign. For V4 positions, this endpoint can also return permit batch data for gasless approvals via EIP-2612 signatures, and for V3 it can return NFT permit data for the NonfungiblePositionManager.

Key Parameters

  • protocol — The Uniswap protocol version (V2, V3, or V4)
  • chain_id — The blockchain network
  • lp_tokens — The tokens involved in the LP action, with their addresses and amounts
  • action — The LP action being performed: CREATE, INCREASE, DECREASE, or MIGRATE
  • generate_permit_as_transaction — If true, returns permit signatures as executable transactions instead of typed data

Response

Returns a list of ApprovalTransactionRequest objects, each containing a fully-formed transaction to sign. If all approvals are already in place, the list will be empty.

Example Request

curl --location 'https://api.uniswap.org/lp/check_approval' \
--header 'Content-Type: application/json' \
--header 'x-api-key: XXXXX' \
--data '{
    "walletAddress": "XXXX",
    "protocol": "V2",
    "chainId": 1,
    "lpTokens": [
        {
            "tokenAddress": "0x455e53cbb86018ac2b8092fdcd39d8444affc3f6",
            "amount": "1000000000000000000"
        },
        {
            "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "amount": "100650"
        }
    ],
    "action": "CREATE"
}'

Authorizations

x-api-key
string
header
required

Body

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

The protocol to use for the swap/order.

Available options:
V2,
V3,
V4,
UNISWAPX,
UNISWAPX_V2,
UNISWAPX_V3
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
lpTokens
object[]
required

The tokens requiring approval, each with address and amount.

action
enum<string>
required

The LP operation that the approval is needed for.

Available options:
CREATE,
INCREASE,
DECREASE,
MIGRATE
includeGasInfo
boolean

If true, the response will include gas fee estimates for each approval transaction.

simulateTransaction
boolean

If true, approval transactions will be simulated to verify they succeed.

generatePermitAsTransaction
boolean

If true, permits are returned as on-chain transactions rather than off-chain signatures.

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
v3NftTokenId
integer

The V3 NFT position token ID. Required when approving a V3 position for migration.

Response

LP approval check successful.

requestId
string
required

A unique ID for the request.

transactions
object[]

The approval transactions needed. Empty if all approvals are already in place.

v4BatchPermitData
object

Batch permit data for V4 positions, if applicable.

v3NftPermitData
object

NFT permit data for V3 positions, if applicable.