> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/developers/reference/rate-limits.md).

# Rate Limits

{% tabs %}
{% tab title="Lighter" %}
We enforce rate limits on both REST API and WebSocket usage. These limits apply to both IP address and L1 address. It's important to note that for non-standard account types, sendTx and sendTxBatch fall into a separate rate limit bucket [described below](#sendtx-and-sendtxbatch-limits-premium-and-plus-accounts), and are [linked to account type and staked tokens](https://docs.lighter.xyz/developers/reference/account-types).

***

## REST API Endpoint Limits

The following limits apply to the `https://mainnet.zklighter.elliot.ai/api/v1/` base URL, excluding `sendTx` and `sendTxBatch` where different limits, listed [below](#sendtx-and-sendtxbatch-limits-premium-advanced-and-plus-accounts), apply. Different limits, also listed [below](#explorer-rest-api-endpoint-limits), apply to `https://explorer.elliot.ai/api/`. To bypass IP-based rate limits, clients can authenticate each request so that only L1-based rate limits apply.

| Builder accounts                             | Plus accounts                               | Premium/Advanced accounts                   | Standard accounts              |
| -------------------------------------------- | ------------------------------------------- | ------------------------------------------- | ------------------------------ |
| 240,000 weighted requests per rolling minute | 24,000 weighted requests per rolling minute | 24,000 weighted requests per rolling minute | 60 requests per rolling minute |

### Weights:

| Endpoint                                                                                                           | Weight |
| ------------------------------------------------------------------------------------------------------------------ | ------ |
| `sendTx, sendTxBatch, nextNonce`                                                                                   | 6      |
| `publicPools, txFromL1TxHash`                                                                                      | 50     |
| `accountInactiveOrders, accountActiveOrders, accountOrders, deposit/latest`                                        | 100    |
| `exchangeMetrics`                                                                                                  | 120    |
| `apikeys`                                                                                                          | 150    |
| `transferFeeInfo`                                                                                                  | 500    |
| `trades`                                                                                                           | 200    |
| `recentTrades`                                                                                                     | 600    |
| `changeAccountTier, tokens/*, setAccountMetadata, notification/ack, createIntentAddress, fastwithdraw, referral/*` | 3000   |
| `tokens/create`                                                                                                    | 23000  |
| Other endpoints                                                                                                    | 300    |

While standard accounts rate limits are not weighted, whenever `{premium_weighted_requests}/{endpoint_weight} < {standard_requests}`, the former limit is going to be applied. For example, both Standard and Premium/Advanced accounts will be able to make a maximum of 8 requests per rolling minute to the `changeAccountTier` endpoint.

You can apply for a Builder Account through our Discord support channel. It’s free of charge, but we reserve the right to review applications and verify the intended use. Builder Accounts include higher limits for querying our read-only REST API endpoints, excluding `sendTx` and `sendTxBatch`; otherwise, standard account limits apply. Builders on this tier should authenticate every request, even when not explicitly required in our documentation.

***

## WebSocket Limits

To prevent resource exhaustion, we enforce the following usage limits **per IP**:

* **Connections**: 255
* **Subscriptions per connection**: 500
* **Subscriptions per IP**: 5000
* **Unique Accounts per connection**: 500
* **Unique Accounts per IP**: 5000
* **Max Connections Per Minute**: 255 (not to be confused with channel subscriptions)
* **Max Messages Sent By Client Per Minute**: 200 (sendTx and sendBatchTx are **not** counted here, and follow the same limits as REST requests)
* **Max Inflight Messages**: 50 (sendTx and sendBatchTx are **not** counted here)

Deployments with no downtime might drop your connection, so it's recommended to have proper reconnection logic, in addition to ping/pong logic.

***

## SendTx and SendTxBatch Limits (Premium/Advanced and Plus accounts)

The following limits apply to `sendTx` and `sendTxBatch` requests, regardless of whether you send the requests using REST via HTTP, or via WebSocket. For these two types, we do not enforce IP limits, but only check rate limits at the L1 address level. Standard accounts are still bound to the 60 requests per minute limit. For rate limit purposes, fee credits count as staked LIT. For Premium/Advanced accounts, `sendTx` and `sendTxBatch` are the only two types constrained by [Volume Quota](/developers/reference/volume-quota.md), necessary to create and modify orders.

### Premium/Advanced Accounts

| Staked LIT | sendTx/sendTxBatch per minute |
| ---------- | ----------------------------- |
| 0          | 4000                          |
| 1000       | 5000                          |
| 3000       | 6000                          |
| 10000      | 7000                          |
| 30000      | 8000                          |
| 100000     | 12000                         |
| 300000     | 24000                         |
| 500000     | 72000                         |

### Plus Accounts

| sendTx/sendTxBatch per minute |
| ----------------------------- |
| 4000                          |

***

## Explorer REST API Endpoint Limits

The following limits apply to the `https://explorer.elliot.ai/api/` Base URL.

All account types have the same limit of 90 weighted requests per rolling minute window.

### Weights

| Endpoint        | Weight |
| --------------- | ------ |
| `search`        | 3      |
| `accounts/*`    | 2      |
| Other endpoints | 1      |

***

## Orders

### Pending Orders

Defined as orders with a `pending` status, sent to the server and acknowledged, but not yet included in the order book for matching. For example, take-profit, stop-loss, and TWAP orders (counted as one unit; sub-orders skip limits) fall into this category.

|                  | Per Account | Per Market |
| ---------------- | ----------- | ---------- |
| Standard         | 50          | 10         |
| Plus             | 500         | 100        |
| Premium/Advanced | 1000        | 100        |

### Active Orders

| Account Type     | Per Account | Per Market |
| ---------------- | ----------- | ---------- |
| Standard         | 250         | 30         |
| Plus             | 750         | 250        |
| Premium/Advanced | 1500        | 1000       |

## Transaction Type Limits

The following limits apply to all account types, otherwise,`sendTx` limits apply:

| Transaction Type     | Limit                                         |
| -------------------- | --------------------------------------------- |
| Default              | 40 requests / minute                          |
| `L2Withdraw`         | 2 requests / minute, and 3 requests / 2 hours |
| `L2CreateSubAccount` | 2 requests / minute                           |
| `L2CreatePublicPool` | 2 requests / minute                           |
| `L2UpdateLeverage`   | 40 requests / minute                          |
| `L2ChangePubKey`     | 300 requests / minute                         |
| `L2Transfer`         | 120 request / minute                          |
| `L2MintShares`       | 1 request / 15 seconds                        |
| `L2UnstakeAssets`    | 1 request / 15 seconds                        |
| Fast Withdrawals     | 10 requests / hour                            |

`L2Withdraw` limits are counted per L1 address, so all sub-accounts of the same owner share them.

`L1Withdraw` (calling `withdraw()` on the Lighter contract) is an L1 transaction and is not subject to API rate limits.

***

## Rate Limit Exceeding Behavior

If you exceed any rate limit:

* You will receive `HTTP 429`, or `HTTP 405`
* For WebSocket connections, excessive messages may result in disconnection
* When you're rate-limited on REST, WebSocket connections also get rate-limited, and vice versa
* For Premium/Advanced and Plus accounts, mainnet endpoints fall into a separate bucket from `sendTx` and `sendTxBatch`, meaning that getting rate-limited in one of the two buckets will not affect activity on the other. Put simply, sending too many transactions in a minute will not affect your ability to fetch data from the exchange, and vice versa.

To avoid this, please ensure your clients are implementing proper backoff and retry strategies.

## Cooldown

Depending on whether you have been rate-limited by our firewall, or by the api servers, the cooldown period varies:

* **Firewall**: 60 seconds, static
* **Api servers**: `weightOfEndpoint/(totalWeight/60)`

As an example, making a request to the `account` endpoint (which carries a `weight` of 300) after having exhausted your weighted requests in a given minute window, results in a 750ms cooldown period.
{% endtab %}

{% tab title="Lighter on Robinhood Chain" %}
We enforce rate limits on both REST API and WebSocket usage. These limits apply to both IP address and L1 address. It's important to note that for non-standard account types, sendTx and sendTxBatch fall into a separate rate limit bucket [described below](#sendtx-and-sendtxbatch-limits-premium-and-plus-accounts), and are [linked to account type and staked tokens](/developers/reference/account-types.md).

***

## REST API Endpoint Limits

The following limits apply to the [`https://api.rh.lighter.xyz/api/v1/`](https://api.rh.lighter.xyz/api/v1/) base URL, excluding `sendTx` and `sendTxBatch` where different limits, listed [below](#sendtx-and-sendtxbatch-limits-premium-and-plus-accounts), apply. Different limits, also listed [below](#explorer-rest-api-endpoint-limits-1), apply to [`https://explorerapi.rh.lighter.xyz/api/`](https://explorerapi.rh.lighter.xyz/api/). To bypass IP-based rate limits, clients can authenticate each request so that only L1-based rate limits apply.

| Builder accounts                             | Premium accounts                            | Plus accounts                                | Standard accounts              |
| -------------------------------------------- | ------------------------------------------- | -------------------------------------------- | ------------------------------ |
| 240,000 weighted requests per rolling minute | 24,000 weighted requests per rolling minute | 120,000 weighted requests per rolling minute | 60 requests per rolling minute |

### Weights:

| Endpoint                                                                                                                        | Weight |
| ------------------------------------------------------------------------------------------------------------------------------- | ------ |
| `sendTx, sendTxBatch, nextNonce`                                                                                                | 6      |
| `publicPools, txFromL1TxHash`                                                                                                   | 50     |
| `accountInactiveOrders, deposit/latest`                                                                                         | 100    |
| `apikeys`                                                                                                                       | 150    |
| `transferFeeInfo`                                                                                                               | 500    |
| `trades, recentTrades`                                                                                                          | 600    |
| `changeAccountTier, tokens, tokens/revoke, setAccountMetadata, notification/ack, createIntentAddress, fastwithdraw, referral/*` | 3000   |
| `tokens/create`                                                                                                                 | 23000  |
| Other endpoints                                                                                                                 | 300    |

While standard accounts rate limits are not weighted, whenever `{premium_weighted_requests}/{endpoint_weight} < {standard_requests}`, the former limit is going to be applied. For example, both standard and premium accounts will be able to make a maximum of 8 requests per rolling minute to the `changeAccountTier` endpoint.

You can apply for a Builder Account through our Discord support channel. It’s free of charge, but we reserve the right to review applications and verify the intended use. Builder Accounts include higher limits for querying our read-only REST API endpoints, excluding `sendTx` and `sendTxBatch`; otherwise, standard account limits apply. Builders on this tier should authenticate every request, even when not explicitly required in our documentation.

***

## WebSocket Limits

To prevent resource exhaustion, we enforce the following usage limits **per IP**:

* **Connections**: 255
* **Subscriptions per connection**: 500
* **Subscriptions per IP**: 5000
* **Unique Accounts per connection**: 500
* **Unique Accounts per IP**: 5000
* **Max Connections Per Minute**: 255 (not to be confused with channel subscriptions)
* **Max Messages Sent By Client Per Minute**: 200 (sendTx and sendBatchTx are **not** counted here, and follow the same limits as REST requests)
* **Max Inflight Messages**: 50 (sendTx and sendBatchTx are **not** counted here)

Deployments with no downtime might drop your connection, so it's recommended to have proper reconnection logic, in addition to ping/pong logic.

***

## SendTx and SendTxBatch Limits (Premium and Plus accounts)

The following limits apply to `sendTx` and `sendTxBatch` requests, regardless of whether you send the requests using REST via HTTP, or via WebSocket. For these two types, we do not enforce IP limits, but only check rate limits at the L1 address level. Standard accounts are still bound to the 60 requests per minute limit. For Plus and Premium accounts, `sendTx` and `sendTxBatch` are the only two types constrained by [Volume Quota](/developers/reference/volume-quota.md), necessary to create and modify orders.

### Premium Accounts

| Last 14D Volume | sendTx/sendTxBatch per minute |
| --------------- | ----------------------------- |
| `< $1M`         | 4000                          |
| `> $1M`         | 5000                          |
| `> $10M`        | 6000                          |
| `> $20M`        | 7000                          |
| `> $50M`        | 8000                          |
| `> $200M`       | 12000                         |
| `> $500M`       | 24000                         |

### Plus Accounts

| sendTx/sendTxBatch per minute |
| ----------------------------- |
| 8000                          |

***

## Explorer REST API Endpoint Limits

The following limits apply to the `https://explorerapi.rh.lighter.xyz/api/` Base URL.

All account types have the same limit of 90 weighted requests per rolling minute window.

### Weights

| Endpoint        | Weight |
| --------------- | ------ |
| `search`        | 3      |
| `accounts/*`    | 2      |
| Other endpoints | 1      |

***

## Orders

### Pending Orders

Defined as orders with a `pending` status, sent to the server and acknowledged, but not yet included in the order book for matching. For example, take-profit, stop-loss, and TWAP orders (counted as one unit; sub-orders skip limits) fall into this category.

| Per Account | Per Market |
| ----------- | ---------- |
| 500         | 16         |

### Active Orders

| Per Account | Per Market |
| ----------- | ---------- |
| 1500        | 1000       |

## Transaction Type Limits

The following limits apply to all account types, otherwise, `sendTx` limits apply:

| Transaction Type     | Limit                                         |
| -------------------- | --------------------------------------------- |
| Default              | 40 requests / minute                          |
| `L2Withdraw`         | 2 requests / minute, and 3 requests / 2 hours |
| `L2CreateSubAccount` | 2 requests / minute                           |
| `L2CreatePublicPool` | 2 requests / minute                           |
| `L2UpdateLeverage`   | 40 requests / minute                          |
| `L2ChangePubKey`     | 300 requests / minute                         |
| `L2Transfer`         | 120 request / minute                          |
| `L2MintShares`       | 1 request / 15 seconds                        |
| `L2UnstakeAssets`    | 1 request / 15 seconds                        |
| Fast Withdrawals     | 10 requests / hour                            |

`L2Withdraw` limits are counted per L1 address, so all sub-accounts of the same owner share them.

`L1Withdraw` (calling `withdraw()` on the Lighter contract) is an L1 transaction and is not subject to API rate limits.

***

## Rate Limit Exceeding Behavior

If you exceed any rate limit:

* You will receive `HTTP 429`, or `HTTP 405`
* For WebSocket connections, excessive messages may result in disconnection
* When you're rate-limited on REST, WebSocket connections also get rate-limited, and vice versa
* For premium and plus accounts, mainnet endpoints fall into a separate bucket from `sendTx` and `sendTxBatch`, meaning that getting rate-limited in one of the two buckets will not affect activity on the other. Put simply, sending too many transactions in a minute will not affect your ability to fetch data from the exchange, and vice versa.

To avoid this, please ensure your clients are implementing proper backoff and retry strategies.

## Cooldown

Depending on whether you have been rate-limited by our firewall, or by the api servers, the cooldown period varies:

* **Firewall**: 60 seconds, static
* **Api servers**: `weightOfEndpoint/(totalWeight/60)`

As an example, making a request to the `account` endpoint (which carries a `weight` of 300) after having exhausted your weighted requests in a given minute window, results in a 750ms cooldown period.
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lighter.xyz/developers/reference/rate-limits.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
