How to connect Upstox
- Create an API app. In your Upstox account, open My Apps on the developer page and create an app. Note its API key and secret.
- Assign your static IP to the app in the same section.
- Add the app in QuantPower. Open broker settings, choose Upstox and enter your API key and secret.
- Log in on Upstox's page with your Upstox login details and two-factor code.
- Check the connection. Your funds, holdings and positions should appear in QuantPower.
- Test before you go live. Run a new strategy in paper trading first, then deploy it on your account with a small size.
If you are new to the Upstox API for algo trading, our guide to the trading API explains how order and data APIs work.
Upstox API rules since April 2026
SEBI's framework for retail algo trading has applied to every broker since 1 April 2026. Upstox's notices to API users set out how it applies the rules.
| Rule | What it means on Upstox |
|---|---|
| Your own API app | One active app per user; when you create a new app, the older ones are removed |
| Registered static IP | Requests to place, modify or cancel orders, including multi-order and GTT requests, must come from the IP assigned to your app |
| Changing the IP | Allowed once a week |
| Daily login | Every API session needs a login with two-factor authentication, and it ends before the next trading day |
| Order rate | Algos that send more than 10 orders a second must be registered with the exchange through Upstox |
| Market orders | Market and SL-M orders get market protection by default, which limits how far from the last price they can fill |
The static IP is the fixed public address of the computer or VPS that sends your orders. QuantPower runs on your own computer or VPS, so your API key stays with you and orders go to the Upstox API from the static IP you register with Upstox. Keep that computer or VPS secure, and keep it on and logged in to Upstox during market hours.
QuantPower is trading software. It is not a stockbroker or a SEBI-registered investment adviser or research analyst, and it gives no tips, calls or buy and sell advice. The strategies it runs are your own rules, fully visible to you, and Upstox checks every order for price, quantity, margin and order rate before it reaches the exchange. Ready-made strategy templates, such as straddles and iron flies, load into the strategy builder; you edit and run them as your own strategy.
What QuantPower can and cannot do
| QuantPower can | QuantPower cannot |
|---|---|
| See your funds, holdings, positions and orders | Withdraw money from your Upstox account |
| Place, modify and cancel orders for your strategies | Change your bank account, address or nominee |
| Exit positions when your MTM stop loss is hit | See the password, PIN or code you type on Upstox's page |
| Read live prices for your strategies | Trade after your session has ended |
Upstox API trading: costs and charges
Upstox is one of the brokers in India with a free option trading API: it charges nothing for the order APIs or for live and historical market data, which QuantPower uses for live prices. You pay brokerage and statutory charges.
| Item | Upstox |
|---|---|
| Order and account APIs | Free |
| Live and historical market data | Free |
| Options | ₹20 per order |
| Futures | ₹20 or 0.05%, whichever is lower |
| Equity intraday | ₹20 or 0.1%, whichever is lower |
| Equity delivery | Up to ₹20 per order |
Statutory charges are the same at every broker.
Every trading day
- Before 9:15 am: log in to Upstox from QuantPower. Strategies scheduled before you log in will not trade.
- Before each entry: check free margin. Option buyers pay the full premium upfront, and sellers need SPAN and exposure margin.
- On expiry day: short index options expiring that day need an extra 2% exposure margin.
- After the close: your session ends before the next trading day, which starts with a fresh login.
Things to know about Upstox
- One app for all your tools. If another platform or your own code already uses an Upstox API app, creating a new app for QuantPower removes the old one. Decide which tool uses the app before you create it.
- Stop losses in options. NSE does not accept SL-M orders in options, so Upstox rejects them. Build options strategies with limit and stop-loss limit orders.
- Multi-leg strategies. A short straddle sends two orders at entry and an iron condor four. Space the legs so your account never sends 10 or more orders in a second.
- A changing IP stops orders. If your internet provider changes your address, Upstox blocks orders until you assign the new one. A fixed IP from your provider or a VPS avoids this.
Related guides
- API vs webhook: when a TradingView alert should send the order
- Broker connection requirements: the checklist before you connect any broker
- Brokerage calculator: the full cost of a trade at each broker
- Fyers algo trading: connecting a Fyers account
Start your free trial
Connect your broker, build a strategy and test it on paper before a single live order goes out.
Frequently asked questions
Does QuantPower see my Upstox password?
No. You type your login details and two-factor code on Upstox's own page. QuantPower receives and stores only an access token for the day's session.
Do I need a static IP for the Upstox API?
Yes. Upstox accepts order requests only from the static IP assigned to your API app, and you can change it once a week.
Is the Upstox API free for algo trading?
Yes. Upstox charges nothing for its order APIs or for live and historical market data. You pay brokerage, such as ₹20 per option order, and statutory charges.
Can I have more than one Upstox API app?
No. Upstox allows one active API app per user. Creating a new app removes the older ones, so plan which tool uses it.
Why was my stop-loss order rejected on Upstox?
SL-M orders are not allowed in options on NSE. Use a stop-loss limit order with a buffer between the trigger and the limit price.
What if the Upstox login fails?
Check that your phone's clock is on automatic time for two-factor codes, and that pop-ups are allowed for quantpower.tech. If the login works but orders fail, check that they come from the static IP assigned to your app.
Sources
- SEBI, circular on safer participation of retail investors in algorithmic trading, 4 February 2025, and glide-path circular, 30 September 2025 (sebi.gov.in)
- NSE, implementation standards for retail algo trading, 5 May 2025, and operational modalities, 22 July 2025 (nseindia.com)
- SEBI, measures to strengthen the equity index derivatives framework, 1 October 2024
- NSE, circular NSE/FAOP/49677 on discontinuation of stop-loss market orders in options, September 2021
- Upstox, notices on new SEBI and exchange mandates for API trading from 1 April 2026, the notice that the changes are live, and the static IP setup guide (community.upstox.com) (checked 20 October 2026)
- Upstox: brokerage help page, and trading API page stating that all trading and data APIs are free of cost (upstox.com) (checked 20 October 2026)
