Withdraw Swap Liquidity
This endpoint withdraws liquidity from a pool, swaps the received tokens to a single output token, and sends to the specified address.
Authorization
x-api-key In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/liquidity/withdraw" \ -H "Content-Type: application/json" \ -d '{ "walletAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464", "toAddress": "0x1337133713371337133713371337133713371337", "chainId": 42161, "tokenId": "123456", "tokenOut": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", "percentage": 100, "payGasFeeToken": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" }'{ "operation": { "liquidityProvider": "UNISWAP_V3", "walletAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464", "toAddress": "0x1337133713371337133713371337133713371337", "chainId": 42161, "tokenId": "123456", "tokenOut": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", "percentage": 100, "transactionFeePercent": 2.5, "payGasFeeToken": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", "slippage": 1.2, "extraFee": { "percentage": 1.5, "toAddress": "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464" }, "metadata": { "key": "value" } }}Rebalance a liquidity position with a new price range POST
Collects the entire position, swaps assets as needed, and mints a fresh Uniswap v3 position in the requested range.
Withdraw Liquidity Cross-Chain (Enso) POST
Withdraws a liquidity position and delivers the proceeds on another network in a single signature: the position is redeemed and consolidated on its own network, then bridged, and the destination leg delivers `tokenOut` to `toAddress`. Platform fees and gas are charged on the position's network.