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.
⬜ Tools Used
▶ Telegram Messenger
▶ Replit - Cloud platform for hosting small programs
▶ Postman - To test web-hooks before going live (Optional)
▶ Cronjob - To set health-check and keep bot alive
⬜ Steps
▶ Create Telegram Bot
https://www.tradingview.com/x/RptqIF33/
▶ Prepare Telegram Channel
https://www.tradingview.com/x/G7i5cuwo/
▶ Setup replit
https://www.tradingview.com/x/oXsj2Lz3/
▶ Test with postman
https://www.tradingview.com/x/oSZRsaPs/
Json request example:
https://www.tradingview.com/x/cLoe2wej/
▶ Set alerts from tradingview to web-hook
https://www.tradingview.com/x/XXNBlC0I/
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: github.com/fabston/TradingView-Webhook-Bot
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.
⬜ Tools Used
▶ Telegram Messenger
▶ Replit - Cloud platform for hosting small programs
▶ Postman - To test web-hooks before going live (Optional)
▶ Cronjob - To set health-check and keep bot alive
⬜ Steps
▶ Create Telegram Bot
- 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.
https://www.tradingview.com/x/RptqIF33/
▶ Prepare Telegram Channel
- 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
https://www.tradingview.com/x/G7i5cuwo/
▶ Setup replit
- Create a free Replit account if you do not have it already.
- Fork the repl - Tradingview-Telegram-Bot 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
https://www.tradingview.com/x/oXsj2Lz3/
▶ Test with postman
- 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 ?jsonRequest=true if you are using json output from alerts.
https://www.tradingview.com/x/oSZRsaPs/
Json request example:
https://www.tradingview.com/x/cLoe2wej/
▶ Set alerts from tradingview to web-hook
- Use web-hook option and enter the webhook tested from postman in the web-hook URL
https://www.tradingview.com/x/XXNBlC0I/
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: github.com/fabston/TradingView-Webhook-Bot
Nota
Just realized that there is issue with hyperlink of repl I posted.Just copy paste the URL instead of clicking on it. (Tradingview seems to be replacing @ with %2540:
"replit.com/@trendoscope/Tradingview-Telegram-Bot?v=1"
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Aviso legal
As informações e publicações não devem ser e não constituem conselhos ou recomendações financeiras, de investimento, de negociação ou de qualquer outro tipo, fornecidas ou endossadas pela TradingView. Leia mais em Termos de uso.