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

# Rate Limits

> OceanX Developer API rate limits and rate-limit response headers.

Rate limits are applied **per API key** using a sliding window.

| Limit    | Value            |
| -------- | ---------------- |
| Requests | **120 / minute** |

## Quote endpoints

The [spot quote endpoints](/api/spot) are metered in a **separate** budget, because
they reach the same live router OceanX's own order flow quotes against:

| Limit          | Value            |
| -------------- | ---------------- |
| Quote requests | **300 / minute** |

Spending one budget does not touch the other. Within it:

| Endpoint                                                     | Cost                                            |
| ------------------------------------------------------------ | ----------------------------------------------- |
| [`GET /spot/quote`](/api/endpoints/spot-quote)               | 1 per request                                   |
| [`POST /spot/exit-check`](/api/endpoints/spot-exit-check)    | **1 per ladder rung** — a 5-rung ladder costs 5 |
| [`GET /spot/quote/stream`](/api/endpoints/spot-quote-stream) | **1 per tick**                                  |

## Response headers

Every response includes the current rate-limit state:

```http theme={null}
X-RateLimit-Limit: 120
X-RateLimit-Remaining: 118
X-RateLimit-Reset: 1751385600      # unix seconds when the window resets
```

## Handling 429s

When a request exceeds the limit, the API returns `429 Too Many Requests` with a `Retry-After` header:

```http theme={null}
HTTP/1.1 429 Too Many Requests
Retry-After: 12
```

```json theme={null}
{ "error": { "code": "rate_limited", "message": "Rate limit exceeded." } }
```

<Tip>
  Back off for at least the number of seconds in `Retry-After` before retrying. For sustained polling, watch `X-RateLimit-Remaining` and pace requests to stay within the window.
</Tip>
