bridge

Get Bridge Swap Price

This endpoint provides a real‑time swap quotation for transferring tokens between two blockchain networks using a designated bridge. It calculates the estimated amount of destination tokens that you would receive based on a given input token amount and token pair, factoring in the current liquidity and fees across the specified source and destination chains.

💡 Compute Unit Value: 40 (Fixed)

get/defi/v1/bridge/price

Request

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

Query parameters

srcChainIdstring

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

Example:1
bridgeId'600' | '300' | '400' | '500' | '100'

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

Example:600
dstChainIdstring required

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

Example:1
srcTokenSymbolstring

Symbol of the source token.

Example:usdt
dstTokenSymbolstring

Symbol of the destination token.

Example:ETH
srcTokenAddressstring

Contract address of the source (input) token on the source chain. For EVM chains, use a checksummed hex address (e.g., 0x...). Either srcTokenAddress or srcTokenSymbol must be provided.

Example:0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402
dstTokenAddressstring

Contract address of the destination (output) token on the destination chain. For EVM chains, use a checksummed hex address (e.g., 0x...). Either dstTokenAddress or dstTokenSymbol must be provided.

Example:0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402
amountInstring required

Amount of the input token to provide, specified in the token's smallest denomination (base units). Do not send human-readable decimal values. Examples: to swap 1 WETH (18 decimals), use "1000000000000000000"; to swap 1 USDC (6 decimals), use "1000000".

Example:1000000000000000000
vsCurrenciesstring

A comma-separated list of currency symbols to convert the amount into, such as 'USD,EUR'. This parameter is optional and allows retrieving values in multiple fiat currencies.

Example:usd,eur,gbp

Response

Successful response

statusnumber

Numeric status code indicating success or failure of the API call

msgstring

Human-readable message describing the API result or error

Example response

{
  "status": 200,
  "msg": "success",
  "data": {
    "srcChainId": "1",
    "dstChainId": "10",
    "srcTokenSymbol": "USDT",
    "dstTokenSymbol": "USDC",
    "srcTokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "dstTokenAddress": "0x0b2c639c533813f4aa9d7837caf62653d097ff85",
    "amountIn": "1000",
    "amountsOut": [
      "1000",
      "1000339710295989"
    ],
    "prices": {
      "usd": [
        {
          "chainId": "1",
          "USDT": "1.0004228921119596"
        },
        {
          "chainId": "1",
          "DAI": "0.9996480800961153"
        }
      ]
    },
    "priceImpact": {
      "percentage": "0.4452",
      "value": "0.039700"
    }
  }
}

Changes

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