Notus API
Liquidity pools

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.

POST
/api/v1/liquidity/withdraw

Authorization

x-api-key
x-api-key<token>

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"    }  }}