# Rate Limits

Two rate-limit layers protect the API:

* **Reads** are limited **per IP**.
* **Writes** are limited **per account address** — Agent Keys share the main account's budget.

{% hint style="info" %}
**No progressive bans, no IP/address blacklisting.** The system pushes back via headers and (for reads) HTTP 429; writes get queued and slowed instead of rejected.
{% endhint %}

## Read Limits (Per IP)

Sliding window, **1200 weight units per minute**.

| Operation class                               | Weight |
| --------------------------------------------- | ------ |
| Lightweight query (single resource)           | 1      |
| Heavy query (order book, all positions, etc.) | 5      |
| Market data (klines)                          | 2      |

## Write Limits (Per Address)

Write limits are bound to the on-chain address. Each operation type (place / cancel / modify) has its own **independent counter**. Batch requests count as **N** units, where N is the batch size.

| Tier         | Place (per second) | Cancel (per second) | Modify (per second) |
| ------------ | :----------------: | :-----------------: | :-----------------: |
| Default      |         50         |         100         |          50         |
| VIP 1        |         100        |         200         |         100         |
| VIP 2        |         200        |         400         |         200         |
| Market Maker |         500        |         1000        |         500         |

## Response Headers

Every response includes:

| Header                  | Meaning                                |
| ----------------------- | -------------------------------------- |
| `X-RateLimit-Limit`     | Current window's total budget.         |
| `X-RateLimit-Remaining` | Remaining budget in this window.       |
| `X-RateLimit-Reset`     | Window-reset time (Unix milliseconds). |

## Over-Limit Behavior

| Layer           | Behavior                                                             |
| --------------- | -------------------------------------------------------------------- |
| Read (IP)       | HTTP `429`, request rejected.                                        |
| Write (address) | Throttled — request is **queued and slowed**, not outright rejected. |

{% hint style="warning" %}
**Retry strategy:** plan for exponential backoff on `429`. For writes, the throttling shows up as higher latency rather than failures — the right reaction is to back off your submission rate rather than retry-storm.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.lynxtrade.world/conventions/rate-limits.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
