---
title: "Best route for a swap"
method: GET
path: "/quote"
tags: ["Quote and swap"]
---

# Best route for a swap

`GET /quote`

## Request

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

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`.

## Query parameters

- `chain` 5042 | 4663 | 143 | 43114 | 8453 | 56 | 42161 | 1
- `inputMint` string, required: EVM address, hex, case-insensitive.
- `outputMint` string, required: EVM address, hex, case-insensitive.
- `amount` string, required: Amount in the token's smallest unit, as a decimal string. Never a float.
- `slippageBps` integer
- `fast` 0 | 1
- `only` string

## Response `200`

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

- QuoteResponse
  - `inputMint` string: EVM address, hex, case-insensitive.
  - `outputMint` string: EVM address, hex, case-insensitive.
  - `inputAmount` string: Amount in the token's smallest unit, as a decimal string. Never a float.
  - `outputAmount` string: Amount in the token's smallest unit, as a decimal string. Never a float.
  - `otherAmountThreshold` string: Minimum output after fee and slippage — the number the transaction enforces.
  - `slippageBps` integer
  - `priceImpactPct` string: Percent, as a string, against the spot rate of the same route.
  - `routePlan` RouteLeg[]: Empty with `outputAmount` "0" = no route (an honest answer, never a fabricated price).
    - `percent` integer: Share of the input this leg carries.
    - `swapInfo` object
      - `dex` string: Venue id (see Resources → Venue ids).
      - `pool` string: Pool address, or the 32-byte pool id on Uniswap V4.
      - `inputMint` string: EVM address, hex, case-insensitive.
      - `outputMint` string: EVM address, hex, case-insensitive.
      - `inputAmount` string: Amount in the token's smallest unit, as a decimal string. Never a float.
      - `outputAmount` string: Amount in the token's smallest unit, as a decimal string. Never a float.
      - `adapter` string: The router adapter that executes this leg — from the engine, never hardcode.
      - `extraData` string: Adapter-specific calldata for the leg.
      - `feeAmount` string: Amount in the token's smallest unit, as a decimal string. Never a float.
      - `feeMint` string: EVM address, hex, case-insensitive.
  - `noRouteReason` string: Only when `routePlan` is empty: `INSUFFICIENT_LIQUIDITY` (try a smaller amount) or `NO_POOLS`.
  - `gasEstimate` string: Gas units, from the venue quoter or the RPC.
  - `gasCostUSD` string
  - `blockNumber` integer
  - `timeTaken` number: Engine seconds.
  - `feeBps` integer: 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.
  - `feeAmount` string: Amount in the token's smallest unit, as a decimal string. Never a float.
  - `feeMint` string: EVM address, hex, case-insensitive.
  - `feeTier` string: `major` · `stable` · `standard` · `meme` · `new`.
  - `preliminary` boolean: Present only on `fast=1` answers: single-hop, ~400 ms, replace it with the full quote.

## Other responses

- `400`: Invalid parameters — `error` names the check that failed (`INVALID_PARAMS`, `BAD_ADDRESS`, `BAD_LIMIT`, `BAD_HOURS`, …).
- `429`: Over the per-minute limit (`RATE_LIMIT_EXCEEDED`). Read `X-RateLimit-Reset` and back off.
- `502`: The routing engine or an upstream did not answer (`ENGINE_ERROR`, `ROUTE_ERROR`).
- `503`: The lane behind this endpoint is not ready or not enabled here (`NOT_READY`, `CHAIN_NOT_ENABLED`, `NOT_ENABLED`, `*_UNAVAILABLE`). Retry later; do not treat it as an empty answer.

---

[API](https://skmtc.dev/getchord/apis/chord-api.md) · [All operations](https://skmtc.dev/getchord/apis/chord-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getchord/apis/chord-api/revisions/d3bc4640fea0?raw)
