Indian Broker API Landscape¶
Reviewed first-party API catalog, integration surface, static-IP concerns and selection checklist.
Part 20 of 24 in the ServLoci algo/options trading notebook series — full index in notebooks/README.md.
Setup¶
# Get your dedicated static IPv6 + SOCKS5 credentials free:
# https://comm.servloci.in/register (or /auth/google?free=1 for an instant trial)
# Your api_key / api_secret pair shows up in the portal after signup:
# https://comm.servloci.in/user
!pip install -q "requests[socks]"
!curl -sL https://comm.servloci.in/sdk/servloci.py -o servloci.py
import os
from servloci import ServLoci
SERVLOCI_API_KEY = os.environ.get("SERVLOCI_API_KEY", "dhan:1000000001") # broker:client_id
SERVLOCI_API_SECRET = os.environ.get("SERVLOCI_API_SECRET", "") # from the portal — leave blank to run this notebook in demo mode
sl = None
if SERVLOCI_API_SECRET:
sl = ServLoci(api_key=SERVLOCI_API_KEY, api_secret=SERVLOCI_API_SECRET)
print("ServLoci configured:", sl.host, sl.port)
else:
print("SERVLOCI_API_SECRET not set — running in demo mode (no live proxy calls).")
Scope and how to read the list¶
This is a reviewed catalog of Indian retail brokers with public, first-party API documentation, checked 12 August 2026. It is not a claim that every SEBI-registered broker exposes a retail API. “ServLoci route” means a maintained broker allowlist exists today; “adapter” means the same OHLCV/indicator pattern works, but the broker origin still needs explicit ServLoci support before order traffic can be proxied.
Broker plans, rate limits, authentication and static-IP rules change. Recheck the linked official source before production use. Never send broker passwords, PINs, TOTP seeds or access tokens to ServLoci.
Public broker API inventory¶
| Broker / API | What the official API exposes | Typical auth | Official source | ServLoci route |
|---|---|---|---|---|
| Zerodha Kite Connect | Orders, portfolio, WebSocket quotes, paid historical data | OAuth-like daily request/access token | Kite Connect | Maintained (kite) |
| Upstox Developer API | Orders, portfolio, market data, sandbox, WebSockets | OAuth 2.0 | Upstox docs | Maintained (upstox) |
| DhanHQ v2 | Orders, portfolio, quotes, historical data, live feed | Client ID + access token | DhanHQ docs | Maintained (dhan) |
| FYERS API v3 | Orders, history, data socket and order socket | App ID + OAuth access token | FYERS support | Maintained (fyers) |
| Groww Trading API | Order and market-data APIs with Python/cURL docs | API key/access token flow | Groww docs | Maintained (groww) |
| ICICI Direct Breeze | Orders, portfolio, historical data and streaming | API key + secret + session | Breeze docs | Maintained (icicidirect) |
| Kotak Neo API v2 | Orders, portfolio and quotes via official SDK | Consumer key + TOTP/MPIN session | Kotak Neo SDK | Maintained (kotak, SOCKS5) |
| Angel One SmartAPI | Orders, portfolio, quotes, WebSocket and postbacks | API key + client login/TOTP tokens | SmartAPI docs | Adapter; route not yet maintained |
| Alice Blue ANT | Trading, portfolio and market-data APIs | App/client session | ANT docs | Adapter; route not yet maintained |
| 5paisa Xstream | Order management, portfolio and market-data APIs | App credentials + client session | Xstream docs | Adapter; route not yet maintained |
| Shoonya / Finvasia | Orders, GTT, portfolio, REST/WebSocket market data | Vendor/app key + user session | Shoonya docs | Adapter; route not yet maintained |
| Flattrade Pi | Orders, GTT/OCO, portfolio, WebSocket, postbacks | API key/secret + access token | Pi v2 docs | Adapter; route not yet maintained |
| SAMCO Trade API v3.2 | Orders, portfolio, market data and WebSocket | OAuth 2.1 or direct session token | SAMCO docs | Adapter; route not yet maintained |
| Tradejini API v2 | Orders, chart data, portfolio and WebSockets | OAuth/app access token | Tradejini docs | Adapter; route not yet maintained |
| Motilal Oswal Trading API | Orders, reports, market and historical data | Client/app authentication | MO API docs | Adapter; route not yet maintained |
| Sharekhan Trading API | Orders, portfolio and market data | App/OAuth session | Sharekhan docs | Adapter; route not yet maintained |
| Mastertrust REST API | Orders, portfolio, historical/live data, WebSocket | OAuth 2.0 | Mastertrust docs | Adapter; route not yet maintained |
| Nuvama API Connect | Orders, portfolio, REST data and streaming | OAuth/app session | Nuvama API Connect | Adapter; route not yet maintained |
“Free API” can still exclude exchange-licensed real-time data, historical depth, account charges, brokerage, cloud egress or an external static IPv4. Compare the exact endpoint and plan you need—not the headline price.
Selection checklist¶
- Confirm the instruments and exchange segments you trade.
- Confirm candle intervals, history depth, corporate-action handling and live-feed entitlement.
- Check documented order limits, reconnect behavior, idempotency support, sandbox/paper support and postbacks.
- Verify current static-IP and OAuth/2FA policy. From 1 April 2026, Indian retail-algo implementation rules materially affect client-direct API order traffic.
- Test rejection, timeout, partial-fill and duplicate-order recovery before measuring latency.
- Keep analysis/data reads direct. Route only the broker calls that must originate from the approved static address.
Start with a read-only profile or funds endpoint, then paper/dry-run, then the smallest permitted live order. An API feature table is not a reliability ranking or a recommendation to trade.
« Previous: Capstone: End-to-End Algo Bot
Next: Top 50 Technical Indicators »
Try the concepts above interactively: Options Strategy Builder · Docs · Get your static IP