Incoming Webhook to telegram message
 
 
Go to file
vzns 127ed28bbf
Updated Readme
2021-02-05 17:25:38 +01:00
assets Updated README logo 2020-12-14 18:26:21 +01:00
.gitignore Initial commit 2020-04-21 16:05:31 +02:00
Dockerfile dokerize 2020-10-11 19:42:44 +02:00
LICENSE Readme update 2020-11-18 09:20:43 +01:00
README.md Updated Readme 2021-02-05 17:25:38 +01:00
config.py Several updates & improvements. Read description: 2020-12-19 15:15:46 +01:00
docker-compose.yml dokerize 2020-10-11 19:42:44 +02:00
handler.py Updated encoding for Telegram Messages 2021-02-02 11:15:33 +01:00
main.py Few bug fixes 2021-02-02 10:43:10 +01:00
requirements.txt Readme update 2020-11-18 09:20:43 +01:00

README.md

Python version GitHub license GitHub issues GitHub pull requests
GitHub stars GitHub forks GitHub watchers

AboutFeaturesInstallationImagesHelp

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.

TV-Alerts.com 🔥

I am running my own TradingView Webhook Service. No setup and hosting required. Send all your alerts to Telegram, Discord, Slack & Twitter along with a full screenshot of the chart complete with your indicators. More at TV-Alerts.com. Got a question? Let me know!

Features

  • Telegram Support using the Python Telegram libary
  • Discord Support using webhooks
  • Twitter Support using the tweepy libary
  • Email Support using smtplib
  • Alert channels can be enabled or disabled in config.py
  • Dynamically send alerts to different Telegram and/or Discord channels
  • TradingView {{close}}, {{exchange}} etc. variables support. Read more here

💡 Got a feature idea? Open an issue and I might implement it.

Installation

⚠️ Best to run the bot on a VPS. I can recommend Hetzner's CX11 VPS for 2.89€/month.

  1. Clone this repository git clone https://github.com/vsnz/TradingView-Webhook-Bot.git
  2. Create your virtual environment python3 -m venv TradingView-Webhook-Bot
  3. Activate it source TradingView-Webhook-Bot/bin/activate && cd TradingView-Webhook-Bot
  4. Install all requirements pip install -r requirements.txt
  5. Edit and update config.py
  6. Setup TradingView alerts. An example alert message would be:
    {"key": "9T2q394M92", "telegram": "-1001277977502", "discord": "789842341870960670/BFeBBrCt-w2Z9RJ2wlH6TWUjM5bJuC29aJaJ5OQv9sE6zCKY_AlOxxFwRURkgEl852s3", "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 and discord 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
  7. If you use a firewall be sure to open the corresponding port
  8. Run the bot with python main.py

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

Images

Webhook Bot

How can I help?

All kinds of contributions are welcome 🙌! The most basic way to show your support is to ⭐️ star the project, or raise 🐞 issues.


Donate using LiberaPay