π Send TradingView alerts to Telegram, Discord, Slack, Twitter and Email.
Python
1,877
23 commits
updated Oct 1, 2026
About β’ Features β’ Installation β’ Images β’ Help
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.
π If you are looking for an exchange to trade on, I can recommend Bybit. Sign up now and receive up to $30,000 in Deposit Rewards!
config.py.{{close}}, {{exchange}} etc. variables support. Read more here.β οΈ Best to run the bot on a VPS. I can recommend Hetzner's CX11 VPS for 3.79β¬/month. Sign up now and receive β¬20 free credits.
git clone https://github.com/fabston/TradingView-Webhook-Bot.gitpython3 -m venv TradingView-Webhook-Botsource TradingView-Webhook-Bot/bin/activate && cd TradingView-Webhook-Botpip install -r requirements.txtconfig.py{
"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 alertstelegram, discord, slack is optional. If it is not set it will fall back to the config.py settingsmsg can be anything. Markdown for Telegram and Discord is supported as well
{{close}}, {{exchange}} etc. work too. More can be found herehttp://<YOUR-IP>/webhookpython main.pyIt is recommended to run flask on a different port like 8080. It is then necessary to forward port 80 to 8080.
sudo apt-get install nginxsudo nano /etc/nginx/sites-enabled/tv_webhookserver {
listen 80;
server_name <YOUR-IP>;
location / {
proxy_pass http://127.0.0.1:8080; # Forward traffic to port 8080
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Pass client's IP address
proxy_set_header X-Forwarded-Proto $scheme;
}
}
sudo service nginx restartgit clone https://github.com/fabston/TradingView-Webhook-Bot.gitconfig.pydocker-compose builddocker-compose up
All kinds of contributions are welcome π! The most basic way to show your support is to βοΈ star the project, or raise π issues.
28 followers Β· starred Mar 2021
424 followers Β· starred Jul 2022
58 followers Β· starred Nov 2020
55 followers Β· starred Dec 2023
π Send TradingView alerts to Telegram, Discord, Slack, Twitter and Email.
Python
1,877
23 commits
updated Oct 1, 2026
About β’ Features β’ Installation β’ Images β’ Help
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.
π If you are looking for an exchange to trade on, I can recommend Bybit. Sign up now and receive up to $30,000 in Deposit Rewards!
config.py.{{close}}, {{exchange}} etc. variables support. Read more here.β οΈ Best to run the bot on a VPS. I can recommend Hetzner's CX11 VPS for 3.79β¬/month. Sign up now and receive β¬20 free credits.
git clone https://github.com/fabston/TradingView-Webhook-Bot.gitpython3 -m venv TradingView-Webhook-Botsource TradingView-Webhook-Bot/bin/activate && cd TradingView-Webhook-Botpip install -r requirements.txtconfig.py{
"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 alertstelegram, discord, slack is optional. If it is not set it will fall back to the config.py settingsmsg can be anything. Markdown for Telegram and Discord is supported as well
{{close}}, {{exchange}} etc. work too. More can be found herehttp://<YOUR-IP>/webhookpython main.pyIt is recommended to run flask on a different port like 8080. It is then necessary to forward port 80 to 8080.
sudo apt-get install nginxsudo nano /etc/nginx/sites-enabled/tv_webhookserver {
listen 80;
server_name <YOUR-IP>;
location / {
proxy_pass http://127.0.0.1:8080; # Forward traffic to port 8080
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # Pass client's IP address
proxy_set_header X-Forwarded-Proto $scheme;
}
}
sudo service nginx restartgit clone https://github.com/fabston/TradingView-Webhook-Bot.gitconfig.pydocker-compose builddocker-compose up
All kinds of contributions are welcome π! The most basic way to show your support is to βοΈ star the project, or raise π issues.
28 followers Β· starred Mar 2021
424 followers Β· starred Jul 2022
58 followers Β· starred Nov 2020
55 followers Β· starred Dec 2023