TradingView to Binance Bot
A TradingView to Binance bot turns your TradingView alerts into real orders on your own Binance account. TradingView sends each alert straight to the app through a webhook. Then the app places the order with your size, your leverage and the stop loss the alert names.
Your strategy keeps doing the thinking. The app does the clicking instead, on every Binance account you switch on, even while you are away from the screen.
On this page
- What a TradingView to Binance bot actually does
- How the TradingView to Binance bot works, step by step
- The webhook: how an alert reaches the app
- The alert message: what it must contain
- Spot, margin, futures and options on Binance
- Stop loss, target and leverage
- Several accounts and the journal
- Every feature in the TradingView to Binance bot
- Setting up the TradingView to Binance bot
- Binance, or one of the others?
- Frequently asked questions
What a TradingView to Binance bot actually does
A TradingView to Binance bot connects two things you already have: an alert on TradingView and an account on Binance. As soon as the alert fires, TradingView posts its message to the app. The app then reads it, checks it, and sends the order to Binance with your own API key.
Unlike a Telegram copier, there is no AI and no guessing on this side. A TradingView alert carries exact fields, so the app reads exactly what you wrote: the coin, the side, the market, the amount, the stop loss and the target. If a field is wrong, nothing trades; instead, the journal says why.
For example, a Pine strategy that goes long on BTCUSDT.P becomes a market buy on every Binance futures account you have switched on. If the alert asks for a 1.5% stop and a 3% target, those go on Binance right after the entry fills.

How the TradingView to Binance bot works, step by step
- Your alert fires. A strategy order, an indicator signal or a price level triggers an alert in TradingView.
- TradingView posts it to the app. TradingView’s servers send the alert message to the app’s own webhook address, on the PC or VPS where it runs.
- The app checks the sender. It takes the alert only from TradingView’s own webhook addresses, and even then only with the right secret token and alert key.
- The app reads the message. Symbol, action, market, amount, stop loss and target come straight from the JSON, so the app guesses nothing.
- Every account that is on places it. Each Binance account trades in its own market, with its own amount and leverage, all at the same time.
- The journal records it. That way you see the price, the size and the milliseconds for each account – or the reason it did not trade.
The webhook: how an alert reaches the app
A webhook is TradingView’s way of sending an alert to a web address. Here, though, that address belongs to the app itself. It looks like this, and the app shows yours with a Copy button:
http://YOUR-PUBLIC-IP/tv/YOUR-SECRET-TOKEN
- Port 80. TradingView posts webhooks to port 80 or 443 only. So the app listens on port 80 of that machine, and there it answers the alert address and nothing else.
- TradingView only. The app accepts alerts only from the addresses TradingView uses for its webhooks. It refuses a post from anywhere else, even though the token may be right.
- A private dashboard. The dashboard stays on the machine itself and never faces the internet. Only the alert address does.
- A secret address. The long random token in the address works like a password, so keep it out of screenshots and shared notes.
What TradingView asks for
TradingView sets its own rules for webhooks. First, you need a paid TradingView plan, because webhooks are for paid users only. Second, TradingView’s webhook help page says you must switch on 2-factor authentication for your TradingView account. Also, TradingView does not send webhooks over IPv6, so the app needs a public IPv4 address.
Home internet or a VPS?
Home internet is the catch. Many home and mobile connections sit behind carrier-grade NAT, where one public address serves many customers. As a result, a PC behind it usually cannot receive a webhook at all, whatever you open on your router. That is why a small Windows VPS, or a line with a static public IP and port 80 open, is the set-up that works reliably.

