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

> ## Agent Instructions
> To integrate AGG, start with Quickstart: REST (https://docs.agg.market/quickstart/rest), then Order lifecycle & statuses (https://docs.agg.market/concepts/order-lifecycle).
> Track every trade until it reaches a terminal status. Before retrying a failed or timed-out call, read Errors, retries & idempotency (https://docs.agg.market/concepts/errors).
> The API reference is generated from https://docs.agg.market/openapi/openapi.json.

# Rate limits

> Per-key and per-endpoint request limits, and how to handle a 429

> [!NOTE]
>
> Need higher limits? Email [support@agg.market](mailto:support@agg.market) with your app ID, the
> API key name (never the secret), the endpoints you call, and your expected peak requests per
> minute. We can raise limits per key and per endpoint group.

## Overall limits

| Caller | Limit |
| - | -: |
| Your backend, with a valid `x-app-api-key` | 18,000 requests per minute per key |
| Browsers and other clients without a key | 1,000 requests per minute per IP |

Each API key has its own budget, separate from your other keys and your browser traffic.
Browser traffic is also limited per user, so one busy user cannot use up the limit for the rest
of your app. See [Server API keys](/environments.md#server-api-keys).

## Endpoint limits

Some endpoints have their own per-minute limits on top of the overall limit. A higher key limit
does not raise these.

| Endpoint group | Endpoints | Per IP | Per user | Per API key |
| - | - | -: | -: | -: |
| Event bootstrap | `GET /venue-events/{id}/bootstrap` | 120 | 240 | 1,200 |
| Chart manifest | `GET /charts/history/manifest` | 240 | 480 | 2,400 |
| Chart bars | `GET /charts/bars` | 120 | 240 | 1,200 |
| Search | `GET /search` | 120 | 240 | 1,200 |
| Discovery | `GET /venue-events`, `GET /venue-events/{id}`, `GET /venue-markets`, `GET /venue-market-outcomes`, `GET /crypto/recurring-markets`, `GET /sports/live`, `/correlated-markets/*`, `GET /news-feed/*`, `GET /leaderboard/*` | 600 | 300 | 3,000 |
| Prices | `GET /midpoints`, `GET /orderbooks` | 600 | 600 | 1,200 |
| Outcome order books | `GET /orderbooks/outcomes`, `GET /orderbook/outcome/{outcomeId}` | 600 | 1,200 | 6,000 |
| Quotes | `GET /orderbook/{outcomeId}/route`, `POST /execution/withdraw/preview`, `POST /execution/withdrawable/quote` | 600 | 600 | 1,500 |
| Portfolio | `GET /execution/status`, `GET /execution/positions`, `GET /execution/orders`, `GET /execution/balances`, `GET /execution/deposit-addresses`, `GET /execution/withdrawals/{id}`, `GET /users/activity` | 600 | 600 | 3,000 |
| Trading | `POST /execution/fill`, `POST /execution/orders`, `POST /execution/limit-orders`, order cancels, `POST /execution/redeem`, `POST /execution/withdraw`, `POST /execution/sync-balances` | 120 | 120 | 6,000 |

All endpoints in a group share one budget. For example, a fill and a cancel both count toward
Trading.

Order-book reads count one unit per outcome. A `GET /orderbooks/outcomes` call for 10 outcomes
uses 10.

Sign-in and email endpoints have tighter limits to stop abuse. A user can receive up to 10
magic-link emails per hour.

## Handling a 429

A `429` includes a `Retry-After` header in seconds. Wait at least that long before you retry.
Do not cache a `429`, and do not treat it as empty data.

A `403` from a high-volume source can mean our network firewall blocked it. Back off for a few
minutes. If one server IP will send a lot of traffic, tell us before you launch.

To stay under the limits:

* Use the [orderbook socket](/recipes/websocket-orderbook.md) instead of polling order books.
* Debounce typeahead before calling `GET /search?mode=instant`.
* Route reads that fan out for many users through your backend, with an API key.

Before retrying a write, read [Errors, retries & idempotency](/concepts/errors.md).


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