What algo trading is
An algorithm, or algo, is a set of rules turned into code: when this happens, buy this much; when that happens, sell. The program watches prices and sends orders to your broker by itself, through an API (application programming interface). It can be a simple rule, such as buying at a moving-average crossover with a fixed stop, or a complex model. What it can't do is make a losing idea profitable; it only follows the idea faster and without hesitation.
SEBI's rules for retail algo trading
SEBI's circular of 4 February 2025, "Safer participation of retail investors in Algorithmic trading", set the framework, and NSE's implementation standards of 5 May 2025 filled in the details. After a phased rollout, it applies to all stock brokers from 1 April 2026. The main points:
- The broker is responsible. SEBI says brokers "shall be the principal while any algo provider or fintech/vendor … shall act as its agent".
- Every algo order is tagged with a unique identifier from the exchange, whether it's your own code or a provider's.
- Your own algo needs registration only if it's fast. NSE set the threshold at not more than 10 orders per second per exchange segment; above that, the algo must be registered with the exchange through your broker.
- Static IP. API orders must come from a static IP address you've given your broker, which you can change at most once a week.
- Black-box strategies, where the logic isn't disclosed, can only be offered by providers registered with SEBI as research analysts. Algo providers have to be empanelled with the exchanges.
SEBI had warned years earlier, in June 2022, about unregulated platforms offering algo strategies: "These platforms are unregulated and thus there is no investor grievance redressal mechanism covering their activities." Brokers are also barred from advertising the past or expected returns of algos.
Algo trading platforms in India: broker APIs
If you write your own code, usually in Python, you connect it to your broker's API. Here's what the main ones cost:
| Broker API | Cost | Notes |
|---|---|---|
| Zerodha Kite Connect | Personal API free; Connect ₹500 a month | The free version places orders but has no live or historical market data |
| Upstox API | Free | Upstox says all trading and data APIs are free |
| Dhan (DhanHQ) | Trading APIs free; data API ₹499 a month plus tax | |
| Fyers API | Free | Extended limits with Fyers Prime; up to 100,000 requests a day on the free tier |
Ready-made platforms that let you build strategies without code also exist. Under the framework, the provider has to be empanelled with the exchanges and work through your broker, so check both before you connect one, and never share your login or password with a platform.
Trading automation software: what's legal and what isn't
| Tool | Legal for Indian residents? |
|---|---|
| Your own code on a SEBI-registered broker's API (NSE, BSE) | Yes, under SEBI's algo rules |
| An exchange-empanelled algo provider working through your broker | Yes |
| A 'copy my trades' Telegram group or a platform promising fixed returns | No: unregistered advice, and the kind of offer SEBI warns about |
| An EA on an offshore MT4 or MT5 forex account | No: trading forex with overseas brokers isn't allowed, and MetaTrader is on RBI's Alert List |
Algo trading in forex from India
The legal market is currency derivatives on NSE. You can automate USDINR, EURINR, GBPINR and JPYINR futures and options through a broker API, but those rupee pairs are for hedging a real currency exposure under RBI's rules. EURUSD, GBPUSD and USDJPY contracts have no such purpose restriction, but few brokers offer them; Zerodha, for one, offers only the rupee pairs. NSE's currency segment runs from 9:00 to 17:00 IST for rupee pairs. The USDINR page has the contract details, and the legal forex brokers lists who offers the segment.
Expert advisors on MetaTrader are a different world: see the forex EA guide. With prop firms, where the accounts are simulated, EA rules vary by firm.
AI forex trading: what's real
AI in trading mostly means machine-learning models that look for patterns in past data, or language models that summarise news. They can help with research, testing ideas and writing code. They can't see the future. The US CFTC puts it bluntly: "AI technology can't predict the future or sudden market changes", and "Scammers claim AI-created algorithms can generate huge returns—sometimes tens of thousands of percent—or yield 100 percent 'win' rates."
- Real uses: testing many strategy variations quickly, filtering trades by conditions, summarising economic releases, helping you write and debug code.
- Red flags: "AI" bots with guaranteed or fixed monthly returns, results shown only as screenshots, a requirement to deposit with a particular broker, or a request for your account login.
- The test that still applies: an AI strategy has to survive the same backtest, forward test and small live test as any other.
Before you automate anything
- Prove the strategy by hand or in a backtest first, with real costs.
- Use only your broker's official API or an exchange-empanelled provider.
- Build in a kill switch: a daily loss limit after which the code stops trading.
- Start small, and log every order so you can compare live results with the test.
- Keep your API keys private, and watch the first days of live trading closely.