kopia lustrzana https://github.com/fabston/TradingView-Webhook-Bot
Updated readme and posting mechanism
rodzic
05507908b8
commit
1d6a278f87
|
@ -11,11 +11,15 @@ This bot listens to [TradingView](https://tradingview.com) alerts via webhooks a
|
|||
3. Activate it `source TradingView-Webhook-Bot/bin/activate`
|
||||
4. Install all requirements `pip install -r requirements.txt`
|
||||
5. Edit and update the `config.py` file
|
||||
6. Setup TradingView alerts as shown [here](https://i.imgur.com/QpAP3wp.png)
|
||||
6. Setup TradingView alerts as shown [here](https://i.imgur.com/71UYTcu.png)
|
||||
- TradingViews variables like `{{close}}`, `{{exchange}}` etc. work as well. 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`
|
||||
7. Run the bot `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
|
||||

|
||||
|
||||
## Donations
|
||||
BTC: `13VmcVh7U3y7UQiUGp1nnyn6Pz9TPR61a9`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Alert message in TradingView ex. https://i.imgur.com/QpAP3wp.png
|
||||
# Alert message in TradingView ex. https://i.imgur.com/RFkuf1d.png
|
||||
Buy_Alert = 'Buy Alert!'
|
||||
Sell_Alert = 'Sell Alert!'
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@ discord = config.send_discord_alerts
|
|||
|
||||
def send_buy_order(data):
|
||||
if telegram:
|
||||
tg_bot.sendMessage(config.channel, config.Buy_Alert)
|
||||
tg_bot.sendMessage(config.channel, data)
|
||||
print('Alert has been sent to Telegram.')
|
||||
else:
|
||||
print('INFO: Telegram alerts are disabled.')
|
||||
if discord:
|
||||
discord_alert = DiscordWebhook(url=config.discord_webhook, content=config.Buy_Alert)
|
||||
discord_alert = DiscordWebhook(url=config.discord_webhook, content=data)
|
||||
response = discord_alert.execute()
|
||||
print('Alert has been sent to Discord.')
|
||||
else:
|
||||
|
@ -22,12 +22,12 @@ def send_buy_order(data):
|
|||
|
||||
def send_sell_order(data):
|
||||
if telegram:
|
||||
tg_bot.sendMessage(config.channel, config.Sell_Alert)
|
||||
tg_bot.sendMessage(config.channel, data)
|
||||
print('Alert has been sent to Telegram.')
|
||||
else:
|
||||
print('INFO: Telegram alerts are disabled.')
|
||||
if discord:
|
||||
discord_alert = DiscordWebhook(url=config.discord_webhook, content=config.Sell_Alert)
|
||||
discord_alert = DiscordWebhook(url=config.discord_webhook, content=data)
|
||||
response = discord_alert.execute()
|
||||
print('Alert has been sent to Discord.')
|
||||
else:
|
||||
|
|
Ładowanie…
Reference in New Issue