Check if tokens and permits need to be approved to add liquidity

Checks if the wallet address has the required approvals. If the wallet address does not have the required approval, then the response will include the transactions to approve the tokens. If the wallet address has the required approval, then the response will be empty for the corresponding tokens. If the parameter simulateTransaction is set to true, then the response will include the gas fees for the approval transactions.

Note that approval is required for both creating and removing positions in V2 pools. Approval is only required for creating positions in V3 and V4 pools.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
enum

The protocol to use for the swap/order.

Allowed:
string

The token which will be sent, specified by its token address. For a list of supported tokens, see the FAQ.

string

The token which will be sent, specified by its token address. For a list of supported tokens, see the FAQ.

string

The address of the NFT representing the position. Required when requesting approval for removing liquidity from a V2 position (provide address of V2 NFT). Required when requesting approval for migrating a V3 position to a V4 position (provide address of V3 NFT).

number
enum

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

string
string

The amount of token0 to be added or removed from the position. To estimate the amount of token0 needed when adding a new position, use the /lp/create endpoint to simulate the position creation.

string

The amount of token1 to be added or removed from the position. To estimate the amount of token1 needed when adding a new position, use the /lp/create endpoint to simulate the position creation.

boolean
Defaults to false

Dictates whether you receive permits to sign or permit approval transactions to submit onchain for your wallet in order to swap or LP. If set to true, the response will include an approval transaction depending on your allowance. If set to false you would receive a permit to sign depending on your allowance. The default is false.

string

Only required when getting approval for removing a V2 position. Populated with the amount of the V2 position to be removed (eg. amount0*amount1).

boolean
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json