Tradingview Telegram Webhook Bot with Chart Snapshot (Revised)

Опубликовано: 20 Февраль 2026
на канале: Trendoscope Algorithms
1,902
32

Hello Everyone,

In this video, we will try to go through revised implementation of Tradingview-Telegram-Bot which can be used to send alert messages from tradingview to telegram along with current chart snapshot.

[b]🎲 Base[/b]
Initial version of the same idea are as below:
[list]
[*] [url=https://www.tradingview.com/chart/ETH...]How-to-create-simple-web-hook-to-send-alerts-to-Telegram[/url]
[*] [url=https://www.tradingview.com/chart/ETH...]How-to-capture-chart-snapshot-in-tradingview-telegram-alert-bot[/url]
[/list]

[b]🎲 Prerequisite[/b]

Before proceeding with the current video, please watch the first video - [url=https://www.tradingview.com/chart/ETH...]How-to-create-simple-web-hook-to-send-alerts-to-Telegram[/url] which covers lots of basic things such as

[list]
[*] Creating Telegram Bot using botfather and capturing required information such as TOKEN and CHANNEL
[*] Basic usage of replit - a cloud based hosting service which lets us define our webhooks with little to no cost.
[*] Postman - tool which is required to test the webhooks created
[*] Other information such as keeping the bot alive via cron, using the webhooks in tradingview alert widget etc.
[/list]

[b]🎲 Setup[/b]
[list]
[*] Clone/fork replit repo
[*] Set mandatory environment variables CHANNEL and TOKEN
[*] Set optional environment variables username/password or sessionid
[*] Run the bot and start using webhooks
[/list]

[b]🎲 Usage[/b]
Webhook URL will be of the format.
[pine]https://Tradingview-Telegram-Bot.[YOUR_REPL_ACCOUNT].repl.co/webhook?[...query_parameters][/pine]

[b]🎲 Important Query parameters[/b]
[list]
[*] [b]jsonRequest[/b] - can be set as true/false. Default is false. If set to true, the payload should be a standard json. Output to telegram will be sent in tabular format. If not set or if set to false, output to telegram will be clear text.
[*] [b]tblfmt[/b] - table format to be used when jsonRequest is set to true. Default is plain. The values are exactly same as the ones required for [url=https://pypi.org/project/tabulate/]tabulate[/url] package.
[*] [b]chart[/b] - Send the chart id if required to send chart snapshot along with alert message. For this to work - chart needs to be either a shared chart or environment variables for tvusername and tvpassword should be set to the user who has access to given chart.
[*] [b]ticker[/b] - Chart ticker. You no longer need to use different chart for different tickers. You can have a common chart and pass ticker to it so that chart will automatically switch to given ticker before taking screenshot
[*] [b]delivery[/b] - Taking chart snapshot takes time. This also delays the delivery of alert message. To avoid this, we can use this option - delivery=asap so that alert message will be sent as soon as possible and chart is sent later. If this parameter is not set, then both the messages will be delivered together.
[/list]