What are API rate limits?
- Author
- CRYPTO PORT Editorial
- Published
- Updated
- Reading time
- 5 min
In short
A rate limit caps how many requests you may send to an exchange API within a given period. It protects overall stability; exceeding it leads to rejections or temporary restrictions. The thresholds and how they are counted differ by operator, so build against their published specification.
Key points
- A cap on requests within a time window
- Exceeding it brings rejections or temporary blocks
- Some venues count weighted cost, not raw calls
- Limits and counting rules differ by operator
Definition
A control that caps how many requests, or how much processing cost, an exchange API will accept per unit of time — typically applied per IP address, per API key or per endpoint.
APIs can be hit fast by anyone, so without limits a few users would monopolise capacity and destabilise the service. Hence a per-window cap. Some venues count raw calls; many assign a weight per endpoint and cap the total cost.
The usual behaviour on breach is an error telling you to wait. Retrying immediately instead of backing off can tighten the restriction further or suspend the key. Client code should implement backoff and retry as a matter of course.
For frequently updating data such as books and tickers, a streaming feed like WebSocket stays clear of request limits and arrives sooner than repeated polling. Order placement and cancellation are harder to predict, so calling them only when needed leaves headroom.
Bear in mind that during sharp moves the whole venue is under load, not just your client. A design that runs near the cap in calm conditions is the one most likely to stall exactly when you need it.
Watch out for
- · Hammering retries after a breach can get the key suspended
- · Under market stress the venue is loaded too; a calm-market design may not hold
- · Thresholds and counting rules vary — build from the official specification