Skip to content

Get quote routes

GET /quote

Return ranked route candidates for a token pair and input amount. Each candidate carries pricing, fees, a gas estimate, the execution path, and a quoteId that can later be exchanged for calldata via the build endpoints. Routes are ranked by routeMode (max_value by default). If no route exists for the pair — for example a cross-chain pair with no configured bridge — data is an empty array.

Authentication

Send your API key in the api-key header.

Parameters

Name In Type Required Description
fromChain query integer yes Source chain id.
toChain query integer yes Destination chain id.
fromToken query string yes Input token contract address on the source chain.
toToken query string yes Output token contract address on the destination chain.
amount query string yes Input amount as a base-10 integer string in the input token's base units.
sender query string yes Address that will send the swap.
receiver query string no Recipient of the output tokens. Defaults to sender.
slippage query number no Slippage tolerance as a percentage (1.0 means 1%). Defaults to 0.5.
feeBps query integer no Integrator fee in basis points, taken from the input amount.
routeMode query string no Ranking mode. One of fastest, max_value, or suggested. Unknown values fall back to max_value.
allowMultiBridge query boolean no Reserved. Accepted but currently ignored.
priorityProvider query string no Reserved. Accepted but currently ignored.
Integrator query string no Integrator identifier echoed back as integratorId on each route. Note the capitalized parameter name.
Referrer query string no Reserved. Accepted but currently ignored. Note the capitalized parameter name.
acquisitionMode query integer (enum) no Token acquisition mode recorded with the quote. 0 = direct transfer, 1 = native value, 2 = Permit2, 3 = Permit2 witness.

Responses

Status Description
200 Ranked route candidates (possibly empty).
400 Invalid request, e.g. an amount that is not a base-10 integer string. Plausible catalog codes behind the numeric status include VALIDATION_001 (invalid input) and VALIDATION_003 (invalid or unsupported chain id).
401 Missing or invalid API key. Plausible catalog codes behind the numeric status are AUTH_001 (unauthorized access) and AUTH_002 (invalid API key).
500 Unexpected server-side failure. Plausible catalog codes behind the numeric status include SYSTEM_002 (internal server error) and SYSTEM_001 (database operation failed).
200 response
{
  "code": 0,
  "message": "success",
  "data": [
    {
      "amount": "1000000000",
      "amountOut": "398400000000000000",
      "amountOutUsd": 998.74,
      "amountUsd": 1000.0,
      "expiry": 1785283500,
      "fees": {
        "integratorFee": "0",
        "integratorFeeUsd": 0.0,
        "routeFee": "0",
        "routeFeeUsd": 0.0
      },
      "fromToken": {
        "address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
        "chain": 8453,
        "decimals": 6,
        "icon": "https://assets.example.com/tokens/usdc.png",
        "name": "USD Coin",
        "priceUsd": 1.0,
        "symbol": "USDC"
      },
      "gasFee": {
        "gasFee": "210000000000000",
        "gasFeeUsd": 0.53,
        "gasLimit": "210000",
        "gasToken": {
          "address": "0x0000000000000000000000000000000000000000",
          "chain": 8453,
          "decimals": 18,
          "name": "Ether",
          "priceUsd": 2510.4,
          "symbol": "ETH"
        },
        "gasPrice": "1000000000"
      },
      "minAmountOut": "396408000000000000",
      "minAmountOutUsd": 993.75,
      "path": [
        {
          "amount": "1000000000",
          "amountOut": "398400000000000000",
          "fromToken": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
          "provider": {
            "name": "AMM Pool",
            "type": "dex"
          },
          "toToken": "0x4200000000000000000000000000000000000006",
          "type": "swap"
        }
      ],
      "providers": [
        {
          "name": "AMM Pool",
          "type": "dex"
        }
      ],
      "quoteId": "8c6f1d0b8a9e4f2c5d3b7a1908e6c4f2d0b8a6e4c2f0d8b6a4e2c0f8d6b4a2e0",
      "receiver": "0x1a2B3c4D5e6F7a8B9c0D1e2F3a4B5c6D7e8F9a0B",
      "sender": "0x1a2B3c4D5e6F7a8B9c0D1e2F3a4B5c6D7e8F9a0B",
      "slippage": 0.5,
      "toToken": {
        "address": "0x4200000000000000000000000000000000000006",
        "chain": 8453,
        "decimals": 18,
        "icon": "https://assets.example.com/tokens/weth.png",
        "name": "Wrapped Ether",
        "priceUsd": 2510.4,
        "symbol": "WETH"
      },
      "estimatedTimeMs": 4000,
      "routeKind": "sameChainSwap"
    }
  ]
}
400 response
{
  "code": 400,
  "data": null,
  "message": "amount must be a base-10 integer string"
}
401 response
{
  "code": 401,
  "data": null,
  "message": "missing api-key header"
}
500 response
{
  "code": 500,
  "data": null,
  "message": "internal server error"
}