Загрузка страницы

How to create simple web-hook to send alerts to Telegram

Hello Traders,

In this video, I have demonstrated how to create a simple web-hook which can send your Tradingview alerts to Telegram channel or group for zero cost.

[b]⬜ Tools Used[/b]
▶ [url=https://telegram.org/]Telegram Messenger[/url]
▶ [url=https://replit.com/]Replit[/url] - Cloud platform for hosting small programs
▶ [url=https://www.postman.com/]Postman[/url] - To test web-hooks before going live (Optional)
▶ [url=https://cron-job.org/]Cronjob[/url] - To set health-check and keep bot alive
[b]⬜ Steps[/b]

▶ [b]Create Telegram Bot[/b]
[list]
[*] Find BotFather and issue command /newbot
[*] Provide bot name
[*] Provide bot username - which should be unique and end with _bot
[*] Once bot is created, you will get a message with token access key in it. Store the token access key.
[/list]

[url=https://www.tradingview.com/x/RptqIF33/]https://www.tradingview.com/x/RptqIF33/[/url]

▶ [b]Prepare Telegram Channel[/b]
[list]
[*] Create new telegram channel
[*] Add the bot @username_to_id_bot to it as admin and issue /start to find chat id
[*] Store the chat id and dismiss @username_to_id_bot from channel
[*] Find the bot created in previous step using bot username and add it to channel as admin
[/list]

[url=https://www.tradingview.com/x/G7i5cuwo/]https://www.tradingview.com/x/G7i5cuwo/[/url]

▶ [b]Setup replit[/b]
[list]
[*] Create a free Replit account if you do not have it already.
[*] Fork the repl - [url=https://replit.com/@trendoscope/Tradingview-Telegram-Bot?v=1]Tradingview-Telegram-Bot[/url] to your space and give a name of your choice.
[*] Set environment variables - TOKEN and CHANNEL which are acquired from previous steps.
[*] Run the REPL
[/list]

[url=https://www.tradingview.com/x/oXsj2Lz3/]https://www.tradingview.com/x/oXsj2Lz3/[/url]

▶ [b]Test with postman[/b]
[list]
[*] Use the URL on repl and create web-hook post request URL by adding /webhook to it.
[*] Create post request on postman and send it.
[*] You can see that messages sent via postman appearing in your telegram channel.
[*] append [b]?jsonRequest=true [/b] if you are using json output from alerts.
[/list]

[url=https://www.tradingview.com/x/oSZRsaPs/]https://www.tradingview.com/x/oSZRsaPs/[/url]

Json request example:
[url=https://www.tradingview.com/x/cLoe2wej/]https://www.tradingview.com/x/cLoe2wej/[/url]

▶ [b]Set alerts from tradingview to web-hook[/b]
[list]
[*] Use web-hook option and enter the webhook tested from postman in the web-hook URL
[/list]

[url=https://www.tradingview.com/x/XXNBlC0I/]https://www.tradingview.com/x/XXNBlC0I/[/url]

And that's all, the webhook for Telegram Alerts is ready!!

Thanks for watching. Hope you enjoyed the video and learned from it :)

PS: I have made use of extracts from the open github repo: https://github.com/fabston/TradingView-Webhook-Bot

Видео How to create simple web-hook to send alerts to Telegram канала Trendoscope Algorithms
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
14 ноября 2021 г. 10:01:20
00:14:58
Яндекс.Метрика