# Meta aggregator

> One quote and one unsigned transaction on any Chord chain. Chord's own router answers first; a third-party aggregator only when it fails, and the answer says who quoted it.

Source: https://getchord.xyz/docs/concepts/meta-aggregator/

`GET /v1/meta/quote` and `POST /v1/meta/swap` are the swap endpoints built for agents: one call on any of the eight EVM chains that ends in a route you can sign, or an honest "no route anywhere".

Chord's own router always answers first. A third-party aggregator answers only when Chord fails, and every answer names the provider and the reason.

| Chain | First | Fallbacks, in order |
| --- | --- | --- |
| Monad `143` | Chord router | KyberSwap, Monorail, Relay |
| Robinhood Chain `4663` | Chord router | KyberSwap, LI.FI, Relay |
| Arc `5042` | Chord router | KyberSwap, LI.FI, Relay |
| Avalanche `43114` | Chord router | KyberSwap, LI.FI, Relay |
| Base `8453` | Chord router | KyberSwap, LI.FI, Relay |
| BNB Chain `56` | Chord router | KyberSwap, LI.FI, Relay |
| Arbitrum One `42161` | Chord router | KyberSwap, LI.FI, Relay |
| Ethereum `1` | Chord router | KyberSwap, LI.FI, Relay |

The live order and each provider's breaker state: `GET /v1/meta/providers`.

## When a fallback is used

Only on a Chord failure:

- the routing engine timed out, returned an error, or is down (a cold start, a deploy);
- Chord has no route for the pair or the size;
- Chord refuses the route itself: the [value guard](/docs/concepts/quotes-and-routing/), a taxed token, a stale bonding-curve route;
- the Chord router is not live on that chain;
- the transaction Chord built fails simulation.

Never because another aggregator shows a better price. Never on a user error: an address that is not a token, a bad amount or an unknown chain is answered with HTTP 400 and no other provider is asked.

## What you get back

The same shape whichever provider answered.

| Field | Meaning |
| --- | --- |
| `provider` | `chord`, `kyberswap`, `monorail`, `lifi`, `relay`. `null` = no provider has a route. |
| `fallbackReason` | `null` when Chord answered, otherwise why it did not (`no_route`, `engine_timeout`, `value_guard`, `simulation_failed`, …). |
| `attempts` | Every provider asked, in order, with `status`, `ms` and a short `error`. |
| `amountOut` | What the taker receives after every fee, smallest unit. |
| `minAmountOut` | The minimum the transaction enforces, from the slippage you asked for. |
| `priceImpactPct` · `valueLossPct` | Impact when the provider states one; value lost at Chord's own prices (`null` when a side has no reliable price). |
| `feeBps` · `feeRecipient` | Chord path: Chord's protocol fee. Fallback: the integrator fee Chord added (0 today); the provider's own fees are inside `amountOut`. |
| `route.venues` | Venue names. |
| `tx` | `{to, data, value, gas, chainId}`, unsigned. `null` without `taker`. |
| `approval` | `{token, spender, amount}` to send first, or `null`. |
| `simulation` | The transaction run as the taker: `{ok, amountOut, gasUsed}`. |
| `safety` | A security scan of the unknown token, when the value check could not run. |
| `warnings` | `INSUFFICIENT_BALANCE`, `UNPRICED`, `OUTPUT_WRAPPED`, `NO_ROUTE`. |
| `quoteId` · `expiresAt` | Rebuild with `POST /v1/meta/swap {quoteId, taker}` within 2 minutes; quote again after `expiresAt`. |

Note the one difference from `/v1/quote`: its `outputAmount` is before Chord's fee, `amountOut` here is after every fee, so answers from different providers compare directly.

## The checks on a fallback answer

A third-party answer is untrusted data until it passes all of these. One failure and the next provider is asked.

1. **Allowlist.** The transaction target and the approval spender must be that provider's known router on that chain, and have code there. Anything else is refused, never returned.
2. **Calldata.** For KyberSwap the calldata is decoded: receiver, tokens and amount must be what you asked.
3. **Minimum.** `minAmountOut` comes from your slippage. A provider minimum below it is refused.
4. **Value guard.** An output worth 30 % less than the input at Chord's own prices is refused, exactly as on `/v1/swap`. When Chord has no price for a side, the token is scanned (`safety`) and a honeypot is refused.
5. **Simulation.** With a `taker`, the transaction is run as that wallet and must deliver at least `minAmountOut` to it. A fallback transaction that cannot be simulated is never returned.

The simulation runs the swap from the taker's own address and measures the taker's balance of the output token before and after, so it means the same thing for every aggregator. When the taker does not hold the input yet, the input is supplied for the simulation and the answer carries `INSUFFICIENT_BALANCE`.

## Quote, then sign

```bash
# 1. Price (read-only)
curl -s "https://api.getchord.xyz/v1/meta/quote?chain=base&tokenIn=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913&tokenOut=0x4200000000000000000000000000000000000006&amount=10000000&slippageBps=50"

# 2. The unsigned transaction for a wallet (simulated as that wallet)
curl -s -X POST https://api.getchord.xyz/v1/meta/swap -H 'Content-Type: application/json' \
  -d '{"chain":"base","tokenIn":"0x833589fcd6edb6e08f4c7c32d4f71b54bda02913","tokenOut":"0x4200000000000000000000000000000000000006","amount":"10000000","slippageBps":50,"taker":"0xYourWallet"}'
```

Then, in your own wallet:

1. If `approval` is not `null`, send `token.approve(spender, amount)` and wait for it.
2. Sign and send `tx` on `tx.chainId`.

Chord never signs and never holds funds.

## Reading the status codes

| Answer | Meaning |
| --- | --- |
| `200`, `provider` set | A route. Read `provider` and `fallbackReason` first. |
| `200`, `provider: null` | Every provider looked and none has a route. |
| `400` | Your request: `INVALID_PARAMS`, `UNSUPPORTED_CHAIN`, `UNKNOWN_TOKEN`. |
| `404` on `/meta/swap` | `NO_ROUTE`, with `attempts`. |
| `410` on `/meta/swap` | `QUOTE_EXPIRED`: send the full params. |
| `503 UNAVAILABLE` | Nobody could answer right now (timeouts, an open breaker). Retry in a few seconds; this is not "no route". |

## For agents

- MCP and function calling: `chord_quote` and `chord_swap_tx` call this endpoint on every EVM chain ([MCP server](/docs/agents/mcp/), [tools manifest](/docs/agents/function-calling/)).
- The [Agent Skill](/docs/agents/skill/) quotes through the meta aggregator first and checks the router of every answer against its own pinned list.
- Solana is not on this endpoint: Solana swaps are `/v1/sol/trade/*`, where every quote builds Chord's own Solana route and Jupiter's for the wallet and keeps the better one. See [Solana](/docs/networks/solana/#swaps).
