pull/78/head
Fab 2021-03-14 09:24:07 +01:00
rodzic 7ae204ed93
commit f49d6cdc4e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B575FD2D8B7D6725
5 zmienionych plików z 20 dodań i 20 usunięć

Wyświetl plik

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 vsnz
Copyright (c) 2020 fabston
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

Wyświetl plik

@ -1,13 +1,13 @@
<p align="center"><a href="https://github.com/vsnz/TradingView-Webhook-Bot" target="_blank"><img src="https://raw.githubusercontent.com/vsnz/TradingView-Webhook-Bot/master/assets/logo.png"></a></p>
<p align="center"><a href="https://github.com/fabston/TradingView-Webhook-Bot" target="_blank"><img src="https://raw.githubusercontent.com/fabston/TradingView-Webhook-Bot/master/assets/logo.png"></a></p>
<p align="center">
<a href="https://www.python.org/downloads/release/python-380/"><img src="https://img.shields.io/badge/python-3.8-blue.svg?style=plastic" alt="Python version"></a>
<a href="https://github.com/vsnz/TradingView-Webhook-Bot/blob/master/LICENSE"><img src="https://img.shields.io/github/license/vsnz/TradingView-Webhook-Bot?style=plastic" alt="GitHub license"></a>
<a href="https://github.com/vsnz/TradingView-Webhook-Bot/issues"><img src="https://img.shields.io/github/issues/vsnz/TradingView-Webhook-Bot?style=plastic" alt="GitHub issues"></a>
<a href="https://github.com/vsnz/TradingView-Webhook-Bot/pulls"><img src="https://img.shields.io/github/issues-pr/vsnz/TradingView-Webhook-Bot?style=plastic" alt="GitHub pull requests"></a>
<br /><a href="https://github.com/vsnz/TradingView-Webhook-Bot/stargazers"><img src="https://img.shields.io/github/stars/vsnz/TradingView-Webhook-Bot?style=social" alt="GitHub stars"></a>
<a href="https://github.com/vsnz/TradingView-Webhook-Bot/network/members"><img src="https://img.shields.io/github/forks/vsnz/TradingView-Webhook-Bot?style=social" alt="GitHub forks"></a>
<a href="https://github.com/vsnz/TradingView-Webhook-Bot/watchers"><img src="https://img.shields.io/github/watchers/vsnz/TradingView-Webhook-Bot?style=social" alt="GitHub watchers"></a>
<a href="https://github.com/fabston/TradingView-Webhook-Bot/blob/master/LICENSE"><img src="https://img.shields.io/github/license/fabston/TradingView-Webhook-Bot?style=plastic" alt="GitHub license"></a>
<a href="https://github.com/fabston/TradingView-Webhook-Bot/issues"><img src="https://img.shields.io/github/issues/fabston/TradingView-Webhook-Bot?style=plastic" alt="GitHub issues"></a>
<a href="https://github.com/fabston/TradingView-Webhook-Bot/pulls"><img src="https://img.shields.io/github/issues-pr/fabston/TradingView-Webhook-Bot?style=plastic" alt="GitHub pull requests"></a>
<br /><a href="https://github.com/fabston/TradingView-Webhook-Bot/stargazers"><img src="https://img.shields.io/github/stars/fabston/TradingView-Webhook-Bot?style=social" alt="GitHub stars"></a>
<a href="https://github.com/fabston/TradingView-Webhook-Bot/network/members"><img src="https://img.shields.io/github/forks/fabston/TradingView-Webhook-Bot?style=social" alt="GitHub forks"></a>
<a href="https://github.com/fabston/TradingView-Webhook-Bot/watchers"><img src="https://img.shields.io/github/watchers/fabston/TradingView-Webhook-Bot?style=social" alt="GitHub watchers"></a>
</p>
<p align="center">
@ -35,19 +35,19 @@ I am running my own TradingView Webhook Service. No setup and hosting required.
- Slack Support using [webhooks](https://api.slack.com/messaging/webhooks)
- Twitter Support using the [tweepy](https://github.com/tweepy/tweepy) libary
- Email Support using [smtplib](https://docs.python.org/3/library/smtplib.html)
- Alert channels can be enabled or disabled in [`config.py`](https://github.com/vsnz/TradingView-Webhook-Bot/blob/master/config.py)
- Alert channels can be enabled or disabled in [`config.py`](https://github.com/fabston/TradingView-Webhook-Bot/blob/master/config.py)
- Dynamically send alerts to different Telegram and/or Discord channels
- TradingView `{{close}}`, `{{exchange}}` etc. variables support. Read more [here](https://www.tradingview.com/blog/en/introducing-variables-in-alerts-14880/)
> 💡 Got a feature idea? Open an [issue](https://github.com/vsnz/TradingView-Webhook-Bot/issues/new) and I might implement it.
> 💡 Got a feature idea? Open an [issue](https://github.com/fabston/TradingView-Webhook-Bot/issues/new) and I might implement it.
## Installation
> ⚠️ Best to run the bot on a VPS. I can recommend <a href="https://vsnz.net/hetzner" title="Get €20 in cloud credits">Hetzner</a>'s CX11 VPS for 2.89€/month.
1. Clone this repository `git clone https://github.com/vsnz/TradingView-Webhook-Bot.git`
> ⚠️ Best to run the bot on a VPS. I can recommend <a href="https://fabston.dev/hetzner" title="Get €20 in cloud credits">Hetzner</a>'s CX11 VPS for 2.89€/month.
1. Clone this repository `git clone https://github.com/fabston/TradingView-Webhook-Bot.git`
1. Create your virtual environment `python3 -m venv TradingView-Webhook-Bot`
1. Activate it `source TradingView-Webhook-Bot/bin/activate && cd TradingView-Webhook-Bot`
1. Install all requirements `pip install -r requirements.txt`
1. Edit and update [`config.py`](https://github.com/vsnz/TradingView-Webhook-Bot/blob/master/config.py)
1. Edit and update [`config.py`](https://github.com/fabston/TradingView-Webhook-Bot/blob/master/config.py)
1. Setup TradingView alerts. An example alert message would be:
```json
{
@ -58,14 +58,14 @@ I am running my own TradingView Webhook Service. No setup and hosting required.
"msg": "Long *#{{ticker}}* at `{{close}}`"
}
```
- `key` is mandatory! It has to match with `sec_key` in [`config.py`](https://github.com/vsnz/TradingView-Webhook-Bot/blob/master/config.py). It's an extra security measurement to ensure nobody else is executing your alerts
- `key` is mandatory! It has to match with `sec_key` in [`config.py`](https://github.com/fabston/TradingView-Webhook-Bot/blob/master/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](https://core.telegram.org/api/entities) and [Discord](https://support.discord.com/hc/en-us/articles/210298617-Markdown-Text-101-Chat-Formatting-Bold-Italic-Underline-) is supported as well
- TradingViews variables like `{{close}}`, `{{exchange}}` etc. work too. More can be found [here](https://www.tradingview.com/blog/en/introducing-variables-in-alerts-14880/)
- Your webhook url would be `http://<YOUR-IP>/webhook`
1. If you use a firewall be sure to open the corresponding port
1. Run the bot with `python main.py`
1. [PM2](https://github.com/vsnz/TradingView-Webhook-Bot/issues/28#issuecomment-766301062) can help you in running the app in the background / on system boot.
1. [PM2](https://github.com/fabston/TradingView-Webhook-Bot/issues/28#issuecomment-766301062) can help you in running the app in the background / on system boot.
*It is recommended to run flask on a different port like 8080. It is then necessary to forward port 80 to 8080.*
@ -73,10 +73,10 @@ I am running my own TradingView Webhook Service. No setup and hosting required.
![Webhook Bot](https://i.imgur.com/vZA42cc.png)
## 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`](https://github.com/vsnz/TradingView-Webhook-Bot/issues/new).
All kinds of contributions are welcome 🙌! The most basic way to show your support is to `⭐️ star` the project, or raise [`🐞 issues`](https://github.com/fabston/TradingView-Webhook-Bot/issues/new).
***
<p align="center">
<a href="https://www.buymeacoffee.com/vsnz"><img alt="Buy Me A Coffee" title="☕️" src="https://raw.githubusercontent.com/vsnz/TradingView-Webhook-Bot/master/assets/bmac.png" width=200px></a>
<a href="https://www.buymeacoffee.com/fabston"><img alt="Buy Me A Coffee" title="☕️" src="https://raw.githubusercontent.com/fabston/TradingView-Webhook-Bot/master/assets/bmac.png" width=200px></a>
</p>

Wyświetl plik

@ -1,6 +1,6 @@
# ----------------------------------------------- #
# Plugin Name : TradingView-Webhook-Bot #
# Author Name : vsnz #
# Author Name : fabston #
# File Name : config.py #
# ----------------------------------------------- #

Wyświetl plik

@ -1,6 +1,6 @@
# ----------------------------------------------- #
# Plugin Name : TradingView-Webhook-Bot #
# Author Name : vsnz #
# Author Name : fabston #
# File Name : handler.py #
# ----------------------------------------------- #

Wyświetl plik

@ -1,6 +1,6 @@
# ----------------------------------------------- #
# Plugin Name : TradingView-Webhook-Bot #
# Author Name : vsnz #
# Author Name : fabston #
# File Name : main.py #
# ----------------------------------------------- #