Is algo trading legal in India? SEBI’s retail algo rules explained
Yes, algo trading is legal in India, and since 1 April 2026 SEBI’s retail algo framework applies at every broker. Here is what the framework says, what it changes for people who build their own Python algos, and what to confirm with your broker.
Based on our team’s research and live testing since 2018.
Algorithmic trading is legal in India. It is also regulated. SEBI issued broad guidelines on algorithmic trading in 2012 and has added controls since. In 2025 it issued a framework specifically for retail investors who trade through broker APIs, and that framework now applies at every broker.
This guide explains the framework in plain language, based on the official SEBI circulars and NSE’s implementation standards. It is not legal advice. Details are set by the exchanges and applied by each broker, so always confirm your own situation with your broker.
What is SEBI’s retail algo framework, and when did it start?
The main document is SEBI’s circular “Safer participation of retail investors in Algorithmic trading” (SEBI/HO/MIRSD/MIRSD-PoD/P/CIR/2025/0000013), dated 4 February 2025. The start date moved several times:
| Date | What happened |
|---|---|
| 4 Feb 2025 | SEBI circular issued; originally to apply from 1 August 2025 |
| 5 May 2025 | NSE publishes implementation standards (circular NSE/INVG/67858) |
| 29 Jul 2025 | SEBI extends the start date to 1 October 2025 |
| 30 Sep 2025 | SEBI lets ready brokers go live from 1 October 2025, and sets a glide path for the rest |
| 1 Apr 2026 | Framework applies to all stock brokers |
The dates come from SEBI’s circular of 30 September 2025. The exchanges also issued detailed operational rules in July 2025, with changes in September 2025, so your broker’s current notice is the best guide to the exact details.
What does the framework say?
According to the SEBI circular:
- The broker is the principal. Any algo provider or fintech that places orders through a broker’s API acts as the broker’s agent. The broker handles complaints about it.
- Every algo order is tagged with a unique identifier from the exchange, so there is an audit trail.
- Algo providers must be empanelled with the exchanges. SEBI does not regulate them directly, but brokers may only deal with empanelled providers.
- No open APIs. Access is only through a unique API key and a static IP that the broker has whitelisted, with OAuth-based login and two-factor authentication.
- Self-built algos by individual investors are registered with the exchange, through the broker, only if they cross the order-per-second threshold. A registered algo may be used for the investor’s family, but not for other investors.
- Exchanges keep a kill switch for orders coming from a particular algo ID.
What is the difference between white-box and black-box algos?
SEBI sorts algos into two groups:
- White-box (execution) algos: the logic is disclosed to the user and can be replicated.
- Black-box algos: the user cannot see the logic and cannot replicate it.
For black-box algos, the circular says the provider must register as a Research Analyst, keep a detailed research report for each algo, and register the algo again whenever its logic changes. This matters if you buy or subscribe to strategies. If you cannot see how a strategy decides, ask the provider about its empanelment and its Research Analyst registration, and check with your broker.
What is the order-per-second threshold?
NSE’s implementation standards of May 2025 set the threshold at not more than 10 orders per second per exchange, and say the exchanges may change it after notice. Your broker may set a lower limit for your account. In summary, under those standards:
| Who runs the algo | Registration | Static IP |
|---|---|---|
| You, your own algo, at or below the threshold | No separate registration by you; orders carry a generic exchange algo ID | Yours, mapped to your API key |
| You, your own algo, above the threshold | Registered with each exchange through your broker; gets its own ID | Yours |
| Your broker’s algo | Registered by the broker with the exchange | The broker’s or yours |
| An empanelled algo provider | Every algo registered by the provider | The provider’s or yours |
The threshold is counted on the broker server’s clock, per calendar second. Orders above the limit are rejected by the broker.
What changes if I build my own Python algo?
If you write your own code against your broker’s API (for example in Python), the practical changes are:
- A static IP. Your API key must be mapped to a static IP. The NSE standards allow one primary and one optional backup IP, and changes no more than once a calendar week. Home broadband usually has a changing IP, so you may need a static IP from your provider or a cloud server.
- A daily login. The standards require API sessions to be logged out every day before the next trading day, and access uses two-factor authentication. Plan for a daily login step, and check what your broker permits.
- An order-rate limit in your code. Keep well below the threshold, with a margin, because your clock and the broker’s clock differ.
- One key for unregistered algos. You may hold several API keys, but unregistered algos can run through only one of them.
A simple throttle in your order path handles the rate limit:
1# throttle.py: keep a self-built algo well below the order-rate threshold2import threading, time3 4class OrderThrottle:5 # The exchange threshold is per exchange and is counted on the broker's6 # clock, which is not your clock. Stay well below it, and below any7 # lower limit your broker sets for your account.8 def __init__(self, max_per_second=5):9 self.max_per_second = max_per_second10 self.current_second = None11 self.count = 012 self.lock = threading.Lock()13 14 def wait_turn(self):15 while True:16 with self.lock:17 now = int(time.time())18 if now != self.current_second:19 self.current_second, self.count = now, 020 if self.count < self.max_per_second:21 self.count += 122 return23 time.sleep(0.05)24 25throttle = OrderThrottle(max_per_second=5)26 27def place_order(order):28 throttle.wait_turn()29 return broker.place_order(**order) # your broker's SDK callThe limit of 5 per second in this example is an illustrative safety margin, not a rule. Most retail strategies send far fewer orders than that. The throttle matters for the rare moment when a bug or a burst of signals sends many at once.
What about hiring a developer to build my algo?
We build Python algos for clients’ own accounts, to the client’s written rules. The client knows the logic, receives the code, and runs it on their own account through their own broker API. We do not sell strategies, signals or advice.
If you plan to offer an algo to other people, for example through a community or a subscription, you are no longer a retail user running your own code. That raises questions of empanelment and, for black-box logic, Research Analyst registration. Get proper advice before you start. For the building side, see our Python trading bot development service, and for first steps, how to start algorithmic trading.
What should I confirm with my broker?
- Is API access available on my account, and what does it cost?
- How do I register my static IP, and a backup IP?
- What is my order-per-second limit?
- How does the daily login work for API sessions?
- Which order types or contracts are restricted for client algos?
- If I use a third-party platform, is it empanelled and connected to you?
Before you size real orders, the position size calculator turns your risk and stop distance into a quantity.
Quick answers
Do I need SEBI registration to run my own algo?
According to SEBI’s framework, an individual does not register with SEBI to trade their own algo. A self-built algo is registered with the exchange, through the broker, only if it crosses the order-per-second threshold. Your broker will tell you its process.
Can I share my algo with friends?
The SEBI circular allows a registered self-built algo to be used for your family (self, spouse, dependent children and dependent parents), but not for other investors. Offering it to others is a different role with its own requirements.
Can I run my algo from home broadband?
Only if your API key is mapped to a static IP. Most home connections have a changing IP, so many traders use a static IP from their provider or run the algo on a cloud server.
Are platforms that sell ready-made strategies allowed?
Under the framework, algo providers must be empanelled with the exchanges and work through brokers. Black-box providers must also be registered as Research Analysts. Ask the platform and your broker for their status.
Does this cover forex on MetaTrader?
No. This framework covers trading on Indian stock exchanges through brokers. Forex trading with overseas brokers is governed separately by RBI rules, and RBI publishes an alert list of unauthorised forex platforms.