TradingView Alerts to Telegram: Setup Guide

TradingView Alerts to Telegram: Setup Guide

Geometric signal path between two platforms

Yes, TradingView can send alerts to Telegram. The route is a webhook: TradingView posts your alert message to a URL, and that URL passes it to a Telegram bot, which delivers it to your chat, group or channel. TradingView’s own Pine Script FAQ says the two systems differ in protocol and formatting, and recommends a small relay that reformats the webhook for Telegram’s Bot API. Below you get the whole setup in order, the message formats that avoid errors, the limits that trip people up, and what to do once alerts arrive.

Coindivo
coindivo.com
Turn Market Signals Into Action
Coindivo combines real-time momentum signals, automated or manual trading, and Telegram alerts for crypto traders who want to act on market moves.
Explore Coindivo

TL;DR

  • TradingView has no one-click Telegram button. You create a Telegram bot, get a chat ID, and point an alert’s Webhook URL at an endpoint that delivers to that bot.
  • Webhooks need two-factor authentication on your TradingView account, and they accept only ports 80 and 443.
  • Keep the message body simple. Plain text avoids most formatting failures, and valid JSON is sent with the correct content type.
  • Test with a throwaway alert, then check the Webhook status column in the alert log when something does not arrive.
  • Alerts tell you something happened. Acting on them is a separate step, and we cover how to shorten it below.

Table of Contents

How the connection works

Three pieces are involved, and it helps to see them before you click anything.

  1. A TradingView alert. It watches a condition on a chart and fires when it is met. TradingView lets you base alerts on data series, indicators, chart patterns, strategies or drawing tools.
  2. A webhook. When you tick the Webhook URL option, TradingView sends a POST request to the address you give it every time the alert triggers. Your alert message becomes the body of that request.
  3. A Telegram bot. Telegram only accepts messages from bots through its Bot API. The bot needs a token (its password) and a destination (a chat ID).

The gap between steps 2 and 3 is the reformatting job. TradingView’s documentation explains that a message sent as valid JSON goes out as application/json, and anything else goes out as text/plain. Telegram expects specific fields, so either your message is shaped exactly as the Bot API wants it, or a relay does the shaping for you.

Some walkthroughs post JSON straight to Telegram’s sendMessage endpoint with no relay, and one popular free tutorial takes that route. TradingView’s FAQ, on the other hand, calls direct delivery difficult and recommends an intermediary. Both paths end in the same place, so pick the one you can maintain. A direct JSON post is the shortest. A relay is more forgiving if you want to add formatting, charts or filtering later.

Before you start: what you need

  • A TradingView account with alerts available on your plan, and two-factor authentication switched on. TradingView requires 2FA for webhook alerts.
  • The Telegram app on your phone or desktop.
  • Ten minutes and a chart you already trust enough to alert on.

No coding is needed for the direct JSON route. If you choose a relay, you will also need a place to run it or a hosted service you are comfortable with. Whatever you choose, remember that the webhook URL will see your alert text, so never put anything sensitive in it.

Step 1: Create a Telegram bot

  1. In Telegram, search for BotFather, the bot Telegram uses to create other bots, and open a chat with it.
  2. Send the command to create a new bot. BotFather asks for a display name and then a username that must end in “bot”.
  3. BotFather replies with a token, a long string with a colon in the middle. Copy it somewhere private. Anyone holding it can post as your bot.

Treat the token like a password. Do not paste it into public chats, screenshots, shared chart descriptions or alert messages that other people can see. If it leaks, ask BotFather to revoke it and issue a new one, then update your webhook URL.

Step 2: Find your chat ID

The bot needs to know where to deliver. That destination is a chat ID, and it differs depending on whether you want alerts in a private chat, a group or a channel. The Quant Nomad walkthrough describes the usual method:

  • Private chat: open your new bot, press Start and send it any message. Then call the Bot API’s getUpdates method in your browser using your bot token. The response contains a chat object with an id. Copy that number.
  • Group: add the bot to the group, post a message in the group, then call getUpdates the same way. Group IDs are typically negative numbers.
  • Channel: add the bot as an administrator with permission to post. Channel IDs commonly begin with -100.

