# Quotes and routing

> What a quote is, how the route is found, what the numbers mean, fees, slippage, the fast frame, and the honest no-route answer.

Source: https://getchord.xyz/docs/concepts/quotes-and-routing/

`GET /v1/quote` is a live read of every venue on the chain for one pair and size. It is not a price feed: the answer is what you would get right now, on the route the engine would execute.

## How a route is found

1. **Every single-hop venue is quoted in parallel** — Uniswap V3 and V4 pools (including hooked launchpad pools on Arc), V2 pairs, and the forks the engine knows.
2. **Splits.** Within a hop the order can be split across venues (say 90 % in one pool and 10 % in another) when that improves the output beyond a small threshold, and only across distinct pools.
3. **Composed hops.** When no direct pool wins, the engine composes the best `A → anchor` leg with the best `anchor → B` leg through the chain's anchors (USDC and EURC on Arc; WETH and USDG on Robinhood Chain).
4. **Safety gates.** Routes over 50 % impact are dropped, hooks the engine has not verified are not routed, and a paused venue is muted.

The winner is returned with one `routePlan` entry per leg, each carrying the venue id, the pool, the amounts, and the adapter and calldata the router will use. Do not construct venue logic from these fields — pass the whole body to `/swap`.

## Reading the numbers

| Field | Meaning |
| --- | --- |
| `outputAmount` | What the route returns before the protocol fee, smallest unit. |
| `feeBps` · `feeAmount` · `feeTier` | The protocol fee on the **output** token, per token, from the on-chain fee collector: 5 bps by default on every chain, 0 on USDC / EURC (Arc) and WETH / USDG / stocks (4663), capped at 100. `feeAmount` is deducted on-chain from `outputAmount`. |
| `otherAmountThreshold` | The minimum output after fee and slippage — **the number the transaction enforces**. Positive slippage goes to the user. |
| `priceImpactPct` | Percent, against the spot rate of the same route. Display only. |
| `gasEstimate` | From the venue quoter or an RPC estimate. |
| `blockNumber` | The block the venues were read at. |

A quote is good for about 30 seconds. If the user waited longer, quote again before building.

## No route

An empty `routePlan` with `outputAmount: "0"` is a real answer: nothing on the chain fills this size. `noRouteReason` says `INSUFFICIENT_LIQUIDITY` (the pair routes at a smaller size — try one) or `NO_POOLS` (no venue holds the pair). The engine never fabricates a price.

## Slippage

`slippageBps` on the quote sets `otherAmountThreshold`. On `/swap` it is a consistency check only: the signed minimum is the quote's threshold, which already folds in venue-specific widening the swap builder cannot re-derive. Sending a different value returns `400 SLIPPAGE_MISMATCH`. Want tighter or looser? Quote again.

## The fast frame

`fast=1` returns a single-hop quote in about 400 ms with `preliminary: true`. Use it to paint a first number, run the full quote alongside, and replace. Never build a transaction from a preliminary quote.

## Debug: one venue

`only=<venue id>` restricts routing to one venue and returns its raw quote **before** the safety gates. It needs an API key, because a shared link with `?only=` would hand a user exactly the route the gate refuses.

## Simulate before you sign

`POST /v1/swap/simulate` with the built transaction runs `eth_call` from the user's address and estimates gas. A revert comes back decoded (`NotRouter`, a paused market, allowance or balance) so the wallet never opens on a doomed transaction. An allowance revert is advisory: approve, then swap.

## Where fees go

The fee is read per output token from the on-chain fee collector: 5 bps by default on every chain since 2026-10-02, 0 on the stablecoins and majors each chain exempts, capped at 100. It does not change with a token's age. A referrer passed as `feeAccount` on `POST /v1/swap` earns 50 % of the fee on that swap; `/v1/meta/*` and the MCP tools take no referrer. Quotes and API usage are free.
