Giter Site home page Giter Site logo

maxoralbay / tradingview-webhook-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fabston/tradingview-webhook-bot

0.0 0.0 0.0 286 KB

๐Ÿ“Š Send TradingView alerts to Telegram, Discord, Slack, Twitter and Email.

License: MIT License

Python 96.21% Dockerfile 3.79%

tradingview-webhook-bot's Introduction

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

About โ€ข Features โ€ข Installation โ€ข Images โ€ข Help

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

  • Telegram Support using the Python Telegram libary
  • Discord Support using webhooks
  • Slack 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. Sign up now and receive โ‚ฌ20 free credits.

  1. Clone this repository git clone https://github.com/fabston/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",
     "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
  7. If you use a firewall be sure to open the corresponding port
  8. Run the bot with python main.py
  9. PM2 can help you in running the app in the background / on system boot.

Docker

  1. Clone this repository git clone https://github.com/fabston/TradingView-Webhook-Bot.git
  2. Edit and update config.py
  3. docker-compose build
  4. 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.

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.


Buy Me A Coffee

tradingview-webhook-bot's People

Contributors

kroil avatar sakuyamaij avatar jagzmz avatar omaksat avatar dependabot[bot] avatar fabston avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.