Algorithmic trading is legal in India for retail participants, provided it runs through a registered broker and inside the framework SEBI and the exchanges set. Running your own code on your own capital does not require you to register as an intermediary; taking other people's money or selling strategies to others does. The binding practical constraints are not regulatory but economic (statutory charges and slippage on every fill) and engineering: what happens when a fill is missed or a connection drops.
01Is it legal
Yes. Algorithmic trading has been permitted in India for many years, initially for institutional participants and subsequently for retail participants through broker-provided automation. The framework is set by SEBI and administered through the exchanges and your broker.
The direction of regulation has been consistently toward more accountability rather than less. The general shape is that algorithms made available to retail investors are expected to be registered with the exchange through the broker and to carry a unique identifier, so that orders generated by an algorithm can be attributed to it. Brokers carry obligations around what they permit, how they monitor order flow, and what they must disclose.
The specifics here have changed several times and will change again. Treat this section as orientation, not as a compliance reference. Before you deploy anything, confirm the current requirements with your broker and read the latest SEBI and exchange circulars directly. We are engineers, not your compliance advisers.
02When registration matters
The most common confusion we encounter is the belief that writing trading software requires SEBI registration. It does not. Registration requirements attach to activities:
| Activity | Regulated? |
|---|---|
| Running your own algo on your own capital | No registration required as an intermediary |
| Writing software for a client who runs it themselves | Software development, not a regulated securities activity |
| Advising others on what to buy or sell, for consideration | Research Analyst / Investment Adviser territory |
| Managing money on someone else's behalf | Portfolio Manager territory |
| Selling signals, tips or subscriptions to a strategy | Regulated; commonly requires registration |
The line is whether you are acting on someone else's financial decisions or merely building a tool they operate. This is precisely why QuantNifty builds and hands over systems rather than running client money or selling subscriptions: it keeps us on the engineering side of that line. We are not SEBI registered, and we do not give advice.
03What a broker API gives you
Every major Indian broker with an automation offering exposes broadly the same capability set:
- Order operations: place, modify and cancel orders across product types, including market, limit and stop-loss variants.
- Position and margin state: current holdings, open positions, margin used and margin available.
- Streaming market data: live quotes and depth over a websocket, usually with a cap on how many instruments you may subscribe to at once.
- Historical data: candles at various intervals, with limits on how far back and at what granularity.
- Postbacks or order updates: asynchronous notification that an order's state has changed.
That is genuinely enough to run a serious systematic strategy. The gap between "enough" and "reliable" is where the engineering lives.
04What it does not give you
Assumptions that a retail API quietly violates, in rough order of how expensive they are to learn the hard way:
- That a placed order is a filled order. It is not. If your code assumes the position changed the moment the order was accepted, your position size will drift away from what your strategy believes it is holding. Every order needs a confirmation path.
- That your connection will stay up. It will not. If a stop-loss exists only as logic in your process, a disconnect leaves a short option position completely unprotected. Stops for short-option strategies belong on the broker's book.
- That the quote you saw is the price you get. On an illiquid strike or during a momentary liquidity hole, a market order can fill far from the last traded price. This is what spike detection and order repricing exist to prevent.
- That rate limits will not bite. They will, usually at the worst moment, when the strategy is trying to exit several legs at once.
- That you can intervene manually in time. You cannot. A kill switch that flattens positions and halts trading on a defined condition needs to exist in the system and be reachable without logging into a terminal.
05The real cost structure
Running costs split into two very unequal halves.
Fixed and recurring
- Broker API subscription, typically a modest monthly fee per app.
- A server, ideally hosted close to the exchange to keep round-trip latency low and stable.
- Historical data for research. Tick-level option data is the expensive item, and it is not optional if you intend to test intraday option strategies honestly.
Transactional, and much larger
Brokerage, exchange transaction charges, Securities Transaction Tax, stamp duty, SEBI turnover fees and GST, plus slippage on every entry and every exit. For any strategy that trades frequently, this category dwarfs everything else.
Charges and slippage must be applied inside the backtest, per fill, on both sides of every trade, not deducted from the final return as an estimate. We model 0.2% slippage per fill plus full statutory charges and hedge cost. Strategies that look excellent gross and unremarkable net are the norm, not the exception, and the net number is the only one that means anything.
06Infrastructure you need
A production setup for an intraday index options strategy, at minimum:
- A server that starts the strategy automatically before market open and does not depend on your laptop being awake.
- State that survives a restart, so a process crash mid-session does not lose track of open positions.
- Logging detailed enough to reconstruct exactly why a trade happened, months later.
- Alerting that reaches you on a phone when something needs a human.
- A reconciliation step at end of day comparing what the strategy thinks it did against what the broker says happened. Discrepancies here are how you find bugs before they compound.
07Where retail systems break
Across the systems we have been asked to rescue, the failures cluster tightly:
- Backtest ignores charges, so a strategy with a genuine but thin edge is deployed and bleeds out through costs.
- Stop-loss lives in the script, and one disconnect during a volatile session produces a loss larger than a year of gains.
- No expiry calendar, so holiday-shifted expiry weeks trade the wrong contract.
- Overfitting through repeated tweaking: the strategy was adjusted after seeing out-of-sample results, which quietly converts the out-of-sample period into an in-sample one. See honest backtesting.
- Position sizing set by what the margin allows rather than by what the drawdown tolerance permits.
08Questions people ask
Is algo trading legal in India?
Yes, for both institutional and retail participants, provided the automation runs through a registered broker within the framework SEBI and the exchanges set. Algos distributed to retail investors generally need registration with the exchange via the broker and a unique identifier so orders can be attributed. Because these requirements change, confirm the current position with your broker and the latest circulars before deploying.
Do I need SEBI registration to run my own algo?
Trading your own capital with your own automation does not by itself make you a registered intermediary. Registration attaches to activities: advising others for consideration, managing other people's money, or distributing research and strategies to third parties. Writing and running code on your own account is none of those. Take client money or sell signals, and you are in registration territory.
What does it cost to run an algo trading system in India?
Recurring costs are modest: an API subscription, a server, historical data. The dominant cost is transactional: brokerage, exchange charges, STT, stamp duty, SEBI turnover fees, GST and slippage on every fill. For frequently trading strategies this exceeds everything else combined, which is why it belongs inside the backtest rather than as an afterthought.
Can I automate trading through a broker API?
Yes. Major Indian brokers expose order placement, modification and cancellation, position and margin queries, and streaming market data. What they do not give you is guaranteed latency, guaranteed fills, or protection from your own logic errors. Broker-side stops, fill confirmation and a kill switch are yours to build.
QuantNifty is an algorithm development and consulting firm. We are not a SEBI-registered Research Analyst, Investment Adviser, Portfolio Manager or Broker, and nothing here is investment, legal, tax or compliance advice. Regulatory requirements change; verify the current position with your broker and primary sources. Options trading can lose more than your initial capital. Full risk disclosure is in our Terms.
Want the engineering handled?
Broker-side stops, fill confirmation, spike detection, order repricing, kill switch, end-of-day reconciliation. The unglamorous half that decides whether live results resemble the backtest.
Tell us what you want built