NineFifteenAM

Pillar guide · updated monthly

Algo trading in India: the rules, the cost, and what to do first

9 min readUpdated 26 September 2026By Shubham

What the law requires of a retail algo trader in India, what a system costs to run after the April 2026 STT change, and the order to build it in.

Short answer

Algo trading is legal in India for retail traders. You can write your own program and let it trade your own account through a broker's API. Since 2025 the rules are stricter about distributing algos to other people and about how fast you place orders, but running your own system on your own money remains open to anyone with a demat account and the ability to code.

I have been running my own automated trading system on Indian markets for over a year. This is everything I wish someone had told me before I started: what the law actually requires of a retail trader, what it costs to run, and the order in which to build it.

Yes. Retail investors are permitted to develop and use their own algorithms to trade their own accounts. This has been true for years, and SEBI's 2025 framework for retail algorithmic trading confirmed it explicitly while adding structure around everything else.

What the framework does is put the broker at the centre as the responsible party. Your broker is accountable for monitoring algo orders, enforcing limits, tagging orders so the exchange can trace them, and doing due diligence on any third-party algo provider it allows onto its systems. The practical rules you experience day to day therefore come from your broker's API terms, not from a form you file with SEBI.

Two boundaries matter, and both are about scale and distribution rather than about the act of automating:

Check the current position with your broker's API documentation and the latest SEBI circular before you go live. The framework rolled out in phases through 2025 and 2026, and brokers implement on their own timelines. I update this guide monthly, but a circular can land the week after I do.

What SEBI's 2025 framework actually changed

Who you are What applies to you
Retail trader running your own algo on your own account, below the order-rate threshold No registration. Use your broker's API under its terms. Static IP whitelisting, a client-specific API key and strong authentication are typically required.
Retail trader exceeding the order-rate threshold Registration and exchange-level approval come into play; your broker must route and monitor the algo accordingly.
Anyone offering an algo to other people, free or paid You are an algo provider: empanelment with the exchanges, onboarded through brokers that have done due diligence on you.
Provider of a black box algo, where the logic is not disclosed Additionally requires SEBI Research Analyst registration, with research documentation per strategy. Material changes are treated as a new strategy.

The security requirements change how you deploy. Expect to need a static IP address whitelisted with your broker, a key tied to your own account, and two-factor authentication on the login flow. A laptop on home broadband with a changing IP is not a stable deployment target. I run mine on a small cloud instance with a fixed IP, which also solves the "my laptop slept during market hours" problem.

Your own algo versus providing one to others

This is the line that catches people, because the two sides look similar from outside and are completely different in law.

Running your own algo means your code, your account, your money. No registration below the thresholds.

Providing an algo means someone else's account trades on your logic. Selling a bot, licensing it, running it for a friend, publishing a strategy that executes through a subscription platform — all of it puts you in provider territory, where empanelment applies and, for undisclosed logic, Research Analyst registration on top.

People ask to buy my system fairly often. I don't sell it. The compliance path for a one-person operation is heavier than the income would justify, and anything I would have to say to market it — returns, win rates, "it works" — is exactly the kind of performance claim an unregistered person should not be making.

What you need before writing a line of code

  1. A demat and trading account with a broker that has a real API. Not every broker does, and documentation quality varies enormously. You will live inside those docs for months.
  2. API access enabled, with a static IP. Sorting out whitelisting and key management before you write code saves a frustrating week later.
  3. Historical data you trust. Your backtests are only as good as this. Broker historical APIs are usually adequate for daily and minute bars; tick data is a separate and bigger problem.
  4. Python, and enough engineering discipline to test things. Not the language — the discipline. The difference between a bot that survives and one that does not is almost entirely testing, logging and error handling.
  5. Capital you can genuinely afford to lose. Your first live deployment will do something you did not predict. Size it so that when it does, it is a lesson rather than a disaster.
  6. A machine that stays awake. A small cloud instance in Mumbai, close to the exchange, with a fixed IP.
  7. Patience for a slow start. Mine took four months before it placed a live order. That was the correct pace.

Broker APIs compared

The landscape changed in 2025 when Zerodha made execution APIs free for personal use while keeping a charge for market data. Several brokers now offer APIs at no cost, which removes what used to be the first real expense for a beginner.

Broker API Typical cost
Zerodha Kite Connect Execution free for personal use since April 2025; market data around ₹2,000/month
Dhan DhanHQ Free; data add-on around ₹500/month
Upstox Developer API Free
Angel One SmartAPI Free
Fyers Fyers API Free
Finvasia Shoonya Free
Kotak Securities Neo API Free

Pricing and terms move, so confirm on the broker's own developer page. What I weigh more heavily than the monthly fee:

What it costs to run, including the 2026 STT change

This is the section most beginners skip, and the one that decides whether a strategy that looks profitable actually is. An automated system trades more often than you would by hand, so costs compound faster than the edge does.

Securities Transaction Tax from 1 April 2026

Budget 2026 raised STT on derivatives significantly. If you are working from an older article, your cost model is wrong.

Segment Rate now Previous rate Charged on
Equity futures 0.05% 0.02% Sell side
Options, sold 0.15% of premium 0.10% Premium, sell side
Options, exercised 0.15% of intrinsic value 0.125% Intrinsic value
Equity intraday 0.025% unchanged Sell side
Equity delivery 0.10% unchanged Both sides

