Rate Limits

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 premium accounts only, sendTx and sendTxBatch fall into a separate rate limit bucket described below, and are linked to account type and staked tokens.


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, apply. Different limits, also listed below, 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 accountsPremium accountsStandard accounts
240,000 weighted requests per rolling minute24,000 weighted requests per rolling minute60 requests per rolling minute

Weights:

EndpointWeight
sendTx, sendTxBatch, nextNonce6
publicPools, txFromL1TxHash50
accountInactiveOrders, deposit/latest100
apikeys150
transferFeeInfo500
trades, recentTrades600
changeAccountTier, tokens, tokens/revoke setAccountMetadata, notification/ack, createIntentAddress, fastwithdraw, referral/*3000
tokens/create23000
Other endpoints300

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: 100
  • Subscriptions per connection: 100
  • Total Subscriptions: 1000
  • Max Connections Per Minute: 80 (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)
  • Unique Accounts: 100

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 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.sendTx and sendTxBatch are the only two types constrained by Volume Quota, necessary to create and modify orders.

Staked LITsendTx/sendTxBatch per minute
04000
10005000
30006000
100007000
300008000
10000012000
30000024000
50000040000

Explorer REST API Endpoint Limits

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

Standard Users and Premium Users both have the same limit of 90 weighted requests per rolling minute window.

Weights

EndpointWeight
search3
accounts/*2
Other endpoints1

Transaction Type Limits (per user)

The following limits apply to both Standard and Premium accounts:

Transaction TypeLimit
Default40 requests / minute
L2Withdraw2 requests / minute
L2CreateSubAccount2 requests / minute
L2CreatePublicPool2 requests / minute
L2UpdateLeverage40 requests / minute
L2ChangePubKey300 requests / minute
L2Transfer120 request / minute
L2MintShares1 request / 15 seconds
L2UnstakeAssets1 request / 15 seconds

Rate Limit Exceeding Behavior

If you exceed any rate limit:

  • You will receive an HTTP 429 Too Many Requests error
  • For WebSocket connections, excessive messages may result in disconnection
  • When you're rate-limited on REST, WebSocket connections also get rate-limited, and viceversa
  • For premium accounts only, 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 viceversa.

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.