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

# Rate Limits

> Per-IP and per-API-key limits, with handling guidance.

DZap rate-limits requests to keep the API responsive for everyone. Limits differ by API and authentication state.

## Limits at a glance

| Surface                  | Default        | With API key                          |
| ------------------------ | -------------- | ------------------------------------- |
| Fuse API — `/v1/quote`   | 3 req/sec/IP   | n/a (no auth)                         |
| Fuse API — `/v1/buildTx` | 3 req/sec/IP   | n/a                                   |
| Fuse API — other reads   | 60 req/min/IP  | n/a                                   |
| Trade API — quotes/build | 60 req/min/IP  | per-key tier (typically 5–50 req/sec) |
| Trade API — reads        | 120 req/min/IP | per-key tier                          |

## Response headers

Every response includes:

```
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1714117200
```

`X-RateLimit-Reset` is a Unix timestamp.

## When you hit a limit

You'll get `429 Too Many Requests`:

```json theme={null}
{
  "status": "error",
  "code": "RATE_LIMITED",
  "message": "Rate limit exceeded. Retry after 12s.",
  "retryAfter": 12
}
```

Retry with exponential backoff. Don't hammer.

## Best practices

* **Cache quotes briefly** — quotes are valid for \~30s; cache server-side if you re-render the same pair.
* **Batch where possible** — `/v1/quotes` accepts an array of items in `data`. One request, many quotes.
* **Use the SDK** — it implements retries with backoff for you.
* **Use an API key for production** — per-key limits are higher and more predictable than per-IP.

## Need more headroom?

Email `support@dzap.io` with your projected req/sec and use case. Higher tiers are available for production deployments.
