> ## Documentation Index
> Fetch the complete documentation index at: https://docs.route.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors and limits

> Status codes, error bodies and rate limits.

Every response is JSON (streams: `text/event-stream`) with an `x-request-id` header. Send your own (1 to 64 characters: letters,
digits, `.`, `_`, `:`, `-`) to trace a request, and include it when you report a problem.

## Status codes

| Status | Body | Meaning | What to do |
| - | - | - | - |
| `200` | `{ "ok": true, ... }` | Success | |
| `400` | `{ "error": "Invalid quote parameters" }` | Malformed address or amount | Fix the request |
| `400` | `{ "error": "Same token: in and out must differ ..." }` | `in` and `out` are the same token (native and wrapped count as one) | Fix the request |
| `400` | `{ "error": "Parameter not available for this key: ..." }` | Unknown parameter, or a swap parameter on a quote-only key | Remove it, or ask for swap permission |
| `401` | `{ "error": "Unauthorized" }` | Wrong or revoked key | Check the `Authorization` header |
| `403` | `{ "error": "Not available for this key" }` | Endpoint or feature not switched on for this key | Ask @rapidssh |
| `404` | `{ "error": "Not available on the public tier. ..." }` | Endpoint needs a partner key | Use a partner key |
| `405` | `{ "error": "GET required" }` | Wrong method | Check the method |
| `422` | `{ "ok": false, "error": "no admitted route" }` | No route for this pair or size | Try another size or pair |
| `422` | `{ "ok": false, "error": "execution check failed" }` | The route did not pass the check through Route's contract | Retry; do not send an older transaction |
| `422` | `{ "ok": false, "error": "minOut above the quoted output" }` | Your `minOut` is higher than the quote | Lower `minOut` |
| `429` | `{ "error": "Rate limit exceeded for this key" }` | Over your per-minute limit | Wait for `retry-after` seconds |
| `429` | `{ "error": "Too many concurrent requests for this key" }` | Over your concurrency cap | Wait for an in-flight request to finish |
| `429` | `{ "error": "public tier rate limit; ..." }` | Over the public tier's per-IP limit | Wait for `retry-after`, or get a partner key |
| `503` | `{ "error": "Pool state not fresh" }` | Route is catching up with the chain | Retry after a second |
| `503` | `{ "error": "Busy, retry shortly" }` | Service at capacity | Retry after `retry-after` |

## Rate limits

| Limit | Partner key | Public tier |
| - | - | - |
| Requests | Per minute, set per key. Refills continuously, bursts up to a tenth of a minute's allowance. | 60 a minute per IP |
| Swap transactions | Counted as requests | 20 a minute per IP |
| In flight | Set per key | 2 per IP |
| Live streams | Set per key (`429 Too many live streams for this key`) | Not available |

Limits apply to every endpoint and are counted per chain. A `429` carries `retry-after` in seconds: back off, never retry in a
tight loop. A stream counts as one request until its final event. Need more? DM @rapidssh with current usage and expected peak.

## Timeouts

Requests must arrive within 5 seconds. Use a 10 second client timeout and retry once on network errors or `503`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.