cyberapper / tradingview-webhook-bot

📊 Send TradingView alerts to Telegram, Discord, Slack, Twitter and Email.
Other
0 stars 0 forks source link

TradingView Webhook Bot

algo724

About

The TradingView Webhook Bot ⚙️ listens to TradingView alerts via webhooks using flask. All alerts can be instantly sent to Telegram, Discord, Twitter and/or Email.

Features

Installation

  1. Edit and update config.py
  2. Setup TradingView alerts. An example alert message would be:
    {
     "key": "9T2q394M92",
     "telegram": "-1001277977502",
     "discord": "789842341870960670/BFeBBrCt-w2Z9RJ2wlH6TWUjM5bJuC29aJaJ5OQv9sE6zCKY_AlOxxFwRURkgEl852s3",
     "slack": "T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX",
     "msg": "Long *#{{ticker}}* at `{{close}}`"
    }
    • key is mandatory! It has to match with sec_key in config.py. It's an extra security measurement to ensure nobody else is executing your alerts
    • telegram, discord, slack is optional. If it is not set it will fall back to the config.py settings
    • msg can be anything. Markdown for Telegram and Discord is supported as well
      • TradingViews variables like {{close}}, {{exchange}} etc. work too. More can be found here
    • Your webhook url would be http://<YOUR-IP>/webhook
  3. If you use a firewall be sure to open the corresponding port
  4. Run the bot with python main.py

Docker

  1. docker-compose build
  2. docker-compose up

It is recommended to run flask on a different port like 8080. It is then necessary to forward port 80 to 8080.