Zerodha Kite API vs Upstox API vs Angel One API: The Complete 2026 Comparison
If you want to build your own trading bot in India, your first real decision is which broker's API to use. Zerodha Kite, Upstox, and Angel One dominate the Indian algo-trading conversation. This complete comparison rates them on fees, stability, documentation, market data, technology (WebSocket and REST), compliance constraints, and practical build quality — with code examples, real cost tables, and a decision framework for your strategy type.
What Each Broker Offers in 2026
- Zerodha Kite Connect: Python, Node, C#, and Go SDKs; REST plus WebSockets; historical and streaming data; used by the widest retail developer community; has survived heavy traffic since 2018.
- Upstox:**
- Angel One SmartAPI: broader API coverage including WebRTA and MF buying, active support for F&O orders with margin details.
Costs for Algo Traders
| Cost | Zerodha Kite | Upstox | Angel One |
|---|---|---|---|
| Equity delivery | Free | Free | 0 |
| Equity intraday | 0.03% or ₹20 min | 0.03% or ₹20 min | 0.03% or ₹15 min |
| F&O | Flat ₹20 per order | Flat ₹20 per order | Flat ₹20 per order |
| SEBI charges | Same across all | Same across all | Same across all |
For high-frequency intraday and F&O algos the flat per-order charges dominate. Above roughly 25,000 orders a month, per-order fee differs from percentage fee, so model your own volumes.
Hands-On: Connecting Each API
Zerodha Kite Connect
from kiteconnect import KiteConnect
kite = KiteConnect(api_key="YOUR_KEY")
print(kite.login_url())
# paste the returned request_token into:
kite.generate_session("YOUR_TOKEN", secret="YOUR_SECRET")
access_token = kite.access_token
print(kite.positions())
Upstox API (v2)
import requests
headers = {"Accept": "application/json", "Api-Version": "2.0"}
url = "https://api.upstox.com/v2/login/authorization/dialog"
# pay the login, then exchange the code for an access token
quote = requests.get("https://api.upstox.com/v2/market-quote/quotes?instrument_key=NSE_EQ%3AINE002A01018",
headers={"Authorization": "Bearer " + token}).json()
Angel One SmartAPI
import requests
s = requests.Session()
headers = {"Content-Type": "application/json"}
login = s.post("https://apiconnect.angelbroking.com/rest/auth/angelbroking-user/v1/loginByPassword",
json={"clientcode": "YOUR_ID", "password": "YOUR_PWD"},
headers={"X-UserType": "USER"}).json()
token = login["data"]["jwtToken"]
Market Data Quality and Limits
All three stream via WebSocket, but the practical differences matter:
- Zerodha: tick-level WebSocket for your instruments; the same feed powers the Kite terminal. Historical candles are reliable and well-documented.
- Upstox: OI, LTP, market depth, and OHLC through the v2 API; websocket in refresh mode after 60 seconds is available only with the new filters.
- Angel One: historical and live market-depth streams; several official wrappers exist for Python.
For high-frequency strategies the WebSocket latency is nearly identical; the deciding factor is documentation quality and the volume/OHLC flags you actually need.
Stability and Tardiness
Zerodha's Kite has weathered NSE market-wide outages without failing its developer connectors. Upstox has endured intermittent scaling hiccups during high-volatility sessions. Angel One's SmartAPI historically had more granular rate limits on the free tier around FNO quotes. Check the live status pages before heavy trading days.
Compliance and Risk Rules for Bots
- Sessions expire; implement an auto-refresh scheduler rather than re-login each call
- All broker APIs reject orders during exchange downtime; add retry-and-alert logic
- Order types: only NSE-approved ORDER/price types exist; bracket orders are broker-level and not universally available via API
- Keep your bot under exchange concurrency rules — don't send 500 identical orders at once just because you can
The Decision Framework
| Use Case | Recommended |
|---|---|
| Clean Python SDK + biggest community | Zerodha Kite |
| Good v2 API + lower per-order for your volume | Upstox |
| Multiple products incl. MF and WebRTA | Angel One |
| Backtesting with streaming historicals | Zerodha or Upstox |
API Authentication Flow Differences
Authentication architecture is where the three brokers differ most in practice.
- Zerodha: OAuth-based; you generate a request token from the login URL, exchange it for an access token with your secret, and optionally configure a TOTP-enabled Kite session. The token expires daily unless re-issued, which forces careful scheduler design.
- Upstox: v2 uses OAuth with an authorization dialog, a client secret, and redirect URLs; refresh tokens extend the session and need manager-level handling because access tokens are short-lived.
- Angel One: SmartAPI uses a username/password plus TOTP login endpoint that returns a JWT; sessions expire in a matter of hours and require automatic re-login with the correct TOTP seed stored.
For bot reliability, this difference changes your code: Kite and Upstox mostly run for the day once authorized, whereas Angel's short JWT lifetime means your scheduler must refresh tokens before expiry or your morning orders silently fail. Budget for that in every deployment.
Order Placement: A Foot-to-Foot Comparison
# Zerodha
kite.place_order(tradingsymbol="HDFCBANK", exchange="NSE",
transaction_type="BUY", quantity=10, product="CNC",
order_type="MARKET")
# Upstox
requests.post("https://api.upstox.com/v2/order/place",
json={"instrument_key": "NSE_EQ|IN...", "quantity": 10,
"order_type": "MARKET", "product": "D", "transaction_type": "BUY"},
headers={"Authorization": "Bearer " + token, "Api-Version": "2.0"})
# Angel One
requests.post("https://apiconnect.angelbroking.com/rest/secure/angelbroking/order/v1/placeOrder",
json={"variety": "NORMAL", "tradingsymbol": "HDFCBANK-EQ", "symboltoken": "1333",
"exchange": "NSE", "transactiontype": "BUY", "quantity": 10,
"ordertype": "MARKET", "producttype": "DELIVERY", "duration": "DAY"},
headers={"Authorization": "Bearer " + jwt, "X-UserType": "USER"})
The three payload schemas differ in field names (transaction_type vs transactiontype), instrument identifiers (tradingsymbol vs instrument_key vs symboltoken), and product-type vocabularies (CNC/D vs DELIVERY). They cannot share one adapter without mapping tables — a hidden cost of multi-broker trading.
Data Histories and Backtesting Support
- Kite Connect: historical candles via the `get_historical_data` endpoint (intraday 1/3/5/10/15/30/60 minute, daily); widely used in community backtesting libraries.
- Upstox: v2 historical data endpoints with same granularities plus OHLC aggregates; a fast refresh-cycle websocket for near-real-time quotes.
- Angel One: historical snapshots in the SmartAPI and a market-data lifetime model that prices low-frequency data for retail plans, higher-frequency tiers cost separately.
If your strategy backtests on 5-minute bars, confirm the endpoint you use supports that granularity for the full in-sample period rather than only recent weeks, since fees and limits differ by plan.
Rate Limits, Governance and Order Throttling
Every Indian broker's API has a concurrency ceiling protecting the exchange. Typical guidance: limit OTP or session endpoints to a few requests per minute; place order endpoints with a modest QPS; avoid hammering websocket restarts during market hours; never loop unlimited iterations. A good production posture is a small client-side queue with exponential backoff, a circuit breaker that pauses the bot on repeated 429s, and an alert feed to Telegram. Zero retries on the default, three retries with backoff on the limit, and kill-switches are the difference between a hobby bot and one you can trust with capital during a crash session.
WebSocket Streaming Compared
- Zerodha: the Kite ticker streams LTP, volume, OI in compact binary frames; known and battle-tested at scale
- Upstox: v2 websocket with mode toggles (ltp/quote/full); requires an "updated" refresh loop after subscribing, or ticks stall
- Angel One: SmartAPI data-socket streams tick data with a refresh token handshake; full quote mode carries more payload per tick
For an intraday alpha that needs every tick, your latency budget depends on both the feed and your decode speed. For most swing automation, any of the three is fine, and the deciding factor moves to stable historical extraction and cheaper limits.
Compliance Essentials for Indian Algo Traders
- Register the endpoint with your broker's policy; all three require explicit algo registration disclosures
- Keep every order log for a statutory minimum period — exchanges and SEBI audit algos post-trade
- Reregister or revalidate credentials on any change to your bot
- Prefer API keys scoped to order placement only for live and separate read-only keys for research
Algo compliance is an active SEBI focus; a bot that suddenly spikes order frequency without explanation draws manual review, and unregistered bots have been disciplined. Treat registration as part of the deployment checklist, not a formality.
Decision Table: Which API for Your Use Case?
| Scenario | Best Pick | Why |
|---|---|---|
| First bot, quickest ramp, community help | Zerodha Kite | Most docs, most SDKs, most StackOverflow |
| Institutional-style REST with clean refresh tokens | Upstox | v2 API is tidy and versioned cleanly |
| Low-cost intraday with MF and WebRTA | Angel One | Broader product coverage in one SDK |
| Heavy historical backtesting on Indian equities | Zerodha / Upstox | Mature historical endpoints and granular candles |
| Automated F&O strategies | Zerodha (F&O volume) / Upstox | Both support equity index options well; check fees |
Final note: fees and endpoints change; check each broker's official developer docs before building. Whatever you choose, paper-trade the full pipeline on the broker's test/sandbox account first and keep a fallback manual execution path in the app for the weeks when an API hiccups.
Pricing Deep Dive: Where the Money Actually Goes
For an algo trader the relevant question is per-order cost at your volume, not the headline. At a flat ₹20 per order with, say, 100 roundtrip orders/day, annualized brokerage is ₹20 x 2 x 100 x 21 x 12 = ₹10.08 lakh — while a percentage scheme on the same notional may be lower for very large contracts. A smaller account trading 1-10 orders/day and holding equity delivery should choose Zero-brokerage or the zero-delivery plan; an intraday F&O bot paying order-fee is better off under a flat scheme aggregated per order. Model your own order mix against each broker's schedule before signing.
Margin Rules and SPAN Margining with APIs
All three brokers enforce the exchange's SPAN margin system with their own exposure add-ons. Practical API consequences: a limit order rejected for insufficient margin is the most common silent failure in a bot; your code must precompute margin availability, watch the port-level exposure, and prefer reduced-size child orders over full-sized retries. Note the intraday (MIS) versus delivery (CNC) product flags: choosing the wrong product can auto-square a live position at end of day, a failure mode most retailers meet exactly once.
Pairing with AI Models: The Build in Practice
An LLM-based trade planner can emit a structured decision (instrument, side, size, stop). You validate that decision through your model of the day's risk budget and then pass the order through the broker API. Keep the two layers strictly separated: research models live in research code, the order gateway lives in trading code, and the only shared artifact is the order object. Nothing a research model writes should touch the market without the trading gateway's checks — and ideally a human kill-switch for the first weeks.
Frequently Asked Questions
Which broker API is fastest?
For typical retail and mid-frequency bots the differences are sub-10ms, immaterial versus exchange and network latency. Speed only matters for high-frequency order placement, where no retail retail API is competitive with co-located institutional infrastructure.
Can I switch brokers after building a bot?
Yes, but budget for integration because endpoints and payload schemas differ across Kite/Upstox/Angel. A thin adapter layer in your code (one interface, three implementations) makes later migration cheap.
Do all three allow algo trading legally?
Yes, when you register as an algo through the broker's required declaration flow and keep your bot inside the exchange's order rules. Unregistered or order-bursting bots invite review; comply up front.
Which is best for a beginner bot builder?
Zerodha Kite for the community, documentation, and SDK quality; then treat Upstox as the low-cost alternative once your strategy needs tighter order economics. Paper-trade first — every broker offers a simulator in some form.
TL;DR: Pick Your API
- Newest builder, biggest community, best docs: Zerodha Kite
- Clean v2 REST, refresh tokens, neat order payloads: Upstox
- Multiple products (MF, WebRTA) in one SDK: Angel One
- Heavy backtesting on historical candles: Kite or Upstox
- Every plan: paper-test the whole pipeline on sandbox first, keep manual fallback
Final Recommendation
For most readers building their first Indian algo system, start with Zerodha Kite: the documentation, SDK maturity, and community mean you will debug faster. Move to Upstox when your order volume makes fee-per-order matter materially. Choose Angel One when you want the widest product surface (MF, WebRTA) in one API. Whichever you pick, sandbox-test the full pipeline end to end, keep a manual kill-switch in production, and retrain your upstream models on the same clean data discipline. The API is plumbing; your strategy, risk rules, and logs are the product.
Wrapping Up
You now know how the three APIs differ, where the real costs sit, how the auth flows shape your bot, and which broker fits which use case. The remaining variable is your own practice: build on testnet, integrate the full pipeline, keep explicit logs, and respect the exchange's margin and order rules. An algo that runs for years in Indian markets doesn't need the cleverest model — it needs clean data, honest validation, simple risk, and an API connection whose failure modes you have already seen in the sandbox.
SEBI Disclaimer
Algorithmic trading carries substantial risk of loss. Broker API features and fees change frequently; verify current documentation and pricing on each broker's official site. The information in this article is educational and is not investment or financial advice.