bridge

Remove Liquidity

Removes user-provided liquidity from one or more blockchain networks in a single transaction, streamlining cross-chain asset management. The response includes details such as chain IDs, addresses, gas limits, payload data, and a unique reference ID for transaction tracking.

💡 Compute Unit Value: 85 (Fixed)

post/defi/v1/bridge/removeliquidity

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/bridge/removeliquidity
  • Auth
    API key in header X-API-Key

Request body

bridgeId'100' | '500'

The unique ID to specify the bridge protocol for routing cross-chain queries or transactions. Find more here.

srcChainIdstring

The unique chain ID to specify the source chain. Find more here.

srcTokenSymbolstring

Symbol of the token to remove liquidity.

srcTokenAddressstring

Address of the token to remove liquidity.

fromstring required

Address of the token sender.

amountOutstring required

Amount of the output token to receive, 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".

gasstring

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.

srcChainSymbolstring

Symbol of the source chain.

gasPrioritystring

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

enableFeeboolean

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

tostring required

Address of the token recipient.

Example request

{
  "bridgeId": "100",
  "srcChainId": "1",
  "srcTokenSymbol": "usdt",
  "srcTokenAddress": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "amountOut": "1000000000000000000",
  "gas": "100000",
  "srcChainSymbol": "ETH",
  "gasPriority": "low",
  "enableFee": false,
  "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402"
}

Response

Successful response

statusinteger
msgstring
dataobject

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "chainId": "1",
    "from": "0xa67e9b68c41b0f26184d64c26e0b2b81466e5994",
    "to": "0x8731d54E9D02c286767d56ac03e8037C07e01e98",
    "value": "0",
    "gas": "400000",
    "data": "0xc4de93a500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000989680000000000000000000000000a67e9b68c41b0f26184d64c26e0b2b81466e5994",
    "referenceId": "f760743bf970482a9130780cef63e3a6"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.