What is API trading?
API (Application Programming Interface) trading lets you connect your own software, scripts, or third-party platforms to your broker's order management system. Instead of clicking buttons on a trading app, your code places orders, fetches market data, and manages positions programmatically.
Common use cases include automated strategy execution, portfolio rebalancing bots, options selling systems, and connecting to platforms like TradingView, Streak, or custom Python scripts.
Who offers free APIs
- Upstox: Free API access with good documentation. WebSocket support for real-time data. No monthly fee.
- Dhan: Free API with a focus on options traders. Supports order placement, market data, and portfolio access at no cost.
- Fyers: Free API access with REST and WebSocket endpoints. Popular among retail algo traders for its clean documentation.
- Angel One: SmartAPI is free to use. Large community and third-party library support in Python and Node.js.
For these brokers, "free API" means no separate subscription charge. You still pay normal brokerage on every order placed through the API.
Who charges for API access
- Zerodha (Kite Connect): ₹2,000 per month. This is a significant recurring cost and only makes sense if your trading volume justifies it. Historical data API costs an additional ₹2,000/month.
- 5paisa: ₹500 per month for API access. More affordable, but the API documentation and reliability are considered less polished than competitors.
Zerodha's API pricing is the most discussed in the Indian algo trading community. At ₹24,000 per year, a casual algo trader spending ₹50,000–₹1,00,000 on brokerage might find it hard to justify. But for active traders doing hundreds of orders daily, it's a small fraction of total costs.
API brokerage vs regular brokerage
Most brokers charge the same brokerage for API orders as manual orders. There's no "algo premium" on the brokerage itself. However, it's worth confirming — some brokers have different rate cards for high-frequency API usage or institutional algo accounts.
The real cost difference comes from volume. Automated systems tend to trade more frequently than manual traders, so even zero-API-fee brokers earn more from algo users through higher aggregate brokerage.
Things to consider before algo trading
- Rate limits: Every broker limits how many API calls you can make per second/minute. Exceeding limits causes order rejections.
- Reliability: Free APIs sometimes have downtime or latency spikes during volatile markets. Paid APIs (like Zerodha's) tend to be more robust.
- Exchange regulations: SEBI requires all algo strategies used by retail traders through broker APIs to be approved by the exchange. This is evolving and may affect how you deploy strategies.
- Hidden costs: Server hosting, data feeds, backtesting platforms, and your own development time all add up beyond the API fee itself.