---
title: "Systematic Execution in India: APIs, Algos &amp; SEBI Rules"
description: "The complete guide to algorithmic trading infrastructure in India. Broker APIs, SEBI's 2025 algo circular, risk controls, compliance."
source_url: "https://www.rupeecase.com/learn/path-10/module-10-3-systematic-execution-in-india-apis-algos-and-sebi-rules"
---

[Path 10 3 of 6](/learn/path-10/)Systematic Execution in India: APIs, Algos & SEBI Rules[Next 10.4](/learn/path-10/module-10-4-paper-trading-to-live-the-hardest-transition)

Writing the strategy is the fun part. Running it every week without a mistake is the job. Between your signal and the exchange sit a broker API with rate limits, a token that expires every day, a [SEBI](/learn/glossary#sebi) framework that went fully live on 1 April 2026, and a market that occasionally halts. This module is the production checklist I wish someone had handed me when I started: the API, the rules, and the boring risk controls that keep a small bug from becoming a large loss.

  **10**Orders per second, per exchange: above this, an algo needs exchange registration

Exchange implementation standards

  **1**Static IP per API app, whitelisted by your broker

SEBI framework, 4 Feb 2025

  **2**Kinds of algo: white box and black box

SEBI framework

  **2026**The year the framework became the only one, from 1 April

Broker notices

## The Indian broker API landscape

Every systematic strategy needs three things from a broker: a way to place and modify orders, a market data feed, and a way to read positions, holdings and funds. Most large Indian brokers now expose all three through an API. The differences that matter for a systematic investor are not the ones in the marketing:

  * **Rate limits.** Brokers cap orders per second and requests per minute. Below the 10 orders per second threshold the exchange treats you as a generic algo; above it you need registration. Pace your orders well below the limit instead of bursting.

  * **Authentication.** Since April 2026, OAuth based login with two factor authentication is the only allowed method, and most brokers require a fresh login once every trading day. Long lived refresh tokens are gone.

  * **Static IP.** Orders are accepted only from an app ID tied to a whitelisted static IP. Your laptop on home wifi is not a production server any more.

  * **Market data.** A streaming socket for live quotes plus REST calls for history. A socket means you own the reconnect logic.

  * **Behaviour under load.** The real test is the 9:15 am open on a gap day and expiry afternoons. Test with small size on those days before you trust the setup with real capital.

Start with whichever API your own broker offers. The broker you pick matters far less than how carefully your code respects that broker's limits.

### Key consideration: authentication and session management

  * **Plan the daily login.** If your broker needs a manual two factor step every morning, your schedule has a human in it. Build the job so that it waits for the session, not one that silently skips the day.

  * **Never put keys in code.** Use environment variables or an encrypted secrets file, and rotate keys if a laptop is lost.

  * **Handle socket drops.** Reconnect with exponential backoff and refresh positions from the REST API after every reconnect, because ticks you missed are gone.

  * **Hold orders while disconnected.** Queue them, then reconcile with the broker's order book before you resend anything.

## SEBI's algo trading framework (February 2025, live April 2026)

On 4 February 2025 SEBI issued "Safer participation of retail investors in Algorithmic trading". The exchanges published the operating standards in mid 2025, brokers ran the old and new setups side by side, and from 1 April 2026 the new framework is the only one. Here is what it actually says.

### Who is responsible

The broker is the principal. Any algo provider or fintech that connects through the broker's API is the broker's agent, must be empanelled with the exchange, and has its complaints handled by the broker. That single line changed the economics of the whole industry: brokers now carry the risk of what runs on their pipes, so they are strict about who gets access.

### The key changes

  1. **Exchanges hold a kill switch.** The exchange can stop an algo that misbehaves, and brokers must be able to do the same.

  2. **Exchanges hold a kill switch.** The exchange can stop an algo that misbehaves, and brokers must be able to do the same.

  3. **Exchanges hold a kill switch.** The exchange can stop an algo that misbehaves, and brokers must be able to do the same.

  4. **Exchanges hold a kill switch.** The exchange can stop an algo that misbehaves, and brokers must be able to do the same.

  5. **Exchanges hold a kill switch.** The exchange can stop an algo that misbehaves, and brokers must be able to do the same.

One more operational rule is easy to miss. NSE does not accept market orders from algos in the normal session; brokers convert them to limit orders with a price protection band. Algo market orders are allowed in the Closing Auction Session and, since 7 September 2026, in the first five minutes of the pre-open.

### What it means for a systematic investor

  * **A rebalance script that sends 40 orders over two minutes** stays far below 10 orders per second. It needs the static IP and daily login, not a separate exchange approval.

  * **A script that fires 40 orders in one second** crosses the line. Add a pacer that spaces orders out.

  * **Selling your strategy to others** is a different business. Then you are an algo provider who must be empanelled, and a black box provider needs Research Analyst registration.

    **Myth**You need SEBI registration to run your own trading script.

    **Fact**You need broker API access with a static IP and daily two factor login. Exchange registration comes in only above 10 orders per second, and provider rules only if you share the algo beyond your family.

## Building your first systematic execution pipeline

The architecture is simpler than the regulation: signal, order management, execution, monitoring.

  1. **Monitoring**Reconcile fills, log errors, alert on anything odd.

  2. **Monitoring**Reconcile fills, log errors, alert on anything odd.

  3. **Monitoring**Reconcile fills, log errors, alert on anything odd.

  4. **Monitoring**Reconcile fills, log errors, alert on anything odd.

### Signal generation

Your model turns data into target weights once per cycle. Run it on a schedule, store the output with a timestamp, and never let the execution code recompute it on the fly. If a weekly job runs at 8:30 am on rebalance days, you can read the targets before the market opens and stop the run if something looks wrong.

### Order management

  1. **Place and log.** Every request, response and error, with a timestamp.

  2. **Place and log.** Every request, response and error, with a timestamp.

  3. **Place and log.** Every request, response and error, with a timestamp.

  4. **Place and log.** Every request, response and error, with a timestamp.

  5. **Place and log.** Every request, response and error, with a timestamp.

### Execution

Limit orders priced a tick or two through the best price are the workhorse. Good till triggered and after market orders are broker features, not exchange order types, so read your broker's rules before you depend on them. For F&O stocks you can also aim at the closing auction if your model is built on closing prices.

### Monitoring and error handling

  * **Partial rebalance.** Five orders went through and the API failed on the sixth. Decide in advance: retry with backoff, finish manually, or leave the rest for the next cycle. Whatever you choose, log it.

  * **Lost response.** You sent an order and the connection died before the reply. Query the order book with your own order tag before resending. Placing the same order twice must never produce two fills. That property is called idempotency.

  * **Paper first.** Run the full pipeline against paper orders for at least two rebalance cycles before money touches it.

  What would you do?

### Your script sends a buy order and the connection drops before the reply comes back. The market is open.

    1. **Switch to market orders to be safe**Market orders from algos are converted or rejected in the normal session, and it does not answer whether the first order went through.

    2. **Switch to market orders to be safe**Market orders from algos are converted or rejected in the normal session, and it does not answer whether the first order went through.

    3. **Switch to market orders to be safe**Market orders from algos are converted or rejected in the normal session, and it does not answer whether the first order went through.

  Illustration of the idempotency rule in this module.

## Risk controls every algo must have

These are the controls that stop a typo from becoming a headline.

### Position limits

  **Worked example.** Portfolio ₹10 lakh, single stock cap 15%, so ₹1.5 lakh. You already hold ₹80,000 of a stock. The model says buy ₹1 lakh more. ₹80,000 plus ₹1 lakh is ₹1.8 lakh, over the cap. The control trims the order to ₹70,000 and logs why.

### Order rate limits, self imposed

Set your own ceiling well below 10 orders per second, say 3 or 4. A bug that loops will hit your ceiling before it hits the exchange threshold and your broker's patience.

### Daily loss kill switch

If the portfolio is down more than a set amount in a day, stop sending new orders and alert yourself. For a long only rebalance strategy this is less about trading losses and more about catching a broken data feed that suddenly says sell everything.

### Fat finger protection

Cap the value of any single order and reject quantities that are a multiple of what the model expected. One extra zero is the classic mistake, and it is always a code mistake, never a market one.

### Market hours and halt awareness

Check the exchange status before every batch. Outside 9:00 am to 3:30 pm, on holidays, or during a market wide circuit breaker halt, queue instead of sending.

### Duplicate order detection

A scheduler that fires twice will place every order twice unless your code checks the open order book for the same tag first. Use a deterministic tag per rebalance per stock, such as the date plus the symbol plus the side.

## Common mistakes

  * **Running production from a laptop.** Static IP rules make this fragile. A small cloud server with a fixed IP is the norm now.

  * **Assuming the token lasts.** Daily login is the rule since April 2026. Plan the morning.

  * **Sending market orders from code.** They are converted or rejected in the normal session. Price your orders.

  * **Trusting your own position file.** Corporate actions, manual trades and partial fills make it drift. Read holdings from the broker every run.

  * **Sharing your script with friends.** A self built algo can be used for your family only. Anyone beyond that turns you into a provider under the framework.

## How this shows up in RupeeCase

RupeeCase exists so that an investor does not have to build any of this. Each index is a published algo: universe, cadence and rebalance history are on its page, model back tested. On a rebalance day you see what changes, you approve, and the orders go to your own broker for your own demat account. The fee is one line, 0.2% of the value traded. If you would rather see the rebalance flow before you read more rules, start with [getting started](/getting-started), then open an index such as [Large Midcap](/strategies/large-midcap) to see a two week cadence in practice.

  On a rebalance day you review the changes and confirm; the orders go to your own broker. Sample data, portfolio 1001.

## Questions people ask me

Do I need SEBI registration to run my own trading script?No. You need your broker's API access with a static IP and daily two factor login. Registration with the exchange through your broker comes in only if your algo crosses the threshold of 10 orders per second per exchange. Selling or sharing an algo with people outside your family is what triggers provider rules.

What is the difference between a white box and a black box algo?A white box algo discloses its logic and can be replicated. A black box algo does not. Under the February 2025 framework a black box provider must register as a SEBI Research Analyst and keep a research report for each algo.

Can my algo place market orders?In the normal session NSE does not accept market orders from algos; brokers convert them to protected limit orders. Algo market orders are allowed in the Closing Auction Session and in the first five minutes of the pre-open from 7 September 2026.

## What to remember

  * The SEBI retail algo framework of 4 February 2025 has been the only framework since 1 April 2026.

  * Brokers are principals; algo providers are their empanelled agents.

  * Static IP, OAuth and daily two factor login for every API order.

  * Above 10 orders per second per exchange, an algo needs exchange registration.

  * Black box providers need Research Analyst registration.

  * Position caps, rate limits, kill switch, fat finger checks and duplicate detection are not optional.

What does Systematic Execution in India: APIs, Algos & SEBI Rules cover?The first algo I deployed made 47 trades in 3 minutes. It also violated 2 SEBI regulations I didn't know existed. Here's everything I learned the hard way about algorithmic trading in India, from broker APIs and SEBI's 2025 circular to risk controls that keep your strategy from blowing up. It works through The Indian broker API landscape, SEBI's algo trading framework (February 2025, live April 2026), Building your first systematic execution pipeline, Risk controls every algo must have and more. It is module 10.3 of Path 10, Strategy Implementation and Execution, about 10 minutes of reading, free.

TTry it

## Systematic Execution in India: APIs, Algos & SEBI Rules, in numbers.
Throughput and order pacing within typical retail API limits Your numbers, the module's formula, nothing stored.

Calculator

### Broker API Rate Budget
Indian broker APIs throttle retail accounts at 7 to 10 orders per second on average. This budget calculator shows whether your strategy fits.

Universe size (stocks)Avg orders per rebalance per stockBroker API limit (orders/sec)Acceptable rebalance window (minutes)

  AApply it on RupeeCase

## Allcap Multi Asset
50 stocks, 10% debt, 10% gold. The broad-market engine with a cushion. An index built on the rules this path teaches, live execution case study, two week rebalance, held stock by stock in your own demat. Risk band: Moderate.

  [See the strategy](/strategies/allcap-multi-asset)[Sign up for RupeeCase](https://invest.rupeecase.com/signup?strategy=allcap-multi-asset)

  [CAGR40.5%Sharpe1.81Max DD−21.3%Minimum281000Model, back tested, as of 27 Apr 2026. Not client returns, not a promise.](/strategies/allcap-multi-asset)

QQuick check

## 10 questions, 7 to pass.
Pick an answer and the explanation appears. Your result stays on this device and counts towards the Path 10 certificate.

CCheck yourself

## Path 10 so far.
Your quick check results on this device, stop by stop.

1. [TPath test, 30 questionsNot yet](/learn/path-10/module-10-6-scaling-when-your-strategy-meets-capacity#pathTestSection)
2. [TPath test, 30 questionsNot yet](/learn/path-10/module-10-6-scaling-when-your-strategy-meets-capacity#pathTestSection)
3. [TPath test, 30 questionsNot yet](/learn/path-10/module-10-6-scaling-when-your-strategy-meets-capacity#pathTestSection)
4. [TPath test, 30 questionsNot yet](/learn/path-10/module-10-6-scaling-when-your-strategy-meets-capacity#pathTestSection)
5. [TPath test, 30 questionsNot yet](/learn/path-10/module-10-6-scaling-when-your-strategy-meets-capacity#pathTestSection)
6. [TPath test, 30 questionsNot yet](/learn/path-10/module-10-6-scaling-when-your-strategy-meets-capacity#pathTestSection)
7. [TPath test, 30 questionsNot yet](/learn/path-10/module-10-6-scaling-when-your-strategy-meets-capacity#pathTestSection)

    Explore next

## Put the module to work.

* [GuideQuant investing in India, for retail investorsQuant funds, rules based indices and your own algo, and what SEBI's 2025 rules changed.](/guides/quant-investing-for-retail)
* [StrategyAllcap Multi Asset strategyNifty Total Market, 52 stocks, every 2 weeks](/strategies/allcap-multi-asset)
* [Free module 10.4Paper Trading to Live: The Hardest Transition9 min read](/learn/path-10/module-10-4-paper-trading-to-live-the-hardest-transition)
* [Learn guidePortfolio Construction and Execution for Indian InvestorsA pillar guide across the paths](/learn/portfolio-construction)

      Community

## Join my WhatsApp group.

      Scan the code, fillFill one short form, and join my WhatsApp group. Slides, sources, factsheets and the rebalance logs live there, and members join a daily Google Meet with me.

        [Sign up for RupeeCase](https://invest.rupeecase.com/signup)
        [Join the WhatsApp group](https://forms.gle/C6HMtM1Z2GfeocQV7)

      [One form, one group](https://forms.gle/C6HMtM1Z2GfeocQV7)Scan with your phone camera

SSources

## Where the figures come from.

1. [NISM Series VIII, Equity Derivatives workbook (algorithmic trading and risk controls)](https://www.nism.ac.in)
2. [NISM Series VIII, Equity Derivatives workbook (algorithmic trading and risk controls)](https://www.nism.ac.in)
3. [NISM Series VIII, Equity Derivatives workbook (algorithmic trading and risk controls)](https://www.nism.ac.in)
4. [NISM Series VIII, Equity Derivatives workbook (algorithmic trading and risk controls)](https://www.nism.ac.in)
5. [NISM Series VIII, Equity Derivatives workbook (algorithmic trading and risk controls)](https://www.nism.ac.in)

GTerms

## 7 terms from this module.
Algo IDThe unique identifier an exchange issues so every API order can be traced to its algo and client. Required under the 2025 framework.
Orders per second thresholdSet at 10 per exchange. A self built algo that stays below it carries a generic tag; above it, it must be registered with the exchange through the broker.
Static IP whitelistingAPI orders are accepted only from a fixed IP address registered with the broker for that app.
White box algoAn algo whose logic is disclosed and can be replicated.
Black box algoAn algo whose logic is not disclosed. Its provider must register with SEBI as a Research Analyst and keep a research report for each algo.
IdempotencyThe property that sending the same order request twice never produces two fills. Achieved with a deterministic order tag and a check of the open order book.
Kill switchA control that stops all new orders from an algo at once. Exchanges, brokers and well built strategies each have one.
[All 91 terms in the glossary](/learn/glossary)

[From the podcast archiveEP29: Pro Just Reset. Day One Of May Series. Buy Dips With HedgeThe Tanmay Edge, 29 Apr 2026, graded 3/5](/podcast/episodes/2026-04-29)[Pillar guidePortfolio Construction11 modules across paths 4, 10](/learn/portfolio-construction)

Education only, not investment advice. RupeeCase is a technology platform operated by QC Alpha Technologies Pvt Ltd; it is not a fund, a PMS or a SEBI registered investment adviser. Model returns are back tested and not a promise of future returns. Figures carry the date they were checked.
