# Access Restrictions

REST API access is rate limited. Except for order placement endpoints, all endpoints are rate limited by IP. Order placement endpoints are rate limited by the `ORDERS` type.

When you exceed a request rate limit, the request fails with HTTP status code `429`. When you receive `429`, you are responsible for stopping requests and must not abuse the API. Violating the limits results in a `10s` ban.

## Basic Information

The following `intervalLetter` values are used in response headers:

| interval | intervalLetter |
|----------|----------------|
| SECOND   | S              |
| MINUTE   | M              |
| HOUR     | H              |
| DAY      | D              |

The `rateLimits` array in `/api/v3/exchangeInfo` contains REST API rate limits, including but not limited to the REST endpoints in this document. These limits include weighted request limits and order rate limits. For more information about limit types, see the enum definitions.

## IP Rate Limits

Except for order placement endpoints, all endpoints use IP rate limits. These limits are based on IP, not API Key or UID.

Each endpoint has a corresponding `weight`. Some endpoints may have different weights depending on request parameters. Endpoints that consume more resources have higher weights.

Each request includes the following response headers:

| Header | Description |
|--------|-------------|
| `X-USED-WEIGHT-(intervalNum)(intervalLetter)` | Used weight for the current IP within the interval. |
| `X-REMAINING-WEIGHT-(intervalNum)(intervalLetter)` | Remaining weight for the current IP within the interval. |

For example, `X-USED-WEIGHT-1M` indicates the used weight for the current IP within a 1-minute interval.

## ORDERS Rate Limits

Order placement endpoints are rate limited by the `ORDERS` type. This limit is based on the account, that is, `userId`.

Order placement endpoints do not consume IP weight. The IP rate limit count in response headers is `0`.

Each order placement request includes the following response headers:

| Header | Description |
|--------|-------------|
| `X-ORDER-COUNT-(intervalNum)(intervalLetter)` | Used order count for the current account within the interval. |
| `X-ORDER-REMAINING-(intervalNum)(intervalLetter)` | Remaining order count for the current account within the interval. |
