TradingView to Upstox Copier: Simple Setup in 9 Steps
If you trade from TradingView and keep your account at Upstox, the slowest part of each trade is usually you. You read the notification, open the Upstox app and tap in the strike. TPcopier removes that part with the Indian TvCopier, a Windows program that receives your alerts and places them at Upstox through its API. That is TradingView to Upstox, done the way SEBI's retail algo rules allow since 1 April 2026.
The rules decide where the software runs. Upstox accepts an API order only from a static IP registered to you, so the order must leave your own PC or VPS. A cloud server cannot send it for you. The TradingView webhook app for Indian brokers lists what it refuses before an order reaches Upstox.
It asks one habit of you, and it is a morning one. An Upstox access token lasts a single trading day, so you paste a fresh one before the open. After that, the alert, the contract lookup, the order and the exit all run without you.
What you need for TradingView to Upstox
- An Upstox API app with your static IP registered on it.
- A Windows PC or VPS on that IP, switched on before 09:15.
- Webhook alerts, which need a TradingView plan that can send them.
- Port 80 open to that machine, so TradingView can send each alert straight to it. That is the only way in, so the connection needs its own public IP.
- A TPcopier account, which issues your licence key.
- Two minutes every trading morning for the token.
Upstox's own API documentation covers the Upstox side of the set-up.
The daily Upstox token
Open Accounts > + Connect a broker > Upstox in the software. You see three fields, but only one of them is required:
- Access token. Its hint says it plainly: it expires every trading day, so generate it each morning from your Upstox app's login.
- API key and API secret. Both are optional here, because the software never signs in with them.
Paste the token and press Save this account. Then press Test the connection. A live token answers "connected as" and your Upstox user name. A stale one answers "the access token has expired - Upstox tokens last one trading day".
If an order meets a dead token, Upstox refuses it and the Signal Feed shows Upstox's own error. UDAPI100050 is the code that means the token is dead. So put the paste into your pre-open routine, next to checking margin. An alert at 09:16 on yesterday's token simply fails, and the software never retries a rejection.
TradingView to Upstox in 9 steps
At Upstox and on tpcopier.com
-
At Upstox, create the API app and register the static IP of the machine that will run the software. The program shows that IP on its Dashboard in step 5, if you need to look it up first.
-
On tpcopier.com, open the Indian copier page, press Get the free demo and sign up.
-
Take the key and the program. The Indian TvCopier card in your account has Get my free demo key and Download for Windows. One key activates one computer.
On the PC or VPS
- Install and activate on the static-IP machine. Windows 11 already has the WebView2 runtime the program needs, and on Windows 10 it offers to install it. Paste your key into the first screen and press Activate.
The first screen of the program: paste the TPC- key and press Activate (example).
-
Compare the IP. The Static IP line on the Dashboard should match the IP you registered at Upstox. If it doesn't, Upstox refuses every order.
-
Connect Upstox. Open Accounts, press + Connect a broker and pick Upstox. Paste today's access token, save, and test the connection.
A new Upstox account: the access token is required, the API key and secret are optional (example).
Port 80 and the alert
-
Open port 80. On the program's TradingView page, press Allow port 80 in Windows Firewall, and Allow access if Windows asks about the network. At home, forward port 80 on your router to this PC. On a VPS, open it in the provider's firewall too.
-
Read the checks. The same page shows whether the program is listening on port 80, whether the firewall rule is there, and the machine's public address. Then copy the address under 1 The webhook URL, marked DIRECT. Only TradingView's own servers can place orders through it, but don't screenshot it.
On a home Jio or Airtel line TradingView usually cannot reach the PC at all, because the address is shared. Run the program on a Windows VPS with a static IP instead, and send a test alert from TradingView to see it arrive in the Signal Feed.
- Build the alert in TradingView, with that address as the webhook URL and your JSON as the message. A plain-text message is refused. Before the open, paste that JSON under Try it before the market opens and press Read it. The program shows the contract, size and price it would use, and sends nothing.
Read it on an example alert: every rule the reader applied, and nothing sent to Upstox.
After that, each real alert shows up in the Signal Feed, with Upstox's own words when it refuses one.
The Signal Feed, newest first, with a { } button on every row (example).
How the software finds the contract at Upstox
Upstox's API never takes a trading symbol. Instead, every call names an instrument by its instrument key, which looks like NSE_FO|43919. That key exists only in Upstox's own instrument list. So the software downloads that list, a gzipped JSON file, and finds the contract your alert describes. Your alert only says what a trader would say.
Here is an example for a share, not a recommendation: 50 RELIANCE at a limit of 2,900.
{"action": "BUY", "symbol": "NSE:RELIANCE", "quantity": 50, "price": 2900, "source": "reliance-swing"}
The software reads NSE:RELIANCE, the way TradingView's ticker writes it, as RELIANCE. A share listed on both exchanges appears twice in Upstox's list. In that case the software takes the NSE line and uses BSE only when there is no NSE listing. It refuses a share alert that states no quantity.
An option, sized the way a Pine strategy sends it:
{"action": "BUY", "symbol": "NIFTY", "strike": 24600, "option_type": "CE", "quantity": 2, "source": "nifty-trend"}
On an option, the software reads quantity as lots, because that is what TradingView's contracts placeholder means. So this asks for two NIFTY lots at the lot size in Upstox's list. Every account's Most lots in one order starts at 1, though, so raise it before you send two. This alert also has no price, so it goes through the protective limit below.
Orders above the freeze quantity
The exchange refuses a single F&O order bigger than its freeze quantity. For Upstox, the software sets the order's slice flag. Upstox then cuts an oversize order into legal pieces itself, and the total never changes.
The Signal Feed tells you what happened. It reads "accepted - above the exchange freeze quantity, so it was placed as" a number of orders, then lists every order id. That way you are not looking for one order at Upstox and finding three.
Market orders, the protection band and stops
Convert market signals into protective limits is on for every new account. With it on, an alert without a price goes to Upstox as a LIMIT. For a buy, that is the last traded price plus 0.5%, and for a sell it is minus 0.5%. The software then snaps it to the contract's tick, after converting Upstox's tick sizes from paise. If it cannot read the last price at that moment, it sends a market order with the band below.
Switch it off, and a price-less alert goes out as a real MARKET order. An API market order must carry a protection band, so the software sends the account's Market protection band with it. Upstox takes whole percent from 1 to 25, and the box starts at 3. A setting below 1 goes as 1, because Upstox refuses 0. A negative number asks Upstox for its own automatic band. The same band also travels with an SL-M stop, since that order turns into a market order once it triggers.
The rest maps simply for TradingView to Upstox. Product Intraday goes as I, and Delivery / carry as D. Validity is Day or Immediate or cancel. When Variety is After-market (AMO), the software raises Upstox's AMO flag. Stops, once you switch them on, go out after the entry has filled, as SL or SL-M.
Upstox refusals and what to do
- "Upstox has no NIFTY 24650 CE - check the strike is one the exchange actually lists": the strike sits on NIFTY's 50-point step, but Upstox has no such contract.
- "has no ... expiry at Upstox. Nearest: ...": Upstox does not list the
expiryin your alert. Correct the date, or leave it out for the nearest. - "is not in the Upstox NSE cash list": check the symbol against the NSE listing.
- HTTP 429: this is Upstox's rate limit, not a fault in the order, and it clears by itself in a second.
Outside the 09:15 to 15:15 window the software places nothing. It also refuses futures alerts, and it drops an identical alert that arrives within five minutes as a repeat.
FAQ
How long does an Upstox access token last?
One trading day. Paste a new one each morning on the Accounts page and press Test the connection. For how Upstox issues it, check Upstox's own API documentation.
Do I need my Upstox API key and secret for TradingView to Upstox?
No. Both fields are optional in the software, and it places every order with the access token alone.
Can TradingView send market orders to Upstox?
Yes, if you switch off protective limits on that account. The order then carries the market protection band you set, from 1 to 25 percent.
What happens when a signal is bigger than the freeze quantity?
Upstox splits it into legal pieces, because the software sends it with the slice flag set. The total stays the same, and the log lists every piece's order id.
Can the same alert trade Upstox and another broker?
Yes. Every switched-on account receives it with its own size. So an Upstox account and an Angel One account can run side by side.
Try it before your next session
Take the free demo, add Upstox with today's token, and leave the account switched off for a morning. The software still reads each alert and writes it to the Signal Feed. That way you see how it reads your alerts, without placing anything.
Sign up for TPcopier and check pricing for the one-time licence. From Telegram instead? See Telegram to Upstox. TradingView to Dhan and TradingView to Zerodha cover two more brokers, and the Indian TvCopier setup guide shows every screen of the program.
Risk warning: trading options and shares carries a high risk of losing money and is not suitable for everyone. Nothing here is investment advice.