If getUpdates returns an empty result, the bot has not seen a message yet. Send a new one and call it again.

Step 3: Create the TradingView alert

Open a chart for the symbol you care about and create the alert from the alert menu or the toolbar. TradingView’s guide to configuring alerts lists the settings you will see:

  • Condition: the indicator, price level, drawing or strategy event you are watching.
  • Trigger frequency: TradingView documents choices including only once, every time, once per bar close and once per minute. For momentum or breakout alerts, once per bar close is usually the least noisy, because it ignores wicks that reverse before the candle ends. “Every time” can flood a channel on a volatile coin.
  • Expiration: an expiry date, or open-ended where your plan supports it. An alert that expires silently is one of the most common reasons a feed goes quiet.
  • Alert name and message: the message can use special placeholders that TradingView replaces with live values, such as the ticker and the closing price.

Step 4: Add the webhook and message

In the notifications tab of the alert, tick Webhook URL and paste the address that will deliver to Telegram. For the direct route, that address is Telegram’s Bot API sendMessage endpoint with your token in it. For the relay route, it is your relay’s address.

Then write the message body. Telegram’s sendMessage method needs two things: a chat_id and the text to send. A minimal JSON message looks like this:

{"chat_id": "-1001234567890", "text": "{{ticker}} closed at {{close}}"}

Replace the chat ID with yours. Because the body is valid JSON, TradingView sends it with the application/json content type, which is what a direct post to Telegram needs. If you use a relay, follow whatever format it documents.

Step 4: Add the webhook and message

Keep formatting simple

Telegram can render bold, italics and links if you set a parse mode, but strict modes require certain punctuation, such as periods, hyphens, exclamation marks and brackets, to be escaped. A single unescaped character can make Telegram reject the whole message. Plain text, with no parse mode set, sidesteps that problem. Add formatting only after the plain version works.

Also watch quotes. A quotation mark inside a placeholder value or your own text breaks JSON. If an alert that worked in testing suddenly fails, look for a character that your message template did not anticipate.

Step 5: Test before you trust it

Create a test alert on a fast-moving condition, such as a price crossing a level that is a hair away from the current price, with the trigger set to fire every time. When it fires, the message should appear in Telegram within seconds. Then delete or disable the test alert so it does not spam you.

If nothing arrives, open the alert log in TradingView and look at the Webhook status column. TradingView points users to that column to monitor webhook delivery, and says delivery can occasionally fail even when everything is set up correctly.

Alert test flow with failure check

Limits and security rules worth knowing

These come straight from TradingView’s webhook documentation, and they explain a large share of “it should work but does not” cases:

Rule What it means for you
Two-factor authentication required The Webhook option will not work until 2FA is on for your account
Ports 80 and 443 only A relay running on a custom port will not receive anything
No IPv6 support at present Your endpoint must be reachable over IPv4
Three-second cut-off If the receiving server takes longer than three seconds, TradingView cancels the request, so keep your endpoint fast
Occasional delivery failures Do not build anything that assumes every alert always arrives
Sender IP addresses published If you run your own endpoint, you can allowlist TradingView’s addresses

The same page is clear on security: never put passwords or credentials in the webhook body, use secure, authenticated endpoints, and encrypt sensitive data. Your Telegram token inside the webhook URL is a credential, so use a private alert and do not share the alert or its settings with anyone you would not trust with the bot.

Fixing the common errors

Most failures fall into a short list. The Quant Nomad checklist names the usual suspects, and they match what you would expect from the mechanics above.

  • Bot not added or not allowed to post. In a group or channel, the bot must be a member, and in a channel it must be an administrator able to post.
  • Invalid JSON. A missing quote, a trailing comma or a stray character from a placeholder. Paste your message into any JSON checker.
  • Wrong chat ID. Group and channel IDs are negative, and channel IDs usually start with -100. A missing minus sign is enough to fail.
  • Webhook option left off. It is easy to paste the URL and forget the checkbox.
  • Slow or unreachable endpoint. If you use a relay, remember the three-second limit, the port rule and IPv4 only.
  • Alert expired. Check the expiration setting before debugging anything else.