Futures STT rose by 150%. If your system trades futures frequently with a small per-trade edge, rerun your numbers before anything else.

Everything else you pay

Infrastructure

A small cloud instance runs roughly ₹800–2,000 a month, and market data may add ₹500–2,000. Total fixed cost for a one-person setup is usually under ₹4,000 a month, which is nothing compared with what a poorly tested deployment can cost in one afternoon.

Every strategy is profitable until you subtract costs. Build the cost model before the strategy, not after.

The build path, in order

  1. Get data in and store it properly. Before any strategy work. Clean, gap-checked, timestamped data is the foundation.
  2. Build the replay harness. The ability to rerun any past session and see exactly what your system saw. I built this late and regretted it.
  3. Backtest, then distrust the result. Look-ahead bias, survivorship, mid-price fills and forgotten fees each flatter your results independently.
  4. Paper trade against real order books. Not against mid prices. The gap between the two is where most people's live results disappear.
  5. Write the risk layer before the strategy layer. Daily loss cap, per-trade cap, maximum orders per signal, kill switch. Store the counters outside the code they limit.
  6. Go live with the smallest size the exchange allows. The purpose of the first month is to find out what you got wrong.
  7. Log everything, and review daily. Every decision with the state it was based on.

Five mistakes that cost me money

  1. Retrying rejections. One rejected order became eleven attempts in nine seconds because the retry logic treated every failure as transient.
  2. Trusting the backtest. My first live month underperformed the backtest by a wide margin, entirely due to fills and costs.
  3. Silent data gaps. Three tenths of a percent of ticks missing for a month, because I did work inside the websocket callback.
  4. Config drift. A threshold I changed three weeks earlier never reached the running process.
  5. Counting the wrong thing. A trade cap that counted orders rather than round trips let a partial fill eat the day's budget in one signal.

How your profits are taxed

In broad terms, and this is not tax advice: F&O trading is generally treated as non-speculative business income, while intraday equity trading is treated as speculative business income. Both usually mean filing ITR-3, maintaining books, and computing turnover correctly — which for F&O is not the same as the value of your trades, and is where most people get it wrong.

Business treatment does let you deduct genuine expenses: broker charges, data subscriptions, your cloud instance, and a share of your internet bill. Losses can generally be carried forward if the return is filed on time.

Turnover computation, audit applicability and loss carry-forward have real consequences and real penalties. Spend money on a CA who has handled F&O returns before. I am a developer who trades, not a tax professional.

Sources

Questions people ask me

Do I need SEBI registration to run my own trading bot?

No, provided you are trading your own account and stay below the order-rate threshold your broker enforces. Registration and exchange approval enter the picture if you exceed the order-per-second limit, and a different set of obligations applies entirely if you provide your algo to anyone else.

How much capital do I need to start algo trading in India?

Enough to trade at least one lot in your chosen instrument with a sensible margin buffer, plus fixed running costs of a few thousand rupees a month. The more useful question is how much you can lose while learning without it affecting your life.

Which broker API is best for algo trading in India?

The one with documentation you can live in and a websocket that holds up under load. Most major brokers now offer free APIs, so cost is no longer the deciding factor. Test the feed in your first week before committing months of work.

Can I sell my trading bot to other people?

Not casually. Offering an algo to others makes you an algo provider, which requires exchange empanelment and broker onboarding, and if the logic is undisclosed, SEBI Research Analyst registration as well. Listing a strategy on an already empanelled platform is the usual route for an individual.

Is Python fast enough for algo trading?

For anything at retail frequency, comfortably. The latency that matters is dominated by the network and the broker, not your language. Latency only becomes the binding constraint at frequencies that also change your regulatory position.

Why doesn't my live performance match my backtest?

Usually fills and costs, not the strategy. Backtests price at the mid while live gets the far touch plus impact, and cost models are often out of date — STT on futures and options rose in April 2026, for example.

Do I need a VPS, or is my laptop enough?

A laptop is fine for research and paper trading. For live trading a small cloud instance with a static IP is close to mandatory in practice: brokers whitelist IPs, and a sleeping laptop during market hours is a real failure mode.

What is the single most important thing to build first?

Session replay: the ability to rerun any day exactly as your system saw it. It is not glamorous, and it is the difference between finding a bug in forty minutes and guessing for a week.

algo tradingSEBIbroker apicostsgetting started
S

Shubham

I trade Indian markets and write the software that does it for me. I publish the engineering and the mistakes twice a week — no tips, no calls, no returns.

The Saturday letter

One email a week: what I built, what broke, and the lesson I'd pay money to have learned earlier.

Free. Unsubscribe anytime. No tips, no spam.

Related

26 Sept 2026
Why my backtest liedOne sentence that would make someone click this in search results.
The journey
18 Sept 2026
The ₹40,000 bug I shipped on a FridayA missing check turned one rejected order into eleven retries in nine seconds. The code path, the logs, and the guard that now makes it impossible.
Mistakes that cost me
16 Sept 2026
Reading a DRHP in 30 minutes: my checklistThe eight sections I read first in an IPO prospectus, the ratios I compute, and the things that make me close the document.
Market notes