Most Python algo trading guides you will find online are built for Alpaca, Interactive Brokers, or Binance. They cite FAA Part 107 equivalent US regulations, reference FINRA’s Pattern Day Trading rule, and give you code examples that will not run against a single Indian broker without being rebuilt from scratch.
This guide is different. Every broker mentioned here is Indian. Every regulatory reference is SEBI. Every salary figure is in rupees, sourced from Glassdoor India submissions dated January–April 2026. The Polars → VBT → NautilusTrader stack from the original article is technically sound and kept here in full — but anchored to NSE/BSE data formats, Indian broker WebSocket APIs, and the SEBI framework that became mandatory from April 1, 2026.
If you are a Python developer looking to build, backtest, or deploy algorithmic trading strategies in Indian markets, this is where to start.
Why Indian Algo Trading Is Structurally Different
Three things make the Indian algo trading environment distinct from every guide written for US or European markets.
You do not have direct exchange access. In India, retail traders and developers cannot connect directly to NSE or BSE. All orders must route through a registered stockbroker who holds exchange membership. Your Python script connects to a broker API; the broker connects to the exchange. This broker-intermediated model has regulatory and latency implications that shape every architecture decision downstream.
SEBI became the regulator of your code. SEBI’s circular (SEBI/HO/MIRSD/MIRSD-PoD/P/2025/0000013), issued February 4, 2025, came into full mandatory effect on April 1, 2026. It fundamentally changed the legal status of any automated strategy running through an Indian broker API. The details are covered in a dedicated section below — but the short version is that the grey area in which most retail Python algo traders operated for years no longer exists.
India’s derivatives market is the largest in the world by contract volume. NSE’s F&O (Futures and Options) segment handles a staggering number of contracts daily, predominantly from retail participants. SEBI’s own research found that individual traders reported net losses of ₹1.05 lakh crore in FY25 alone — a 41% widening year-on-year. This context explains why the regulatory tightening happened and why the broker-API compliance requirements are not going away.
The Indian Broker API Landscape: What You Are Actually Choosing Between
The broker API you choose determines your data quality, rate limits, execution reliability, cost per trade, and which third-party libraries will work natively versus which require custom adapters. Here is the verified landscape as of 2026.
Zerodha Kite Connect
Cost: ₹500 per month (subscription to the Kite Connect API)
Official Python library: pykiteconnect (github.com/zerodha/pykiteconnect, actively maintained)
Data access: Real-time tick data via WebSocket; historical OHLCV data via REST endpoint
Rate limits (verified from pykiteconnect throttle documentation): Quotes endpoint: 1 request/second; Historical endpoint: 3 requests/second; Order endpoint: 8 requests/second / 180 requests/minute
Segments covered: Equities (NSE/BSE), F&O (NSE), Currency derivatives, Commodities (MCX)
Kite Connect is the most widely adopted API in the Indian retail algo trading community, largely because Zerodha is the largest discount broker by active client count. The pykiteconnect library is the official client, maintained by Zerodha engineering directly. WebSocket connectivity delivers tick-by-tick market data including LTP (Last Traded Price), depth (bid/ask), and trade information.
Critical practical constraint: Kite Connect requires a daily manual login — the access token expires at midnight and must be refreshed each trading day. For fully automated systems running unattended, this requires an automated login implementation (TOTP-based, using the Zerodha-provided TOTP key) or a session management wrapper that handles re-authentication at market open. This is not a bug; it is a SEBI-mandated security requirement. Factor it into your architecture.
Code: Basic Kite Connect session and tick subscription
from kiteconnect import KiteConnect, KiteTicker
# Daily session setup (access_token refreshed each morning)
kite = KiteConnect(api_key="your_api_key")
# After TOTP-automated login flow:
data = kite.generate_session("request_token_here", api_secret="your_secret")
kite.set_access_token(data["access_token"])
# WebSocket for real-time tick data
def on_ticks(ws, ticks):
# Ticks arrive at ~2-3 events/second per instrument
for tick in ticks:
print(f"{tick['instrument_token']}: LTP={tick['last_price']}")
def on_connect(ws, response):
# Instrument tokens for Nifty 50 index and a Nifty futures contract
ws.subscribe([256265, 11977730])
ws.set_mode(ws.MODE_FULL, [256265, 11977730])
kws = KiteTicker("your_api_key", data["access_token"])
kws.on_ticks = on_ticks
kws.on_connect = on_connect
kws.connect()Angel One SmartAPI
Cost: Free (no subscription fee)
Official Python library: smartapi-python (smartapi.angelbroking.com)
Data access: Real-time data via WebSocket; historical candles via REST
Authentication: OAuth 2.0 + TOTP; static IP whitelisting required under SEBI’s April 2026 framework
Segments covered: Equities, F&O, Currency, Commodities
Angel One’s SmartAPI is the most accessible entry point for developers who want zero platform subscription cost. The API is free, the documentation is clear, and the Python SDK supports both REST and WebSocket. For beginners building their first Indian algo system or developers running low-frequency strategies where the ₹500/month Kite Connect cost matters, SmartAPI is a legitimate starting point.
The trade-off is community depth. Zerodha’s Kite Connect has a vastly larger community of Python developers sharing code, troubleshooting TOTP authentication, and publishing open-source strategy frameworks. SmartAPI’s community is growing but thinner on worked examples for production-grade systems.
Fyers API
Cost: Free
Official Python library: fyers-apiv3 (Python V3 SDK, actively maintained)
Data access: Real-time WebSocket; historical data via REST
Reputation: Consistently rated highly among developers for documentation quality, stable architecture, and clear versioning
Fyers has positioned itself as the developer-friendly broker. Their API documentation is versioned and detailed. The Python SDK is maintained with clear changelogs. For developers building custom systems from scratch who are not already Zerodha customers, Fyers offers free API access with solid infrastructure.
Upstox API
Cost: Free developer access; ₹10 per order executed via API (note: this promotional pricing was disclosed until March 31, 2026 — verify current terms at upstox.com)
Library: Official Python SDK available
Notable: Backed by Ratan Tata’s investment vehicle; strong infrastructure investment
Indian Broker API Comparison Table
| Broker | API Cost | Python SDK | WebSocket | Historical Data | Best For |
|---|---|---|---|---|---|
| Zerodha Kite Connect | ₹500/month | Official (pykiteconnect) | Yes | Yes (REST) | Production systems, largest community |
| Angel One SmartAPI | Free | Official | Yes | Yes | Beginners, cost-conscious developers |
| Fyers | Free | Official (v3) | Yes | Yes | Clean docs, custom system builders |
| Upstox | Free | Official | Yes | Yes | Active traders moving to automation |
| Dhan | Free | Official | Yes | Yes (paper trading mode available) | Community-driven, debugging-friendly |
Sources: AlgoTest broker comparison (April 2026); Stratzy.in API cost analysis (January 2026); official broker developer portals.
The architecture implication: None of these APIs have native adapters in NautilusTrader or Lumibot’s official connector library. You will need to build a custom adapter or use a bridge layer. This is covered in the execution section below.
The SEBI Algo Framework: What Changed on April 1, 2026
This is not optional reading. If you run any Python script that places orders through a broker API, you are operating under this framework.
SEBI circular SEBI/HO/MIRSD/MIRSD-PoD/P/2025/0000013 was issued February 4, 2025. The full framework became mandatory from April 1, 2026. Here is what it requires in plain terms relevant to a Python developer:
Every automated order needs an exchange-assigned Algo-ID. From April 1, 2026, every order placed by an algorithm must carry a unique identifier assigned by NSE or BSE. This creates a complete audit trail linking every automated order to its registered strategy. If your script exceeds 10 orders per second (per exchange per client), your algo must be formally registered through your broker.
The 10 OPS threshold is the key decision point. Below 10 orders per second: no formal algo registration required, but your orders are still tagged as API orders and subject to broker oversight. Above 10 orders per second: mandatory registration of the algo with the exchange through your broker, with due diligence, logic disclosure (white-box or black-box classification), and ongoing audit trail maintenance.
Most retail Python strategies — swing trading, daily rebalancing, options hedging, momentum signals on hourly bars — operate well below 10 OPS. If your strategy is intraday momentum on 1-minute bars with a handful of signals per day, the registration threshold does not affect you. If you are building high-frequency or scalping logic that places hundreds of orders per second, you are in a different compliance tier entirely.
Open APIs are banned. Access to broker APIs is now permitted only through a unique vendor/client-specific API key and a static IP address whitelisted by your broker. This is why Kite Connect, SmartAPI, and Fyers all now require static IP registration. If you are running your algo from a home broadband connection with a dynamic IP, you need to either fix your IP with your ISP or run your strategy on a cloud VPS with a static IP address.
Two-factor authentication is mandatory for all API sessions. TOTP (Time-based One-Time Password) is the standard implementation. All major Indian brokers have implemented this.
Daily session logout is mandatory. All API sessions must automatically log out before each trading day — which is why the daily re-authentication architecture described in the Kite Connect section above is not optional.
Audit trail retention: 5 years. Brokers must maintain detailed logs of all API activity for a minimum of 5 years. Your broker handles this; you do not need to implement it yourself. But it means your order flow is permanently logged and auditable.
All algos must be hosted on Indian servers. Third-party cloud services running outside India are prohibited unless integrated with the broker’s system through an approved architecture. AWS Mumbai, Azure India Central, and GCP Mumbai regions are compliant hosting locations for India-regulated algo strategies.
White-box vs black-box classification. Transparent algorithms (white-box, where the logic is fully disclosed) have a simpler approval path. Algorithms with undisclosed logic (black-box) require Research Analyst (RA) registration and greater regulatory scrutiny. If you are building a strategy and sharing it as a service to other traders, this distinction determines your regulatory path.
The practical upshot for a Python developer building a personal, low-frequency strategy: use a SEBI-compliant broker API with static IP, TOTP authentication, and daily session management. If your strategy stays under 10 OPS, you are operating legally without formal algo registration. If you plan to offer your strategy as a service to others, consult the broker’s compliance team before launch.
The Data Layer: Polars for NSE/BSE Tick Data
The core case for Polars over Pandas for financial data processing is unchanged from the original article and remains technically sound: lazy evaluation, multi-threaded execution, and Apache Arrow memory format enable significantly faster processing and lower RAM usage on large tick datasets.
The India-specific dimension: NSE historical data comes in a specific CSV format. Zerodha’s Kite Connect historical API returns OHLCV candles as JSON for requested time intervals (1-minute, 3-minute, 5-minute, 10-minute, 15-minute, 30-minute, 60-minute, day). For F&O instruments, the instrument master file (downloaded from NSE or via kite.instruments()) maps trading symbols to instrument tokens — the numeric identifiers used by WebSocket subscriptions.
Building an efficient data pipeline for Indian market data with Polars:
import polars as pl
from kiteconnect import KiteConnect
from datetime import date, timedelta
kite = KiteConnect(api_key="your_api_key")
kite.set_access_token("your_access_token")
# Step 1: Fetch NSE F&O instrument master
# This maps symbols (e.g. "NIFTY25MAYFUT") to instrument tokens
instruments = kite.instruments("NFO")
nfo_df = pl.DataFrame(instruments)
# Step 2: Filter to Nifty futures (current month)
nifty_fut = nfo_df.filter(
(pl.col("name") == "NIFTY") &
(pl.col("instrument_type") == "FUT") &
(pl.col("expiry") >= date.today())
).sort("expiry").head(1)
token = nifty_fut["instrument_token"][0]
# Step 3: Fetch 60 days of 1-minute OHLCV via Kite Historical API
# Rate limit: 3 requests/second — build in sleep if batching multiple symbols
raw = kite.historical_data(
instrument_token=token,
from_date=date.today() - timedelta(days=60),
to_date=date.today(),
interval="minute",
continuous=False
)
# Step 4: Load into Polars and process lazily
df = pl.DataFrame(raw)
# Step 5: Lazy transformation pipeline
q = (
df.lazy()
.with_columns([
pl.col("date").cast(pl.Datetime),
# Log returns for strategy signal generation
(pl.col("close") / pl.col("close").shift(1)).log().alias("log_ret"),
# 20-period rolling volatility (std dev of close)
pl.col("close").rolling_std(window_size=20).alias("volatility_20"),
# VWAP approximation: (high+low+close)/3 * volume
((pl.col("high") + pl.col("low") + pl.col("close")) / 3 * pl.col("volume")).alias("tp_vol")
])
.filter(pl.col("log_ret").is_not_nan())
)
# collect() executes the optimised plan using all available cores
df_processed = q.collect()
print(f"Processed {df_processed.height} bars from NSE NFO data.")The rate limit issue that will break your batch download. Kite Connect’s historical endpoint allows 3 requests per second. For a universe of 100 NSE F&O instruments fetching 60 days of 1-minute bars, that is 100 API calls. At 3 RPS, budget at least 35 seconds plus network overhead. Build sleep intervals into any batch download loop or use the unofficial kitetrader PyPI package, which has built-in throttling that respects Kite Connect’s rate limits per endpoint automatically.
Research Layer: VectorBT Pro for Indian F&O Strategies
VectorBT Pro’s vectorised backtesting engine is the right tool for Indian market research — particularly for Nifty and BankNifty options strategies where parameter space is enormous. The weekly options expiry cycle on NSE (every Thursday for Nifty, weekly for BankNifty) means strategy parameters interact with expiry calendars in ways that require testing across hundreds of combinations to identify robust configurations.
The @vbt.chunked decorator from the original article is genuine and important. For a strategy testing 50 strike offsets × 30 entry time windows × 20 stop-loss levels = 30,000 combinations on 2 years of 1-minute Nifty options data, a raw grid search will exceed most machines’ RAM. Chunking processes the parameter grid in batches, preventing the MemoryError.
India-specific: working with NSE weekly expiry calendars in VBT
import vectorbtpro as vbt
import polars as pl
import pandas as pd
import numpy as np
# Load Nifty 1-min data (processed via Polars pipeline above)
# VBT requires pandas DataFrame or numpy arrays as input
nifty_close = df_processed["close"].to_pandas()
nifty_close.index = pd.to_datetime(df_processed["date"].to_pandas())
# NSE Nifty weekly expiry: every Thursday
# Mark expiry days for strategy logic
expiry_mask = nifty_close.index.weekday == 3 # Thursday = 3
# RAM-efficient parameter sweep using @vbt.chunked
@vbt.parameterized
@vbt.chunked(
n_chunks='auto',
size=vbt.ArraySizer(arg_query="fast_window", axis=0),
merge_func="concat"
)
def nifty_ma_crossover(close, fast_window, slow_window):
fast_ma = vbt.MA.run(close, window=fast_window)
slow_ma = vbt.MA.run(close, window=slow_window)
entries = fast_ma.ma_crossed_above(slow_ma)
exits = fast_ma.ma_crossed_below(slow_ma)
# freq='1T' = 1-minute bars; NSE market hours 09:15 to 15:30
pf = vbt.Portfolio.from_signals(
close,
entries,
exits,
freq='1T',
fees=0.0003, # ~0.03% brokerage (Zerodha ₹20/order approximated on 1L position)
slippage=0.0005 # 0.05% slippage estimate for liquid Nifty futures
)
return pf.sharpe_ratio()
# Test 20 fast windows × 50 slow windows = 1,000 combinations
# @vbt.chunked processes in RAM-safe batches
fast_windows = np.arange(5, 25) # 5 to 24
slow_windows = np.arange(20, 70) # 20 to 69
results = nifty_ma_crossover(
nifty_close,
fast_window=fast_windows,
slow_window=slow_windows
)
# Best Sharpe ratio cluster (avoid single-point optimisation)
print(results.sort_values(ascending=False).head(10))The look-ahead bias warning for Indian F&O is more dangerous than for equities. Options pricing incorporates implied volatility and time-to-expiry. If your backtesting data includes settlement prices on expiry day that are determined after market close, using that close price as if it were available intraday is a form of look-ahead bias. Always verify what your data provider’s “close” price represents on NSE weekly expiry Thursdays. Use VBT’s built-in signal generators rather than raw array operations to avoid the close > close.shift(-1) look-ahead trap described in the original article.
Execution Layer: NautilusTrader with a Custom Indian Broker Adapter
NautilusTrader’s institutional-grade “crash-only, fail-fast” execution architecture is the right tool for moving a backtested Indian strategy into live trading. The challenge: NautilusTrader has no official adapters for Zerodha, Angel One, or Fyers in its standard connector library as of May 2026.
This is not a blocker — it is an architecture task. NautilusTrader is designed to be extended. Building a custom adapter for Kite Connect involves implementing the LiveDataClient and LiveExecutionClient interfaces, wrapping Kite Connect’s WebSocket for market data and REST API for order management.
The key architectural principle that makes this worth doing: NautilusTrader uses the identical engine for backtesting and live trading. Only the adapter changes. This means a strategy validated in backtesting will behave identically in live execution — market data events, order state transitions, and risk checks all follow the same code paths. Most broker-specific Python bots written against Kite Connect directly have divergent backtest and live code, which makes strategy parity impossible to guarantee.
Skeleton: Custom Kite Connect data adapter for NautilusTrader
from nautilus_trader.live.data_client import LiveDataClient
from nautilus_trader.model.data import QuoteTick, TradeTick
from nautilus_trader.model.identifiers import InstrumentId
from kiteconnect import KiteTicker
class KiteConnectDataClient(LiveDataClient):
"""
Custom NautilusTrader data client for Zerodha Kite Connect WebSocket.
Bridges Kite's tick format to NautilusTrader's internal event model.
"""
def __init__(self, kite_api_key: str, kite_access_token: str, **kwargs):
super().__init__(**kwargs)
self._kws = KiteTicker(kite_api_key, kite_access_token)
self._kws.on_ticks = self._on_kite_ticks
self._kws.on_connect = self._on_kite_connect
self._kws.on_error = self._on_kite_error
def _on_kite_connect(self, ws, response):
self._log.info("Kite WebSocket connected.")
def _on_kite_ticks(self, ws, ticks):
for tick in ticks:
# CRITICAL: NautilusTrader requires monotonically increasing timestamps.
# Kite WebSocket can deliver ticks with identical or slightly
# out-of-order timestamps during high-volatility periods.
# Sort and deduplicate before feeding to the engine.
ts = tick.get("exchange_timestamp") or tick.get("timestamp")
if ts is None:
continue # Drop ticks without a valid timestamp
# Convert to NautilusTrader QuoteTick format
# (full implementation requires Price and Quantity type wrapping)
self._handle_quote_tick(tick)
def _on_kite_error(self, ws, code, reason):
# Fail-fast: NautilusTrader philosophy — log and terminate on data errors
self._log.error(f"Kite WebSocket error {code}: {reason}")
self.stop()
def connect(self):
self._kws.connect(threaded=True)
def disconnect(self):
self._kws.close()The timestamp sorting problem in Indian market data is real. During high-volatility periods — FOMC announcements, RBI policy decisions, Nifty expiry days — Kite Connect’s WebSocket delivers ticks with identical exchange timestamps or minor out-of-order sequences due to network jitter. NautilusTrader’s strict time-monotonicity requirement will raise a RuntimeError on unsorted data. Pre-processing with Polars (df.sort("timestamp", "sequence_id")) before feeding data to the engine is mandatory, exactly as described in the original article — the technical requirement is the same, the Indian context just provides more specific situations when it will trigger.
Retail Layer: Streak and Sensibull vs Python Code
A critical India-specific note the original article completely missed.
For low-frequency Indian retail strategies, two platforms are worth knowing before you write a single line of Python:
Streak (streak.tech) — Zerodha’s strategy builder platform — allows creation of rule-based algo strategies using a no-code interface with backtesting on NSE/BSE data. Strategies deployed through Streak are automatically SEBI-compliant under Zerodha’s broker umbrella. For traders whose strategies are simple (moving average crossovers, RSI threshold entries, pattern-based signals), Streak eliminates the API subscription cost, the TOTP authentication wrapper, and the compliance overhead entirely.
Sensibull — the options trading platform integrated with Zerodha and Angel One — provides options strategy builders, payoff diagrams, and live strategy execution without custom code. If your strategy is an options spread (straddle, strangle, iron condor on Nifty) with defined entry/exit rules, Sensibull handles execution directly through your broker.
This is not advice to avoid Python. It is context: if your strategy can be expressed in Streak or Sensibull, those platforms are faster to deploy, already SEBI-registered, and have lower maintenance overhead than a custom Python stack. Python custom code makes sense when your strategy logic is too complex for no-code tools, when you need multi-broker execution, when you require custom risk logic, or when you are building something proprietary.
Lumibot — the retail execution layer from the original article — does not have native connectors for any Indian broker as of May 2026. Its Alpaca integration is US-market only. Jesse similarly has no NSE/BSE data or broker connectors. These tools should not be in your Indian algo trading architecture.
Quant Developer Salaries in India: Verified Data by Role and City
This is the career context that skillupgradehub.com readers need and that the original article entirely omitted.
The following figures are from Glassdoor India salary submissions (January–April 2026) and MentorMe Careers quantitative analyst India survey (January 2026).
Quantitative Developer — professionals who implement and maintain trading systems, build data pipelines, and code strategy execution infrastructure:
- India national average: ₹20 LPA (Glassdoor India, April 2026)
- Bangalore average: ₹38.75 LPA (Glassdoor India, April 2026)
- Range (25th–75th percentile, Bangalore): ₹12.35 LPA – ₹35.75 LPA
Quantitative Analyst — professionals who build and validate mathematical models, develop trading signals, and conduct backtesting research:
- India national average: ₹23.25 LPA (Glassdoor India, 136 submissions, January 2026)
- Bangalore range: ₹12.35 LPA (25th percentile) – ₹35.75 LPA (75th percentile)
- Top earners (90th percentile, Bangalore): ₹42 LPA
Algorithmic Trader — professionals managing live trading strategies at proprietary trading firms:
- India national average: ₹30 LPA (Glassdoor India, December 2025)
Quantitative Trader — strategy-level P&L responsibility at prop firms or hedge funds:
- India national average: ₹50.5 LPA (Glassdoor India, April 2026)
By experience band (quantitative analyst, India):
| Experience | Salary Range | Notes |
|---|---|---|
| Entry (0–2 yrs) | ₹6–10 LPA | CS/Maths/Stats degree + Python/C++ required |
| Mid-level (3–6 yrs) | ₹10–25 LPA | Strategy research, backtesting ownership |
| Senior (7+ yrs) | ₹25–42 LPA | Independent alpha generation, team leadership |
| Prop firm trader (performance-linked) | ₹30–60+ LPA | P&L-based comp, high variance |
Sources: Glassdoor India (April 2026); MentorMe Careers India quant salary survey (January 2026). Figures are gross CTC estimates; take-home varies based on variable components and tax structure.
Companies actively hiring for quant/algo roles in India (Glassdoor India, March–April 2026): iRageCapital Advisory (Mumbai), Alphagrep (Mumbai/Pune), Plutus Research, Barclays India, JPMorgan Chase India, Capstone Securities Analysis, Dolat Trading, Tower Research India, Tethys Technology, and Trading Technologies. Most roles require a strong degree in Computer Science, Mathematics, Statistics, or Financial Engineering, along with proficiency in Python and C++. NISM certifications (particularly NISM Series VIII — Equity Derivatives) are referenced in several Indian prop firm job descriptions as preferred qualifications.
The 2026 Indian Algo Stack: What Goes Where
| Layer | Tool | India-Specific Notes |
|---|---|---|
| Data ingestion | Polars + pykiteconnect / Fyers SDK | NSE instrument master for token mapping; 3 RPS rate limit on Kite historical endpoint |
| Research / backtesting | VectorBT Pro | Use @vbt.chunked for F&O parameter sweeps; model NSE weekly expiry Thursdays explicitly |
| Execution | NautilusTrader (custom Kite/Angel adapter) | Build LiveDataClient + LiveExecutionClient wrappers; sort ticks by timestamp + sequence before feeding engine |
| Low-code retail | Streak (Zerodha) / Sensibull | SEBI-compliant by default; no custom code needed for simple strategies |
| Hosting | AWS Mumbai / Azure India Central / GCP Mumbai | SEBI requires Indian server hosting for all deployed algos |
| Compliance | SEBI Algo-ID framework (April 2026) | Static IP required; TOTP mandatory; below 10 OPS no registration needed; above 10 OPS register with exchange through broker |
Common Pitfalls Specific to Indian Markets
1. NSE instrument token vs. trading symbol confusion
Kite Connect’s WebSocket requires numeric instrument tokens, not trading symbols. kite.ltp(["NSE:NIFTY 50"]) works for snapshot quotes. WebSocket subscriptions use tokens like 256265 for Nifty 50 index. The mapping is available via kite.instruments("NSE") — download and cache this file at start of day; it changes when new contracts are listed.
2. F&O contract rollover breaks backtests
NSE Nifty futures have monthly expiry (last Thursday). A strategy backtested on “Nifty futures” without handling the rollover from near-month to next-month contract will have artificial gaps and price jumps in the data. Use continuous=True in kite.historical_data() to get Zerodha’s spliced continuous contract, or explicitly manage rollovers in your data pipeline.
3. Square-off time: 3:20 PM hard stop
NSE trading closes at 3:30 PM, but most brokers including Zerodha auto-square-off open MIS (intraday) positions at 3:20 PM. Any intraday strategy must include an explicit position close logic triggered before 3:20 PM. Missing this causes broker-initiated forced square-off at unfavourable prices plus penalty charges.
4. API session expiry mid-day
Kite Connect access tokens expire at midnight. If your system does not implement daily re-authentication, the session will appear valid at 9:15 AM market open but will fail mid-session if it was not refreshed. Implement a health-check that validates the access token before market open and re-authenticates automatically using TOTP.
5. Static IP enforcement under SEBI April 2026 rules
If your VPS provider rotates IPs on reboot (many AWS EC2 instances use dynamic public IPs by default), your broker’s static IP whitelist will reject API calls after any server restart. Use Elastic IP (AWS), Reserved IP (Azure), or Static External IP (GCP) and register that address with your broker before the strategy goes live.
Your Three Next Steps
Step 1: Open a Zerodha account if you do not have one, subscribe to Kite Connect API (₹500/month), and run the basic tick subscription example from this article. Getting real NSE data flowing into a Python process is the foundation. Everything else — Polars processing, VBT backtesting, NautilusTrader execution — builds on that foundation.
Step 2: Download and study SEBI circular SEBI/HO/MIRSD/MIRSD-PoD/P/2025/0000013 (available at sebi.gov.in). Understand the 10 OPS threshold, the static IP requirement, and the white-box/black-box algo classification. Even if your strategy is well below the registration threshold, understanding the framework prevents accidental compliance gaps.
Step 3: Before building the full NautilusTrader execution layer, validate your strategy logic using Streak or VBT Pro on NSE historical data. A strategy that cannot demonstrate positive expectancy in backtesting with realistic brokerage and slippage assumptions (₹20 per order or 0.03% of turnover, whichever is lower; 0.05% slippage on liquid Nifty/BankNifty contracts) does not graduate to live execution.
Frequently Asked Questions
Is Python algo trading legal in India for retail investors? Yes, within the SEBI framework. SEBI’s circular from February 2025 (effective April 2026) explicitly legalised and regulated retail participation in algo trading via broker APIs. The key requirements are static IP, TOTP authentication, and exchange registration for strategies exceeding 10 orders per second per exchange.
Do I need an NISM certification to run algo strategies? Not for personal use. NISM certifications (particularly Series VIII — Equity Derivatives) are required if you wish to offer algo strategies as a service to others or work at a regulated financial institution. For building and running your own personal algo strategy, no NISM certification is legally required, though it provides useful F&O market knowledge.
Can I use Lumibot or Jesse for Indian markets? Not without significant custom development. Neither platform has official NSE/BSE broker adapters or Indian market data connectors as of May 2026. For Indian retail strategies, Streak (Zerodha’s strategy builder) or a custom Python stack using Kite Connect / SmartAPI are the practical options.
What is the minimum capital to start algo trading in India? There is no regulatory minimum equivalent to the US PDT rule. However, F&O trading on NSE requires margin based on contract lot sizes. A single Nifty futures lot (50 units) requires approximately ₹80,000–₹1,20,000 in margin depending on volatility (SPAN + exposure margin). Realistic backtesting should model these margin requirements as a constraint on position sizing.
Which companies hire Python quant developers in India? iRageCapital, Alphagrep, Dolat Trading, Plutus Research, and Tethys Technology are the prominent domestic prop trading firms. Barclays, JPMorgan Chase, and Trading Technologies have India-based quant developer teams. Most openings are concentrated in Mumbai and Bangalore, with some positions in Pune and Gurgaon.
Data sources: Glassdoor India salary data (January–April 2026, 136+ submissions for quant analyst roles); SEBI circular SEBI/HO/MIRSD/MIRSD-PoD/P/2025/0000013 (February 2025); SEBI algo trading framework implementation timeline (April 2026 effective date); AlgoTest India broker comparison (April 2026); Stratzy.in API cost analysis (January 2026); Kite Connect API documentation and pykiteconnect GitHub (zerodha/pykiteconnect, May 2026); NautilusTrader GitHub (nautechsystems/nautilus_trader); NSE India instrument and F&O segment documentation; MentorMe Careers quantitative analyst India salary survey (January 2026); Sahi.com SEBI algo trading rules 2026 (February 2026); AlgoBulls SEBI regulation overview (November 2025).
Last Verified: May 2026. Next Review: November 2026.