Work through them in that order and check the Webhook status after each change.

Making alerts useful, not just frequent

Getting alerts to Telegram is the easy half. The harder half is deciding which alerts deserve your attention. A few habits keep a feed readable:

  • Alert on closed bars for signals you plan to act on, so one message means one decision.
  • Name every alert with the symbol, timeframe and reason, so a notification on your lock screen tells you what to do without opening the chart.
  • Separate channels for watch-only ideas and for alerts you might trade, so urgent messages do not drown.
  • Cap the list. Every alert you add is another message on a busy day. Keep the ones tied to a plan you actually follow.

In crypto there is one more trap: thin markets. A breakout on an illiquid coin can reverse in seconds, and a chart alert does not know whether the volume behind it is real. That is where a filter helps, and it is where we come in.

Our perspective: alerts are only half the job

We built Coindivo because a stream of chart alerts leaves two problems unsolved: which markets are worth watching, and what you do in the minute after the message lands. A custom TradingView setup tells you a condition fired on a chart. It does not tell you whether the coin is liquid enough to trade, or whether the move shows up on the major exchanges.

So we start from a narrower universe. Coindivo covers the top 1,000 coins by market cap, which filters out unstable and illiquid assets before a signal reaches you. For automated trading, our approach is designed to confirm a signal on live major exchanges before executing. You choose how to trade: manually, acting on a momentum signal yourself, or automatically, letting the platform follow real-time signals. In both cases your funds stay in a wallet you control, and alerts can reach you on Telegram, the same place you are already reading your TradingView messages.

If you enjoy building your own alert pipeline, the steps above will serve you well. If what you want is momentum signals, a filtered market list and a short path from signal to swap, that is what we designed the platform to give you.

— online

Where Coindivo fits into your workflow

Once your TradingView alerts reach Telegram, the next question is what to do with them. Coindivo brings live momentum signals, manual and automated trading, and on-chain swaps into one place, with Telegram alerts included. The virtual wallet plan is listed at $0 per month, and swaps carry a 0.5% fee. Live trading is available too, and we do not publish a price for it.

Coindivo

You can look at the Coindivo wallet, live trading and swap options to see how it works, or browse the Coindivo home page for the current momentum signals. If you follow early projects, the Launchpad covers token pre-sales. Each coin page, such as Livepeer (LPT), shows a price chart and momentum reading, a quick way to sanity-check a coin before you set an alert on it.

FAQ

Can I get text alerts from TradingView?

Yes. TradingView sends alerts as app notifications, popups, email and webhooks, and the webhook is how you reach Telegram. The alert message you write, including placeholders for values like price and ticker, becomes the text you receive. Check the notification options on your own plan, since availability can differ.

Do I need to code to send TradingView alerts to Telegram?

Not for the basic route. You create a bot, find a chat ID and paste a short JSON message into the alert. TradingView’s FAQ does recommend an intermediary that reformats the webhook, so if you want charts, filtering or fancy formatting, a relay is the better fit, and that part may involve some setup.

Why is my TradingView webhook not reaching Telegram?

Start with the Webhook status column in the alert log. Then check the usual causes: the Webhook URL box not ticked, invalid JSON, a wrong chat ID, a bot that is not allowed to post, and an expired alert. TradingView also cancels requests that take more than three seconds, and it accepts only ports 80 and 443.

Is it safe to put my bot token in a webhook URL?

It is a credential, so handle it carefully. TradingView advises against putting passwords or credentials in the webhook body and recommends secure, authenticated endpoints. Keep the alert private, never share screenshots of its settings, and revoke the token through BotFather if you think it has leaked.

Should I use plain text or Markdown in the message?

Start with plain text. Formatted modes require escaping punctuation such as periods, hyphens and brackets, and one missed character can make Telegram reject the message. Once plain text works reliably, add formatting one change at a time.

Sources

Dit artikel is algemene informatie, geen financieel advies. Crypto is volatiel en je kunt je inleg verliezen. Lees over de risico’s