The alert message: what it must contain
The alert’s Message box holds a short piece of JSON, but you never write it by hand. Pick the action, the market, the amount, a stop loss and a target on the TradingView card, and the app builds the message. Then copy it into TradingView. A typical one looks like this:
{"key": "your-alert-key", "symbol": "{{ticker}}", "action": "{{strategy.order.action}}", "sl_pct": 1.5, "tp_pct": 3}
| Field | What it does |
|---|---|
key | Your alert key. Every alert must carry it; the app refuses one without it. |
symbol | {{ticker}}, filled in by TradingView. BTCUSDT.P, BTCUSD.P (COIN-M) and quarterly codes such as BTCUSDT25Z2026 or BTCUSDT1! all work. |
action | buy or long, sell or short, close or exit; closelong or closeshort for one side. From a strategy: {{strategy.order.action}}. |
market | usdm, coinm, spot, margin, isolated or options. Leave it out to use each account’s own market. |
usdt or qty | An amount in USDT, or a quantity: coins, or contracts on COIN-M and options. Leave both out to use the account’s amount. |
sl, tp | Stop loss and target as prices. |
sl_pct, tp_pct | Stop loss and target as a percentage from the price. |
option, strike, expiry | Options only: call or put, a strike or atm, and a date as YYYY-MM-DD. |
account | One account’s name. Leave it out, or write all, for every account that is on. |
- Strategy alerts. With
{{strategy.order.action}}, TradingView writes buy or sell each time your Pine strategy places an order. So one alert covers both sides. - Closing. A close shuts the whole position on that symbol at market, and then cancels its stop loss and target. Use closelong or closeshort instead to close just one side.
- Mistakes stop here. A message that is not JSON, a wrong key or a missing symbol never trades. Instead, the journal says which, so you can fix the alert.
Spot, margin, futures and options on Binance
Each Binance account in the TradingView to Binance bot trades one market, which you pick when you add it. If an alert names a market, every account trades that market for this alert instead.
- USD-M futures. A market order worth your USDT amount, on a perpetual or a quarterly contract. It works in one-way and in hedge mode.
- COIN-M futures. Whole contracts for your USD amount: 100 USD each for BTC and 10 USD for other coins.
- Spot. A buy spends your USDT amount. A sell or close, however, sells only the coins this app bought, never coins you already held.
- Cross and isolated margin. A buy borrows what it needs. On a sell, the app first closes a long it opened; with none open, it borrows the coin and sells it short. Closing repays the loan, interest included.
- Options. With no option named, a buy alert buys a call and a sell alert buys a put. The app picks the strike at the money and the nearest expiry at least 12 hours away, unless the alert names them.
Stop loss, target and leverage
Your alert sets the trade, while the account sets the money. Here is how the risk side works:
- Prices or percentages. Give the stop loss and target as prices, or as a percentage from the price. On futures they go to Binance as conditional orders that close the whole position when the mark price reaches them. On spot and margin, by contrast, the two go on together as one OCO order.
- Never left without its stop. If Binance refuses the stop loss on a futures or margin trade, the app closes that trade again at once and says why.
- Old stops cancelled first. When a new alert on the same symbol brings a stop loss or target, the app cancels the old ones before it sets the new ones.
- Leverage stays yours. You set it per account, up to 125x, or leave it at 0 to keep Binance’s. So an alert cannot change it.
- Options carry no stops. Binance options take limit orders only, so the app buys just above the best ask and places no stop loss or target.
A plain word on futures. Leverage works both ways. In a fast market Binance can liquidate a leveraged position before its stop loss fills, and a strategy that tested well can still lose. So start small, and start on Demo.
Several accounts and the journal
Add one Binance account or several to the TradingView to Binance bot, each with its own key, market, amount, leverage and on/off switch. Then every alert goes to every account that is on, at the same time – unless the alert names one account.

