API Throttling 101
Mastering the Speed Limits of Modern Trading Infrastructure.
Optimize My Bot’s SpeedTHE SILENT TRADING KILLER
You’ve built the perfect strategy. Your backtests are flawless. But when you go live, your trades don’t execute, or they trigger the dreaded “429: Too Many Requests” error. This is API Throttling. In 2025, with SEBI’s new focus on system stability, brokers have tightened their rate limits to prevent retail algos from overwhelming exchange servers.
**Jayadev Rana**, India’s top-tier Pine Script developer, explains how to dance on the edge of speed without getting your account flagged.
THE THREE LEVELS OF LIMITS
1. The Burst Limit
This is the most critical threshold. For most retail brokers in India (Zerodha, Upstox, Angel One), this is currently set at 10 Orders Per Second. If your bot tries to fire 15 orders in a single second—perhaps to manage a multi-leg basket—the last 5 will be rejected instantly.
2. The Sustained Limit
Brokers also monitor your average speed over a longer window. For example, you might be allowed 10 orders per second, but only 200 orders per minute. This prevents a high-frequency bot from “pegging” the broker’s resources for an extended period.
3. The Compliance Limit
This isn’t about speed; it’s about quality. SEBI monitors your OTR. If you place 1,000 order modifications to get 1 actual trade, you are “spamming” the exchange. High OTR can lead to monetary penalties from the NSE/BSE, which brokers pass directly to you.
HOW TO DETECT A THROTTLE HIT
When you hit a limit, the broker doesn’t just “wait.” They cut the connection. Look for these specific HTTP status codes in your logs:
403 – Forbidden (Your API key is temporarily suspended)
503 – Service Unavailable (Broker server is overloaded)
BEST PRACTICES TO STAY UNDER THE RADAR
- Exponential Backoff: If your code gets a 429 error, don’t retry immediately. Wait 1 second, then 2, then 4. This “backoff” gives the broker’s counter a chance to reset.
- Caching Data: Don’t call the API for “LTP” (Last Traded Price) 100 times a second. Use a **Websocket** to stream data once and read it from your local memory.
- Basket Optimization: Instead of sending 5 separate orders for a spread, use Batch API endpoints (if your broker supports them) to send 5 orders in 1 single request.
API THROTTLING (7 CRITICAL FAQs)
Most Indian brokers have normalized at 10 Orders Per Second. Exceeding this without exchange registration for high-frequency trading (HFT) is a compliance violation.
Yes. Every single API call—whether to place an order, fetch holdings, or check margins—consumes your “Request Quota.” Heavy bots should fetch account data only once at the start of the session.
Usually, no. Retail API limits are fixed to protect the broker’s shared infrastructure. If you need higher speed, you must move to a Proprietary Trading (Prop) setup or register as an institutional player.
As the Best Pine Script Developer in Gujarat, Jayadev can review your bot’s execution logs in 3 minutes to see if you are nearing your broker’s “Hard Ban” threshold.
Interactive Brokers (IBKR) uses a specific “Pacing Violation” rule where they limit you to 50 messages every 5 seconds. Exceeding this triggers a 10-minute lockout. Similar hidden rules exist in Indian brokers under different names.
Indirectly, yes. Our [Supertrend Profitability Analyzer](https://jayadevrana.com/supertrend-profitability-analyzer-by-jayadev-rana/) helps you identify higher-quality setups, reducing the need for “High-Frequency” spamming of low-probability trades.
Don’t build a bot that blindly hammers the API. Visit our Hire Page to build a professional-grade execution system with built-in rate monitoring.
