v1

latestOpenAPI 3.1.02026-07-24223580832.9 KB
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

Query parameters

srcChainIdstring

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

Example:1

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

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

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

dstChainIdstring required

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

Example:1

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

srcTokenSymbolstring

Symbol of the source token.

Example:usdt

Symbol of the source token.

dstTokenSymbolstring

Symbol of the destination token.

Example:ETH

Symbol of the destination token.

srcTokenAddressstring

Address of the source token.

Example:0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402

Address of the source token.

dstTokenAddressstring

Address of the destination token.

Example:0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402

Address of the destination token.

amountInstring required

Amount of the source token to swap.

Example:10000

Amount of the source token to swap.

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

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.

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