Quote and swap

Best route for a swap

Quotes every venue on the chain in parallel, splits the order across venues when that improves the output, composes a two-hop route through the chain's anchors when no direct pool wins, and returns the best.

Use it for: a price before a trade, a route card, an agent deciding whether to buy, a bot comparing venues.

Notes

  • Amounts are strings in the token's smallest unit. On Arc the USDC predeploy has 6 decimals, native USDC 18 — send the predeploy address 0x3600…0000 (the zero address is an alias for it on 5042).
  • A quote is a live read of the venues and is good for about 30 seconds. Re-quote before you build if you waited longer.
  • fast=1 returns a single-hop answer in about 400 ms marked preliminary; run the full quote alongside and replace it.
  • only= pins one venue and bypasses the routing safety gates — it needs an API key.
  • An empty routePlan is a real answer (no route at this size); read noRouteReason.
get/quote

Request

  • Base URL: https://api.getchord.xyz/v1
  • URL: https://api.getchord.xyz/v1/quote
  • Auth: none declared

Query parameters

chain5042 | 4663 | 143 | 43114 | 8453 | 56 | 42161 | 1

Chain id: 5042 Arc · 4663 Robinhood Chain · 143 Monad · 43114 Avalanche C-Chain · 8453 Base · 56 BNB Chain · 42161 Arbitrum One · 1 Ethereum. Omitted = 143. Always pass it.

inputMintstring required

EVM address, hex, case-insensitive.

Token you sell. The zero address means the native unit (an alias for the USDC predeploy on Arc; ETH on Robinhood Chain).

outputMintstring required

EVM address, hex, case-insensitive.

Token you buy.

amountstring required

Amount in the token's smallest unit, as a decimal string. Never a float.

Input amount, smallest unit.

slippageBpsinteger

Slippage tolerance in basis points; sets otherAmountThreshold.

fast0 | 1

1 = progressive first frame (single-hop, ~400 ms, preliminary: true).

onlystring

Debug: restrict routing to one venue id. Requires X-API-Key.

Response

The best route. routePlan empty + outputAmount "0" = no route.

inputMintstring

EVM address, hex, case-insensitive.

outputMintstring

EVM address, hex, case-insensitive.

inputAmountstring

Amount in the token's smallest unit, as a decimal string. Never a float.

outputAmountstring

Amount in the token's smallest unit, as a decimal string. Never a float.

otherAmountThresholdstring

Minimum output after fee and slippage — the number the transaction enforces.

slippageBpsinteger
priceImpactPctstring

Percent, as a string, against the spot rate of the same route.

noRouteReasonstring

Only when routePlan is empty: INSUFFICIENT_LIQUIDITY (try a smaller amount) or NO_POOLS.

gasEstimatestring

Gas units, from the venue quoter or the RPC.

gasCostUSDstring
blockNumberinteger
timeTakennumber

Engine seconds.

feeBpsinteger

Protocol fee on the output token, per token on-chain (FeeCollector.feeBpsFor): 5 bps by default on every chain, 0 on the stablecoins and majors a chain exempts (USDC / EURC on Arc, WETH / USDG and stocks on Robinhood Chain), capped at 100.

feeAmountstring

Amount in the token's smallest unit, as a decimal string. Never a float.

feeMintstring

EVM address, hex, case-insensitive.

feeTierstring

major · stable · standard · meme · new.

preliminaryboolean

Present only on fast=1 answers: single-hop, ~400 ms, replace it with the full quote.

Changes

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