5paisa API Algo Trading
5paisa automation runs your own rules on your own 5paisa account, through 5paisa’s Xstream API. We build your 5paisa API algo trading tool to your requirement, and Telegram, WhatsApp, Discord, TradingView or logic inside the software can drive it.
You run it under your own Xstream keys; we build it and hand it over. AlgoDevelop is a software developer, not a SEBI-registered intermediary. We don’t send signals or advice, and we never touch your 5paisa funds.
On this page
- What 5paisa API algo trading means
- How the Indian copiers handle 5paisa
- What we build for 5paisa
- Where the signals come from
- The access token that ends at 11:59 PM
- Your static IP, SEBI’s rules and the Algo ID
- Options, scrip codes and the expiry
- Limits and square-off
- Where you stand
- How a custom build works
- Questions on 5paisa API algo trading
What 5paisa API algo trading means
API algo trading on 5paisa means software that holds a session to your own account and places orders when your rules fire. The orders appear in your normal 5paisa order book, while your funds and your login stay with you.
Your algo software talks to 5paisa through Xstream, the broker’s own API, which 5paisa describes as free. The Xstream API documentation covers orders, positions, the market feed, historical candles and live order updates.

How the Indian copiers handle 5paisa
For many 5paisa API algo trading jobs, a ready-made app is enough. Our two Indian copiers place Xstream orders at 5paisa, one of their ten brokers. With the Telegram to Indian broker copier, a call in your channel becomes a 5paisa order. The TradingView to Indian broker copier turns an alert from your chart into one.
Xstream is unlike most broker APIs, and both apps handle these quirks for you:
- The envelope. Every call wraps the request in a head with your app key and a body. Since 5paisa answers HTTP 200 even to a refusal, the app reads the status inside the reply.
- Code letters. 5paisa writes the exchange as N, B or M, the segment as C, D or U, and the side as B or S. The app sends exactly those.
- Limit orders only. 5paisa now refuses a price of 0, the old market order. With “Send market signals as protective limits” on, the default, the app sends a market signal or an exit as a limit 0.5% through the live price. With the switch off, or with no live price, it still sends 0, which 5paisa rejects. The app also refuses an unknown order type, or a stop with no trigger, before sending.
- Stops that move. A stop goes out with its real trigger price. Later, the app moves it using the exchange order id, which it reads from your order book.
- No lost duplicates. Each order carries its own unique reference, so 5paisa does not swallow a second order as a repeat of the first.
Both copiers trade 5paisa options and shares, found by code in its scrip master. For futures or MCX contracts, we write a custom build instead.

What we build for 5paisa
When the copiers do not fit, we write 5paisa API algo trading software around your own rules instead. That can mean:
- A custom 5paisa API integration, built to your specification.
- Your own rules automated, with you defining the logic.
- Order handling you configure, for equity and F&O.
- Risk limits, position sizing and square-off rules you set.
- Software that runs on your own 5paisa API access.
- The full source and documentation, handed over to you.
Where the signals come from
- Telegram: the calls in your channels, groups and bots, read as they arrive.
- WhatsApp or Discord: groups, servers and forwarded calls.
- TradingView: a webhook alert from your own strategy or indicator.
- Logic inside the software: with no outside source at all.
Several can run at once, each with its own size and limits.
The access token that ends at 11:59 PM
An Xstream access token lasts one day, and 5paisa ends it at 11:59 PM. NSE’s standards ask for the same thing: every API session must be logged out before the next trading day. So 5paisa API algo trading starts each morning with a fresh login.
After you log in, 5paisa returns a request token, and the software swaps it for the day’s access token with your app key, encryption key and user ID. 5paisa’s integration flow now describes a web (OAuth) login for this step, in line with SEBI’s move to OAuth-based API logins.
In the ready-made copiers, you paste the day’s access token on the 5paisa account each morning. Test the connection confirms 5paisa accepts it, and a dead token shows up as a plain message.

Your static IP, SEBI’s rules and the Algo ID
SEBI’s framework for retail algo trading applies to every broker from 1 April 2026, the date set by SEBI’s circular of 30 September 2025. At 5paisa, you file a static IP against your API key, and every order must come from it. The rule covers order placement only, not the market feed. NSE’s implementation standards (NSE/INVG/67858) allow one primary IP plus an optional secondary, changed no more than once a calendar week. A fixed-IP VPS works, while a changing home address does not.
Since 1 April 2026, 5paisa API algo trading runs on limit orders only. 5paisa’s compliance notice says Xstream no longer accepts market orders. It points to a market price protection (MPP) option instead, which a custom build can use where it fits.
Each client can run one non-algo app at up to 10 orders a second, with no Algo ID. You need an Algo ID, issued by 5paisa support, only for an algo that sends more than 10 orders a second; those apps get 25. Broker limits checked against 5paisa’s docs on 4 Nov 2026.

