Remove Liquidity

Withdraws tokens from a yield aggregator market, supporting advanced options like dual-token removal and slippage control. The response includes chain details, addresses, gas usage, and a unique reference ID for transaction tracking.

💡

Compute Unit Value: 120 (Fixed)

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

The request body for a /defi/v1/yieldaggregator/removeliquidity

The request body for a /defi/v1/yieldaggregator/removeliquidity

string
enum

A unique identifier to route the transaction to the appropriate yield aggregator instance. This parameter is optional if a default aggregator is used.

Allowed:
string
required

The blockchain address of the liquidity pool or market where tokens will be deposited. This parameter directs the transaction to the correct pool within the yield aggregator.

string
required

The token that the user wishes to receive as a result of the liquidity removal. This parameter specifies which output token is desired when liquidity is withdrawn from the pool.

string
required

Amount of tokens to remove from the liquidity pool, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: 1 WETH (18 decimals) = "1000000000000000000"; 1 USDC (6 decimals) = "1000000".

string
required

Blockchain address of the sender. For EVM chains, use a checksummed hex address (e.g., 0xABCDEF...). This address must hold sufficient balance and will sign the transaction.

boolean

An optional flag indicating whether the liquidity removal should be executed in dual-token mode. If set to true, liquidity will be removed for both tokens in the pool according to the pool’s ratio; if false or omitted, only a single token (as specified by tokenOut) will be withdrawn.

string

The maximum allowable percentage deviation between the expected and executed swap price. Default is 1, meaning a 1% tolerance (acceptable range: 0 to 100).

boolean

Enable swap aggregator functionality to facilitate swaps between tokens that are not directly convertible with the underlying asset. Set this boolean flag to true to activate advanced routing logic for such conversions.

string

Maximum number of gas units to allocate for the transaction, as an integer string (e.g., '200000'). If omitted, gas is estimated automatically. Note: this is gas units, not wei or gwei.

string

Specifies the desired gas fee priority (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.

boolean

Flag to include a basis points fee transaction alongside the main transaction when set to true.

Response

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