A trading bot that follows TradingView alerts executing them on you Binance account and providing you constant updates through a Telegram bot.
- Python 3
- Pip
- Binance account
- TradingView Pro account
- Telegram account
Before pushing to heroku, let's test this in a local environment:
-
Clone this repo.
-
Activate your python venv and run
pip install -r requirements.txt
to install all the necessary dependencies. -
Setup your API keys in config.py:
- WEBHOOK_PASSPHRASE is the passphrase that you want to use for your payload.
- API_KEY and API_SECRET are your Binance API keys, fetch them here.
- USER_ID and TOKEN are for your Telegram bot, fetch the TOKEN by creating a new bot with @BotFather and fetch the USER_ID by sending a message to @RawDataBot.
-
Run the app with
python app.py
. -
Test the
/webhook
endpoint with Insomnia or similar, passing it a sample request with this format.
- Head over to heroku and create an account.
- Create a new python app and push your local code into it, simply following the heroku instructions, then open it annotating its URL.
- Create a new alert on TradingView as explained here.
- Insert
your-heroku-URL/webhook
as the webhook URL and your payload as the message as explained here. - Sit back and relax watching your Telegram bot notifications.
This bot supports a double_order mode which consists in scalping the UP/DOWN leveraged indexes on Binance: selling a position will result in buying the opposite position, if you want to get the money out of this cycle you have to do it by selling manually.
Use at your own risk, this involves your Binance account.