# Withdraw Liquidity Cross-Chain (Enso) URL: /docs/api-reference/liquidity-pools/WithdrawSwapLpCrossChainController_handle_v1 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. ## POST /api/v1/liquidity/withdraw/cross-chain Request: `POST https://api.notus.team/api/v1/liquidity/withdraw/cross-chain` Authentication: send your project's API key in the `x-api-key` header. ```json { "description": "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.", "operationId": "WithdrawSwapLpCrossChainController_handle_v1", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WithdrawSwapLiquidityCrossChainDTO" } } } }, "responses": { "200": { "description": "Data about the cross-chain withdraw", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WithdrawSwapLiquidityCrossChainResponseDTO" } } } }, "400": { "description": "BAD_REQUEST", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "description": "NOT_AUTHORIZED_TOKENS", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 400 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "NOT_AUTHORIZED_TOKENS" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "" ] } } }, { "type": "object", "description": "UNSUPPORTED_CROSS_CHAIN_ROUTE", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 400 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "UNSUPPORTED_CROSS_CHAIN_ROUTE" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "There is no cross-chain liquidity route from chain 56 to chain 137." ] } } }, { "type": "object", "description": "LIQUIDITY_PROVIDER_MISMATCH", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 400 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "LIQUIDITY_PROVIDER_MISMATCH" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "The liquidityProvider does not match the provider of the position manager given in nftAddress" ] } } }, { "type": "object", "description": "UNKNOWN_POSITION_MANAGER", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 400 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "UNKNOWN_POSITION_MANAGER" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "The nftAddress is not a supported liquidity position manager on this chain" ] } } } ] } } } }, "403": { "description": "FORBIDDEN", "content": { "application/json": { "schema": { "oneOf": [ { "type": "object", "description": "UNAVAILABLE_COMPUTE_UNITS", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 403 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "UNAVAILABLE_COMPUTE_UNITS" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "The project doesn't have enough compute units to perform this action. Please upgrade your plan." ] } } }, { "type": "object", "description": "POSITION_NOT_OWNED_BY_WALLET", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 403 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "POSITION_NOT_OWNED_BY_WALLET" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "The liquidity position NFT does not belong to the provided wallet address" ] } } } ] } } } }, "404": { "description": "NOT_FOUND", "content": { "application/json": { "schema": { "type": "object", "description": "ACCOUNT_ABSTRACTION_ADDRESS_NOT_REGISTERED_WITH_PROJECT", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 404 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "ACCOUNT_ABSTRACTION_ADDRESS_NOT_REGISTERED_WITH_PROJECT" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "The requested wallet \"0x6e397ddf51d9f15dbe0414538e7529f51f2e5464\" is not registered with the project" ] } } } } } } }, "summary": "Withdraw Liquidity Cross-Chain (Enso)", "tags": [ "Liquidity Pools" ] } ``` ### Schema WithdrawSwapLiquidityCrossChainDTO ```json { "type": "object", "properties": { "liquidityProvider": { "description": "Optional provider for withdrawing from a liquidity pool. If not provided, Uniswap v3 will be used.", "type": "string", "enum": [ "UNISWAP_V3", "PANCAKESWAP_V3", "UNISWAP_V4" ], "examples": [ "UNISWAP_V3" ] }, "nftAddress": { "description": "Optional position manager (NFT contract) of the position: the `nftAddress` returned when the position was created. It selects the liquidity provider; if `liquidityProvider` is also sent, both must name the same provider. Without either, Uniswap V3 is used.", "type": [ "string", "null" ], "examples": [ "0xC36442b4a4522E871399CD717aBDD847Ab11FE88" ] }, "walletAddress": { "description": "The wallet address (in hexadecimal format) that owns the liquidity position.", "type": "string", "examples": [ "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464" ] }, "toAddress": { "description": "The address (in hexadecimal format) that will receive the output tokens.", "type": "string", "examples": [ "0x1337133713371337133713371337133713371337" ] }, "chainId": { "description": "The blockchain network where the liquidity position exists. \n Supported EVM chains:\n- Arbitrum One: 42161\n- Avalanche: 43114\n- Base: 8453\n- BNB Smart Chain: 56\n- Ethereum: 1\n- Gnosis: 100\n- OP Mainnet: 10\n- Polygon: 137\n- X Layer Mainnet: 196\n- Robinhood Chain: 4663", "type": "number", "examples": [ 42161 ] }, "tokenId": { "type": "string", "description": "The NFT token ID representing the liquidity position.", "examples": [ "123456" ] }, "tokenOut": { "description": "The address (in hexadecimal format) of the token to receive after withdrawing and swapping.", "type": "string", "examples": [ "0x82af49447d8a07e3bd95bd0d56f35241523fbab1" ] }, "percentage": { "type": "number", "minimum": 0.01, "maximum": 100, "description": "Percentage of the liquidity position to withdraw (e.g., 100 for full withdrawal, 50 for half).", "examples": [ 100 ] }, "transactionFeePercent": { "default": 0, "description": "Percentage fee applied to the transaction (e.g., 5 for 5%).", "type": "number", "minimum": 0, "maximum": 99.99, "examples": [ 2.5 ] }, "extraFee": { "description": "Optional extra fee that can be charged in addition to the transaction fee. This extra fee is deducted from the output token and sent to the specified `toAddress`.", "type": "object", "properties": { "percentage": { "type": "number", "minimum": 0, "maximum": 99.99, "description": "The percentage of the extra fee to be charged", "examples": [ 1.5 ] }, "toAddress": { "description": "The address (in hexadecimal format) receiving the extra fee.", "type": "string", "examples": [ "0x6e397ddf51d9f15dbe0414538e7529f51f2e5464" ] } }, "required": [ "percentage", "toAddress" ] }, "metadata": { "type": "object", "additionalProperties": { "type": "string" }, "description": "Custom metadata. Key-value pairs with string values. Max 1KB size.", "examples": [ { "key": "value" } ] }, "chainIdOut": { "description": "The blockchain network where the proceeds should land, when different from the position's own network. The exit is bridged inside the same signature; platform fees and gas are charged on the position's network. \n Supported EVM chains:\n- Arbitrum One: 42161\n- Avalanche: 43114\n- Base: 8453\n- BNB Smart Chain: 56\n- Ethereum: 1\n- Gnosis: 100\n- OP Mainnet: 10\n- Polygon: 137\n- X Layer Mainnet: 196\n- Robinhood Chain: 4663", "type": "number" } }, "required": [ "walletAddress", "toAddress", "chainId", "tokenId", "tokenOut", "percentage", "chainIdOut" ] } ``` ### Schema WithdrawSwapLiquidityCrossChainResponseDTO ```json { "type": "object", "properties": { "operation": { "$ref": "#/components/schemas/WithdrawSwapLiquidityCrossChainDTO" } }, "required": [ "operation" ] } ```