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

# Rate Limits

> Your rate, your burst, and what to do when you hit them.

Each key has its own rate, set by Nomos: 600 requests a minute unless agreed otherwise. The bucket holds a tenth of a minute's worth, so you can burst, then settle to the rate.

| Limit | Default |
| - | - |
| Requests a minute | 600 |
| Burst | 60 (a tenth of a minute's worth, at least 10) |
| Requests in flight at once | 4 |
| Streams open at once | 2 |

Every answer carries `x-ratelimit-limit` (your rate a minute) and `x-ratelimit-remaining` (what is left in the bucket). Past the rate, or past 4 requests at once, the API answers **429** with a `Retry-After` header in seconds. Wait that long and retry.

A **503** means a part of the index is not ready yet (a restart, a feature being switched on): retry after a few seconds with backoff. Treat a **500** the same way, a few times at most.

Pages are big on purpose (up to 1,000 trades, 50,000 fills), so a well-built client rarely needs the full rate. Ask Nomos if you need more.

## A Client That Waits and Retries

<CodeGroup>
  ```python Python theme={null}
  import os, time, requests

  session = requests.Session()
  session.headers["Authorization"] = f"Bearer {os.environ['CODEX_KEY']}"
  BASE = "https://codex-api.nomos.trade"

  def get(path, **params):
      for attempt in range(6):
          r = session.get(BASE + path, params=params, timeout=30)
          if r.status_code == 429:
              time.sleep(int(r.headers.get("Retry-After", "1")))
              continue
          if r.status_code in (500, 503):
              time.sleep(min(2 ** attempt, 30))
              continue
          r.raise_for_status()
          return r.json()
      r.raise_for_status()
  ```

  ```javascript JavaScript theme={null}
  const BASE = "https://codex-api.nomos.trade";
  const headers = { Authorization: `Bearer ${process.env.CODEX_KEY}` };
  const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

  export async function get(path, params = {}) {
    const url = BASE + path + "?" + new URLSearchParams(params);
    for (let attempt = 0; attempt < 6; attempt++) {
      const res = await fetch(url, { headers });
      if (res.status === 429) {
        await sleep(1000 * Number(res.headers.get("retry-after") ?? 1));
        continue;
      }
      if (res.status === 500 || res.status === 503) {
        await sleep(Math.min(2 ** attempt, 30) * 1000);
        continue;
      }
      if (!res.ok) throw new Error((await res.json()).error);
      return res.json();
    }
    throw new Error("gave up after 6 tries");
  }
  ```
</CodeGroup>

The recipes in these docs use this `get()`.


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