TradingView to 5paisa Copier: Easy Xstream Setup, 7 Steps
A TradingView alert only helps if the order reaches 5paisa while the price is still the one you wanted. Doing TradingView to 5paisa by hand means watching a chart and an order window at once. So you lose a few seconds on every call. TPcopier's Indian TvCopier does the order half for you. It's a program for your own Windows PC or VPS. It takes each alert from TradingView and places it through 5paisa's Xstream API, from the static IP 5paisa has on record for you.
It suits anyone whose entries already come from a Pine indicator or strategy. Besides the program, you need a TradingView plan with webhook alerts, which TradingView offers on its paid plans. The TradingView to Indian brokers copier page adds that two-factor authentication has to be on. You also need Xstream API access at 5paisa and a machine with a static IP, ideally with port 80 open to it. One 5paisa detail shapes the whole set-up, so it comes first.
5paisa has no market order type
At 5paisa, a price of 0 is the market order. No field says "market"; an order becomes one simply by carrying price zero. That means any order reaching 5paisa without a price fills wherever the market is. Meanwhile, SEBI's April 2026 rules expect an API market order to carry a protection band.
That's the job of Convert market signals into protective limits, which is on by default. Say your alert has no price. The app then reads the live price from 5paisa's market feed and sends a LIMIT order 0.5% through it. In a liquid contract that fills like a market order. In a thin one, it won't chase.
On 5paisa, this switch is the only thing between an alert and a price-0 order, so leave it on. With the switch off, the order goes at price 0. The same happens if the app can't get the live price. Either way, the journal notes that 5paisa accepted it at market.
Two more guards come from the same design. The app refuses an order type it doesn't know instead of letting it fall through to price 0. It also refuses a stop with no trigger, because 5paisa would treat that as a market order too.
What you paste for 5paisa
In the program, Accounts → + Connect a broker → 5paisa (Xstream) shows three fields:
| Field | Where it comes from | How long it lasts |
|---|---|---|
| App key | The "user key" in your Xstream API credentials | Not part of the daily routine |
| Client code | The number you log in to 5paisa with | Stays the same |
| Access token | The Xstream login | Ends at 11:59 PM every day |
Every call to 5paisa carries the app key, and the app can't read positions without the client code. The access token is the daily chore. Because 5paisa ends it at 11:59 PM, you generate a fresh one each morning before the open. Then press Test the connection. It reads your net positions and answers "connected as client" with your code. A stale token shows "5paisa refused the access token - it expires at 11:59 PM every day" instead.
TradingView to 5paisa in 7 steps
1. Register a static IP with 5paisa
SEBI's framework has required a registered static IP for API orders since 1 April 2026. A small Windows VPS is the easy answer, though a home PC works if your provider gives you a fixed IP. 5paisa describes its API on the Xstream API page; check there for fees and the sign-up form.
2. Get your key and the program
Open the Indian Copier page on tpcopier.com and press Get the free demo. After sign-up, the Indian TvCopier card in your account gives you a free demo key for the full program, one per account and per computer, plus the Windows download. If you buy later, you pay in USDT through Binance Pay and keep that very key. There are no refunds, which is why the demo exists. For prices, see pricing.
3. Install, activate and check the IP
Run the program on the static-IP machine and paste the licence key when it asks. Its Dashboard then shows the public IP it sends from, so you can confirm 5paisa has the right one.
The Dashboard with the Static IP band and its Copy button (example).
4. Add the 5paisa account
Open Accounts, press + Connect a broker and pick 5paisa (Xstream). Fill in the three fields from the table above, press Save this account and test it.
A new 5paisa account; the access token hint says it expires at 11:59 PM (example).
5. Check two switches on the account
While the account is open, scroll to What this account does with an order. Make sure Convert market signals into protective limits is ticked, for the reason the first section gives. Then look at Most lots in one order. It starts at 1, so the app refuses a 2-lot alert until you raise it.
The account's own order block, with the protective limit switch at the top left (example).
6. Open port 80 for TradingView
The only way in is straight from TradingView to the program, on port 80, so open that port to your machine. On the program's TradingView page, press Allow port 80 in Windows Firewall, and press Allow access if Windows asks about the network. At home, forward port 80 on your router to this machine; on a VPS, open it in the provider's firewall too. The page then checks, on this PC, that the program is listening on port 80, that the firewall rule is there, and which public address the machine has. Copy the address under 1 The webhook URL. Only TradingView's own servers can trade through it, but keep it out of screenshots all the same.
On a home Jio or Airtel connection, TradingView usually cannot reach the machine at all, because that address is shared with other customers. Then run the program on a Windows VPS with a static IP instead. To test the whole path, send a test alert from TradingView and watch the Signal Feed.
7. Create the alert in TradingView
Put that address in the alert's Webhook URL box, as TradingView's webhook alerts guide shows. Then paste JSON like the example below into Message. Plain text won't do; the program refuses it and says why. From then on, every alert lands in the program's Signal Feed, with a note when 5paisa took an order at market.
An alert written for 5paisa
Here's an example: a Sensex call with a limit price, a stop and two targets.
{
"action": "BUY",
"symbol": "SENSEX",
"strike": 81500,
"option_type": "CE",
"lots": 1,
"price": 212.5,
"sl": 180,
"targets": [250, 285],
"source": "sensex breakout"
}
The app downloads 5paisa's scrip master and keeps it for six hours. 5paisa names options like NIFTY 27 Aug 2026 CE 24600. So the app matches the first word, the strike, CE or PE and the expiry. BSE derivatives sit in the same file, which is why a Sensex option works. Your strike must sit on the index's step, though: 100 for Sensex, 50 for Nifty. Anything else is a typo, and the app says so. For shares, the app searches 5paisa's NSE cash list, and you size them with quantity.
From a Pine strategy, {{strategy.order.action}} and {{strategy.order.contracts}} fill themselves in. Still, the app treats SELL as a new order that opens a short, not as a close. So send exits as their own alert with "action": "EXIT". An EXIT closes what 5paisa shows as held.
Intraday unless you say otherwise
5paisa takes no product word, only an intraday flag. The app raises that flag on every order unless the account's Product is Delivery / carry. As the Accounts page warns, the broker squares off intraday positions at the close. So if a strategy holds overnight, change that account's product first.
Stops and exits at 5paisa
Switch on Send the stop loss as a real order, and the sl goes to 5paisa once the entry has filled. You choose SL, which works as a limit once triggered, or SL-M. Breakeven and trailing are there too.
Moving a stop at 5paisa takes one extra step. A new order comes back with 5paisa's own order id, but modify and cancel need the exchange order id. So the app pairs the two from the order book before it walks or cancels a stop. Each order also carries its own reference, so 5paisa doesn't swallow a second order as a duplicate.
An EXIT reads your net positions first. Then it cancels any order still working on that contract and closes the quantity 5paisa reports.
Refusals you might see
- "5paisa has no SENSEX 81500 CE - check the strike is one the exchange actually lists". Fix the strike or the index name.
- "has no (date) expiry at 5paisa. Nearest: ...". Your
expiryisn't listed, so correct it or drop it. - "could not download the 5paisa scrip master". The file didn't arrive, so check the connection and fire again.
- "signal asks for 2 lots, this account's cap is 1". Raise Most lots in one order.
FAQ
Does the 5paisa access token really expire every night?
Yes, at 11:59 PM. Generate a new one each morning before the open and paste it into Access token. The app key and client code stay the same.
Will TradingView to 5paisa send an alert without a price as a market order?
Not while protective limits are on. The app then sends a LIMIT order 0.5% through the live price. Only with the switch off, or when the app can't get the live price, does the order go at price 0.
Can I trade Sensex options at 5paisa from TradingView?
Yes. The app searches 5paisa's whole derivatives list, BSE included, so a Sensex strike on the 100 step works. Futures are off the menu at every broker.
Do I need a VPS for TradingView to 5paisa?
You need a machine with a static IP that 5paisa has registered, running during market hours. A Windows VPS is simplest. A PC with a fixed IP from your provider works too.
What if my alert arrives while the program is closed?
Then it doesn't trade, now or later. With the program closed, nothing is listening on port 80 to take it, and a missed alert is never traded later.
Try one 5paisa alert on the demo
Create your TPcopier account and get the demo key from the Indian Copier page. Then send a single one-lot alert with a price in it before you let a strategy run. The Telegram to 5paisa guide covers channel signals at this broker. For the other nine brokers, the Telegram and TradingView to Indian brokers overview lists what each one asks for. The Indian TvCopier setup guide covers the program itself, screen by screen.
Risk warning: trading options and shares carries a high risk of losing money and is not suitable for everyone. Nothing here is investment advice.