Best Flask open-source libraries and packages

TradingView_Telegram_Bot_Heroku

Deploy a Bot to send TradingView Webhook alerts to Telegram channel via Heroku
Updated 4 months ago

TradingView_Telegram_Bot(Heroku)

Summary

An automated script to send TradingView alerts to Telegram via webhook.

All the deployment is done in one click with heroku.

Deploy

  1. Deploy to Heroku

    Deploy

  2. Setup channelsce_key and tg_token

- channel : Telegram Channel ID. If occur the error "Chat not found" try to add "-100" prefix

- sce_key : Can be any thing. For security check. Only messeage with correct key will send. 

- tg_token : The API key of your telegram bot.
  1. All set!

Use

  1. Get your Web address from Heroku

    Settings -> Domains

    Add "webhook" behind

    Example : https://xxxxxxx.herokuapp.com/webhook

  2. Set TradingView alert

    Example :

    {
      "key" : "sce_key",
      "msg" : "msg you want to send"
    } 
    

    If you want to send msg to different Channel. You can use this method.

    {
      "key" : "sce_key",
      "telegram" : "Channel ID",
      "msg" : "msg you want to send"
    } 
    

    The Channel ID input here will overwrite which one you set in os.env.

    By the way, if you want to test with postman, Post with example as body to your address.

Optimize

Heroku's free dyno will turn to idle after 30min from the last request, and the restart will lead a 30s delay.

We can easily use UptimeRobot to send requests every 15min.

Set this URL on UptimeRobot: https://xxxxxxx.herokuapp.com/test

Credit

Modify from repo fabston/TradingView-Webhook-Botgit