Free trial
Menu
Broker integrationUpstox API

Use the Upstox API for Algo Trading with QuantPower

Connection guide. Verify current release/account availability before relying on this setup. Check Available connections.

Using the Upstox API for algo trading with QuantPower, your own strategy rules run on your Upstox account through Upstox's official API. You create your own API app, register a static IP with Upstox and log in each trading day with two-factor authentication, and your funds and securities stay with Upstox.

What you need
  1. 01An Upstox trading account, with F&O enabled if you trade options or futures.
  2. 02Your own Upstox API app, created free, with its API key and secret. It must be the one active app on your account.
  3. 03A static IP address assigned to that app. Upstox blocks order requests from any other address.
  4. 04Your Upstox login with two-factor authentication, once every trading day.
  5. 05A QuantPower plan with algo bots. The QuantPower Standard plan is free during the Beta (₹299/month after); Professional is ₹499/month and Ultimate ₹999/month, GST extra. See pricing.
Key point
Since 1 April 2026, Upstox accepts API orders only from the static IP assigned to your app, and it allows one active API app per user. Strategies on your account must also stay under 10 orders a second.

How to connect Upstox

  1. 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.
  2. Assign your static IP to the app in the same section.
  3. Add the app in QuantPower. Open broker settings, choose Upstox and enter your API key and secret.
  4. Log in on Upstox's page with your Upstox login details and two-factor code.
  5. Check the connection. Your funds, holdings and positions should appear in QuantPower.
  6. 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.

RuleWhat it means on Upstox
Your own API appOne active app per user; when you create a new app, the older ones are removed
Registered static IPRequests to place, modify or cancel orders, including multi-order and GTT requests, must come from the IP assigned to your app
Changing the IPAllowed once a week
Daily loginEvery API session needs a login with two-factor authentication, and it ends before the next trading day
Order rateAlgos that send more than 10 orders a second must be registered with the exchange through Upstox
Market ordersMarket 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.

How an algo order reaches the exchange: your strategy in QuantPower on your own computer or VPS, your static IP registered with your broker, your broker's checks, then the exchange (illustration)

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 canQuantPower cannot
See your funds, holdings, positions and ordersWithdraw money from your Upstox account
Place, modify and cancel orders for your strategiesChange your bank account, address or nominee
Exit positions when your MTM stop loss is hitSee the password, PIN or code you type on Upstox's page
Read live prices for your strategiesTrade 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.

ItemUpstox
Order and account APIsFree
Live and historical market dataFree
Options₹20 per order
Futures₹20 or 0.05%, whichever is lower
Equity intraday₹20 or 0.1%, whichever is lower
Equity deliveryUp to ₹20 per order
Example
A strategy that sends 20 option orders a day for 22 trading days places 440 orders a month. At ₹20 an order, brokerage comes to ₹8,800 before GST and statutory charges, far more than any API fee.

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.

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)
Broker names are trademarks of their owners. Charges and broker rules change, so check Upstox's current pages before you trade. This page is for information and is not investment advice. Trading involves substantial risk.