Check reads an account’s balance with its own key, so you know the key works. Test order, on a Demo account, buys the smallest order the market allows on Binance’s demo and then closes it again.
Below the accounts sits the journal. It lists every alert with its account, side, size, symbol and price. Next to each, it shows Placed or Not placed with a plain reason. It also times each order in milliseconds, from the alert to Binance’s answer.
Every feature in the TradingView to Binance bot
| Feature | What it does |
|---|---|
| Direct TradingView webhook | TradingView posts each alert to the app’s own address on port 80 of your PC or VPS. |
| TradingView-only intake | Alerts come only from TradingView’s webhook addresses, with your secret token and alert key. |
| Private dashboard | The dashboard never faces the internet; only the alert address does. |
| Message builder | Pick action, market, amount, stop loss and target; copy the JSON into TradingView. |
| TradingView symbols | BTCUSDT.P, BTCUSD.P, BTCUSDT25Z2026 and BTCUSDT1! map to the right Binance contract. |
| Every Binance market | USD-M and COIN-M futures, spot, cross and isolated margin, and options. |
| Stops as prices or percent | Conditional orders on futures, an OCO on spot and margin. A futures or margin trade whose stop fails closes again at once. |
| Close one side or both | close, closelong and closeshort, with the old stop loss and target cancelled. |
| Your amount and leverage | Per account, or per alert for the amount; leverage up to 125x. |
| Several accounts | All accounts that are on trade the same alert at once, or the one the alert names. |
| Demo and test order | Binance demo keys for spot and futures, with a one-click test order. |
| No double orders | If Binance does not answer in time, the app asks by the order’s own ID whether it went through. |
| Journal | Every alert, every account, every refusal with its reason, timed in milliseconds. |
| Pause | One button stops all new orders until you resume. |
Setting up the TradingView to Binance bot
- Install the app on a Windows VPS, or on a PC with a static public IP. It then opens in a window of its own.
- Open port 80 on that machine: in Windows Firewall, in your VPS provider’s firewall if it has one, or on your router at home.
- Create a Binance API key with the market you want switched on, and restrict it to the public IP the app shows. The Binance API documentation explains each permission.
- Add the account with its market, amount and leverage. Start on Demo, with a key from demo.binance.com, and press Check, then Test order.
- Build the alert in TradingView. Switch on 2-factor authentication first. Then tick Webhook URL in the alert’s notifications, paste the app’s address, and paste the message from the app.
- Watch it on Demo. Let a few alerts fire and read the journal before you add a Real account.

The app takes alerts only while it is open, and closing its window stops it. On a VPS it keeps running while your own computer is off. We can also set it up with you on a call, port 80 included.
Binance, or one of the others?
A TradingView to Binance bot suits traders who build their own alerts and trade on Binance. If that is not quite you, one of these may fit better:
- TradingView to Delta Exchange bot – the same alert intake for Delta futures, options and MOVE contracts.
- Telegram to Binance bot – for a channel’s calls instead of your own alerts.
- TradingView to MT4/MT5 copier – for forex and CFD accounts on MetaTrader.
- All copy trading tools – every source and platform we cover.
Need logic TradingView cannot express, or a bot that runs without alerts? See crypto trading automation or a custom Python crypto bot. Still not sure? Tell us your set-up and we will say plainly what fits.
TradingView to Binance bot – frequently asked questions
Do I need a paid TradingView plan?
Yes. TradingView offers webhooks to paid users only. It also asks for 2-factor authentication on your TradingView account before it sends any webhook alert.
Can I run it on my home PC?
Only if your connection gives that PC a public IPv4 address with port 80 open. Many home and mobile lines sit behind carrier-grade NAT and usually cannot receive a webhook. That is why a small Windows VPS is the reliable choice.
Is it safe to open port 80?
On port 80 the app answers only the alert address, and only for TradingView’s own servers. Your dashboard, meanwhile, never faces the internet. Still, treat the address like a password.
Does it work with Pine Script strategies?
Yes. Put {{strategy.order.action}} in the action and {{ticker}} in the symbol, and one alert trades every buy and sell your strategy makes. Indicator alerts work too, with a fixed buy, sell or close instead.
Which Binance markets can it trade?
USD-M and COIN-M futures, spot, cross and isolated margin, and options. Each account trades one market, but an alert can name another.
Which leverage does it use?
The leverage you set on the account, up to 125x, or Binance’s own if you leave it at 0. An alert does not change it, so your setting always holds.
Can I test the TradingView to Binance bot without real money?
Yes. Add a Demo account with a key from demo.binance.com, which covers spot and futures. Press Test order, then fire a real alert at it and read the journal.
What happens if an alert is wrong?
Nothing trades. A message that is not JSON, a wrong alert key or a missing symbol goes to the journal with the reason, so you can fix the alert.
Is my Binance API key safe?
The app runs on your own PC or VPS. Your key and secret stay sealed there and go only to Binance; the app shows just the last four characters. We never hold your keys.
How much does a TradingView to Binance bot cost?
It depends on what you need – how many accounts, which markets, and how much set-up help you want. Tell us and we will quote it plainly: ask for a quote.