# Intents Route

> One API over every intent protocol. Quote a cross-chain swap across all of them, get an execution plan your user's wallet signs, and track the order with one status model.

> Coding agent setting this up end to end? Follow https://intents.fi/docs/agent-setup/route.md instead: it is the same integration as one step-by-step prompt.

Intents Route is for apps that move **their users' own funds** between tokens and chains: wallets,
dApps, swap and bridge UIs, agents. One request quotes every intent protocol we route through —
NEAR Intents, Across, Relay, deBridge, Mayan, LI.FI and UniswapX — and ranks the answers. The
winning quote becomes an execution plan that the **user's own wallet** signs, and one order status
covers every protocol from there.

If you want to *get paid* rather than move a user's funds, you want [Intents Checkout](/docs/checkout)
instead: it uses Route internally and you never call these endpoints.

## The flow

| Step | Call | SDK |
|---|---|---|
| 1. Quote every protocol | [`POST /v0/quotes`](/docs/api/post-quotes) | `client.quotes.create()` |
| 2. Turn the best quote into a plan | [`POST /v0/orders`](/docs/api/post-orders) | `client.orders.create()` |
| 3. The user's wallet runs the steps | `evm_tx`, `svm_tx`, `tvm_tx`, `transfer` or `eip712_sign` | `executeOrder()` |
| 4. Hand back each hash or signature | [`POST /v0/orders/{id}/submit`](/docs/api/post-orders-id-submit) | done by `executeOrder()` |
| 5. Follow it to the end | [`GET /v0/orders/{id}`](/docs/api/get-orders-id) or the `order.updated` webhook | `waitForCompletion()` |

`swap()` in `@intents-fi/sdk` does all five in one call. The [quickstart](/docs/route/quickstart) walks
through it, or a coding agent can wire it in with the [Route setup prompt](/docs/agent-setup/route).

## What it guarantees

- **Non-custodial.** intents.fi never signs, never holds a key and never holds funds. The plan is
  executed by the user's wallet; we only quote, check and track.
- **Allowlisted targets.** Every transaction in a plan goes to a contract on our allowlist for that
  protocol and chain, or the order is refused with `UNTRUSTED_EXECUTION_TARGET`.
- **One status model.** `awaiting_user → submitted → pending_deposit → processing`, ending in
  `completed`, `refunded`, `failed` or `expired`, whatever the protocol calls it.
- **Failover.** A protocol that errors, times out or rate-limits is skipped and another serves the
  request. [Route status](/docs/status) shows how that is going, live.

## Assets and amounts

- Assets are CAIP-19 IDs (`eip155:8453/erc20:0x8335…` is USDC on Base) or the `alias:address`
  shorthand (`base:0x8335…`, `solana:native`). [`GET /v0/chains`](/docs/api/get-chains) lists the
  chains and their aliases, [`GET /v0/assets`](/docs/api/get-assets) the assets on one chain.
- Amounts are **integer strings in base units**. Use `BigInt`, never a float.
- `from.amount` asks for an exact input; `to.amount` with `tradeType: "EXACT_OUTPUT"` asks for an
  exact output.

## Keys and test mode

Any secret key works ([keys](/docs/get-started)), and keep it on your server: a browser app calls your
own backend, which calls the API. Route has **no test mode** — quotes come from the protocols
themselves — but nothing moves until the user's wallet signs, so develop with small amounts.

## Errors you will meet

| Code | HTTP | What to do |
|---|---|---|
| `NO_ROUTE` | 404 | No protocol can do this pair or amount. `details.errors` says why each one declined; try another amount or asset |
| `UNSUPPORTED_ASSET` | 400 | The asset ID isn't one we route. Check it against `GET /v0/assets` |
| `QUOTE_EXPIRED` | 410 | The quote's `expiresAt` passed. Quote again |
| `QUOTE_DRIFT` | 409 | The fresh price is worse than the quote by more than `driftToleranceBps` (default 15). The body carries the fresh quote: show it, and create the order again if the user accepts |
| `UNTRUSTED_EXECUTION_TARGET` | 502 | A protocol returned a contract we don't trust. Nothing was built; quote again or exclude that protocol |
| `PROVIDER_ERROR`, `PROVIDER_TIMEOUT` | 502, 504 | The protocol failed on its side. Retry, or quote again for another protocol |
| `RATE_LIMITED` | 429 | Back off and retry |
| [`ADDRESS_BLOCKED`](/docs/errors/ADDRESS_BLOCKED) | 403 | An address in the request is on a sanctions or abuse list |

Every error has the same body; switch on `error.code` ([errors](/docs/errors/)).

---

Source: https://intents.fi/docs/route/ · The whole corpus: https://intents.fi/docs/llms-full.txt
