bridge

Add Liquidity

This endpoint enables you to add liquidity to a cross-chain bridge by depositing a specified amount of tokens from a source blockchain. Upon a successful call, the API returns comprehensive details about the liquidity addition, including chain IDs, source and destination addresses, gas settings, and a unique reference ID for tracking.

💡 Compute Unit Value: 85 (Fixed)

post/defi/v1/bridge/addliquidity

Request

  • Base URL
    https://svc.blockdaemon.com
  • URL
    https://svc.blockdaemon.com/defi/v1/bridge/addliquidity
  • 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

Chain ID of the source chain. Find more here.

srcTokenSymbolstring

Symbol of the token to add liquidity

srcTokenAddressstring

Address of the token to add liquidity

fromstring required

Address of the token sender.

amountInstring required

Amount of tokens to add as liquidity, 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.

Example request

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

Response

Successful response

statusinteger
msgstring
dataobject

Example response

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

Changes

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