Options, scrip codes and the expiry
5paisa names each contract by a scrip code, plus its exchange and segment letters. An instruction like “NIFTY 24600 CE” therefore means nothing until the software finds the right code for that strike and expiry. Those codes change at every expiry, so software with hard-coded codes works for a week and then stops.
The copiers therefore download 5paisa’s scrip master and reload it every six hours. With no expiry named, they take the nearest one that has not passed. If 5paisa ever changes the file’s format, the app stops and says so rather than guess.
Limits and square-off
Each 5paisa account you add to either copier carries its own limits:
- No more than 10 orders a day at first, and a ceiling on lots per order.
- A rupee limit for every order, and a cap on positions held open.
- Orders only between 09:15 and 15:15 by default, and a kill switch that stops new ones.
5paisa marks each order as intraday or delivery with a single flag. The app sets that flag from your product choice, so a position you meant to carry does not go out as intraday. Then set your own square-off time, and the app squares off what is still open before 5paisa’s own square-off. If you carry positions overnight, leave the time blank.

Where you stand
Orders from your own 5paisa account and Xstream keys are your own trades, made with software you commissioned. Under NSE’s standards, software that runs your own rules from your own registered static IP is a client-generated algo. Strategies sold or run by a provider follow different rules, such as broker hosting and provider empanelment.
AlgoDevelop provides software only. We are not a SEBI-registered intermediary, adviser or research analyst, and we are not your broker or fund manager. We don’t run the software for you or promise any outcome. You are responsible for making sure your own use follows SEBI and exchange rules. If you are unsure, ask a qualified professional, and read whether copy trading is legal in India.
How a custom build works
- Share your requirements. Send your strategy, your broker and your goals on WhatsApp. We scope it and reply with a fixed quote (see pricing).
- Development and testing. We build the software, test it on demo or backtest data and share progress. You review it before anything goes live.
- Delivery and support. You get the finished tool with a setup walkthrough, plus support afterwards for any changes.
Before real money moves, run a session with trading switched off, or use Paper mode in a ready-made copier. Trading elsewhere too? See Zerodha, Angel One, Dhan, IIFL, Groww, Kotak Neo or every broker we automate. When you are ready, ask for a quote.
Questions on 5paisa API algo trading
Is there a ready-made 5paisa bot?
Yes, two. Our Telegram and TradingView Indian copiers both place 5paisa orders through Xstream, using your own app key. Beyond that, we write custom 5paisa API algo trading software for what they leave out, such as futures.
What do I need for 5paisa API algo trading?
Your own Xstream API credentials: the app key, user ID and encryption key that 5paisa issues to you. 5paisa describes its trading APIs as free.
Does the 5paisa access token need renewing every day?
Yes, once each trading day. Make it after midnight and before the 9:15 open, because a token made the evening before stops working at 11:59 PM.
Why will it not send a plain market order?
Because 5paisa refuses one now. Leave “Send market signals as protective limits” on in the copier, and use SL rather than SL-M stops, since the app sends an SL-M stop with a price of 0.
Why does 5paisa need my static IP?
SEBI’s retail algo rules require it. Since 1 April 2026, 5paisa accepts API orders only from the static IP filed against your API key. So the app’s Dashboard shows the address 5paisa will see, ready to copy.
Can it turn “NIFTY 24600 CE” into the right 5paisa scrip code?
Yes. The software finds the right scrip code for the strike and expiry in 5paisa’s own scrip master, because those codes change at every expiry.
Does AlgoDevelop pick trades or run my 5paisa account?
No. We only develop the software to your specification. We supply no trading signals or advice, and we do not operate your account, because you do.
Do I own what you build?
Yes. You receive the full source and documentation, and it runs on your own computer or server, under your own Xstream keys.
What about SEBI compliance?
Under NSE’s standards, a client’s own algo below 10 orders a second needs no exchange registration, but it must come from your registered static IP. The rest of compliance is yours; ask a qualified professional if unsure.