SEBI's 2025 framework was good news for retail algo traders, even though it arrived as a set of restrictions. Before it, most people were operating in a grey area and hoping. Now there are stated rules, and following them is not difficult.
This is a general explanation from a software developer's point of view. It is not legal advice. For anything specific to your situation, check with your broker or a qualified professional.
What changed
Algo trading has been legal at the institutional level since 2008 — HFT desks, mutual funds, proprietary trading. Retail was the ambiguous part. People were running third-party platforms and self-written scripts with no formal position on whether that was permitted.
The 2025 framework closed that gap. It says what a retail algo has to look like to be compliant, which is far more useful than silence.
The rules, in short
- Broker approval. Your algo has to be registered with the broker whose API it uses.
- A unique algo ID. Each strategy is identifiable and traceable.
- White-box or black-box — the distinction decides what is required of you.
- Order frequency caps. Reasonable limits for retail volumes.
- An audit trail. Every order has to be traceable after the fact.
- A kill switch. You must be able to stop it immediately.
- No unauthorised subscriptions. You cannot rent your algo out to other people's accounts without the right registration.
White-box versus black-box
White-box means you have the source code, you understand the logic and you can change it. Anything you wrote, or that a developer built for you and handed over, is white-box. This is the straightforward category and it is where almost all retail traders sit.
Black-box means the internal logic is hidden — you see inputs and outputs and nothing else. Selling a black-box algo to retail traders requires SEBI approval, which is why you should be careful with anyone offering you a strategy they will not explain.
This is a practical reason to insist on receiving the source code when you commission a system. It is not just about ownership — it is what puts you in the simpler regulatory category.
Are you compliant? A checklist
- ✅ The code is yours, or was custom-built for you and handed over
- ✅ It runs through your broker's official API
- ✅ Orders go only to your own account
- ✅ You can stop it manually, immediately
- ✅ Logs are being written and kept
- ❌ You are operating someone else's account — not permitted
- ❌ You are selling subscriptions or taking a profit share — not without registration
The two red items are where people get into trouble, and usually without meaning to. Helping a friend by running their account sounds harmless and is exactly what the rule prohibits.
Order limits
- Roughly ten orders per second
- Roughly one hundred per minute, varying by broker policy
- A daily order count cap, set by the broker
Confirm the exact figures with your own broker, because they differ. Build the throttle into your code from the beginning — retrofitting rate limiting after a rejection is unpleasant, and it always happens on a busy day.
What to log
- Order placement timestamp
- Symbol, quantity, price and order type
- The broker's response — success or failure, plus the order ID
- Which strategy triggered it
- Every modification and cancellation
Write it to a database rather than a text file — SQLite is enough to start. Keep it for at least five years. Beyond compliance, this log is the single most useful debugging tool you will have, because when something behaves oddly you will want to reconstruct exactly what the system saw.
A kill switch that actually works
import os
KILL_FILE = "/tmp/STOP_TRADING"
def is_killed():
return os.path.exists(KILL_FILE)
while True:
if is_killed():
print("KILL SWITCH — exiting")
break
# ... trading logic ...
# To stop it:
# touch /tmp/STOP_TRADING
Deliberately crude, and that is the point. A kill switch that depends on the same code path that has gone wrong is not a kill switch. A file on disk can be created from any SSH session in two seconds, even if the process is misbehaving.
Test it. On a quiet day, with the algo running, actually create the file and confirm the process stops. A kill switch nobody has ever pulled is a hope, not a control.
Questions that come up often
Is an algo built on a platform like Streak legal? Yes, provided the platform is broker-approved and you are running it on your own account.
Can I build an algo for a friend and run it? Building it for them is fine. Operating their account is not — that requires registration as an investment adviser or portfolio manager.
Can I post backtests on YouTube? Educational content is fine. The line is advice — the moment it becomes a recommendation to buy or sell something, you are in territory that needs registration.
The short version
Own account, broker-approved API, source code you control, a working kill switch and clean logs. That covers the vast majority of retail situations, and none of it is hard to build in from the start.
We build systems with these controls included by default — kill switch, structured logging and risk limits, not bolted on afterwards. We hand over the source code, which is also what keeps you in the white-box category.
FAQs
Does a retail trader need SEBI registration?
Not to trade your own account with your own algo. Registration is required the moment you sell strategies, provide advice or operate someone else's account.
Where can I see the list of approved third-party algos?
On your broker's own site. Zerodha, Angel One and others publish the algos they have approved, and that list is the authoritative one for your account.
Why does source code ownership matter for compliance?
It puts you in the white-box category — you have the logic, you can explain it and you can change it. A sealed strategy you cannot inspect is a black box, which carries a heavier approval requirement.
How long should trading logs be kept?
Five years is the sensible minimum. Store them in a database rather than loose text files — you will also want them for debugging long before anyone asks for them.
Need a custom solution?
Instacode builds production-grade software — algo trading, ecommerce, web apps. Let's talk.
Get in Touch
💬 Comments (0)
Be the first to comment 🚀