Rate Limit Definition: A rate limit is a cap on how many requests a program may send to an API within a set period, such as 1,200 requests per minute. Once the cap is reached, the service rejects further requests until the window resets, which protects its servers and keeps capacity available for every user.
What Is a Rate Limit?
Exchanges serve millions of requests from bots, apps and websites at once. If one program could send unlimited requests, a single faulty script could slow the matching engine for everyone or crowd out other traders. Rate limits stop that by setting a budget per user, per API key or per IP address, the numeric address of the computer sending the request.
Budgets come in different shapes. Some services count plain requests, while others give each endpoint a weight, so a cheap price check might cost 1 unit and a full order history 20. Order placement often has its own separate limit, such as 50 orders per 10 seconds, because new orders put the heaviest load on the system.
Anyone running a trading bot meets rate limits sooner or later. They are listed in an exchange’s API documentation, and many responses include headers, extra fields that report how much of the budget is already used.
How Does a Rate Limit Work?
Most exchanges use a fixed or sliding window. In a fixed window, the counter resets at set points, for example at the start of every minute. A sliding window looks back over the last 60 seconds at each new request, which stops a program from firing a full budget at 0:59 and another at 1:01.
Another common design is the token bucket. Picture a bucket holding 100 tokens that refills at 10 tokens per second, where each request spends one token. A program can burst up to 100 requests at once, but over time it cannot average more than 10 per second, because that is how fast tokens return.
Here is how a strategy runs into trouble. Suppose an exchange allows 1,200 request units per minute, and your bot checks prices on 20 pairs through a trading API once per second. Those checks alone cost 1,200 units a minute, the entire budget, before the bot sends a single order.
During a sharp move the bot decides to cancel 10 open orders, but every cancel request comes back with an HTTP 429 error, the standard code for “Too Many Requests”. The orders stay live while the price runs through them, and the bot ends up filled at levels it was trying to leave. Streaming prices over a WebSocket connection, which does not count against the per-request budget on most exchanges, would have left the whole allowance free for order management.
Types of Rate Limits
- IP-based limits count all requests coming from one computer, regardless of which account sent them.
- Key or account limits apply to a single API key or account, so several keys on one account may share one budget.
- Endpoint weights charge heavy requests, such as deep order book snapshots, more units than light ones.
- Order limits cap new orders per second or per day, often alongside a ratio of orders to completed trades.
Rate Limit vs. Throttling
Both terms describe controlling request traffic, but they act differently. A rate limit is a hard cap: requests above it are rejected outright and must be sent again later. Throttling slows requests down instead, queueing or delaying them so they still go through, only later than the program expected.
For traders the difference shows up in timing. A rejected order is obvious because the error comes back at once, while a throttled order may arrive after the price has moved, which shows up later as slippage rather than an error message.
Why Is a Rate Limit Important for Traders?
Limits set the real speed of any automated strategy. A plan that needs to update 30 orders every second simply cannot run on an exchange that allows 10 orders per second, however good the logic is. Checking the documented limits before building a strategy saves time spent on ideas the exchange will never accept.
Hitting the cap is most costly at the worst moment. Request volume spikes when prices move fast, which is exactly when a bot needs to cancel or adjust orders. Good code tracks its remaining budget, keeps a reserve for cancellations and backs off with growing pauses after a 429 error instead of retrying instantly.
Repeated violations carry a further risk. Many exchanges respond to persistent overuse with temporary bans lasting minutes or hours, and a banned key cannot close positions either. Strategies such as arbitrage, which depend on fast reactions across several venues, need to fit inside every venue’s limits at once.
Key Takeaways
- A rate limit caps how many API requests a program may send in a set period, and requests above the cap are rejected.
- Exchanges measure limits per IP address, per API key or account, per endpoint weight and per number of orders.
- Fixed windows, sliding windows and token buckets are the common ways services count and refill the allowance.
- Wasting the budget on frequent price checks can leave no room to cancel orders during a fast market.
- Streaming data, keeping a reserve for cancellations and backing off after errors keep a bot inside its limits.
What happens when I hit a rate limit?
The exchange rejects further requests, usually with an HTTP 429 "Too Many Requests" error, until the time window resets. Repeatedly ignoring the error can lead to a longer temporary ban for your IP address or API key.
Do rate limits apply to manual trading?
Rarely in a way you would notice, because a person cannot click fast enough to reach them. They matter for bots, scripts and third-party tools that send requests automatically.
Can I ask an exchange for a higher rate limit?
Some exchanges raise limits for accounts with high trading volume or for registered market makers. Most retail traders get more from reducing wasted requests, for example by switching price checks to a streaming connection.