shanejones / BTB-manager-telegram

A fully-featured but easy-to-use Telegram bot for remotely managing Binance Trade Bot instances

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binance Trade Bot Manager Telegram

A Telegram bot for remotely managing Binance Trade Bot.

About

I wanted to develop an easy way of managing Binance Trade Bot so that I wouldn't have to constantly ssh into my VPS, and my non-techy friends could enjoy the benefits of automated trading.

As of now the bot is able to perform the following actions:

  • πŸ” Check bot status (running / not running)
  • β–Ά Start Binance Trade Bot
  • ⏹ Stop Binance Trade Bot
  • πŸ’΅ Display current coin stats (balance, USD value, BTC value, initial buying price)
  • βž— Display current coin ratios
  • πŸ“ˆ Display progress (how much more of a certain coin you gained since you started using Binance Trade Bot)
  • βŒ› Display trade history
  • πŸ“œ Display last 4000 characters of log file
  • πŸ‘› Edit coin list (supported_coin_list file)
  • βš™ Edit user configuration (user.cfg file)
  • ❌ Delete database file (crypto_trading.db file)
  • πŸ“€ Export database file
  • ⬆ Update Binance Trade Bot (and notify when new update is available)
  • ⬆ Update Binance Trade Bot Manager Telegram (and notify when new update is available)
  • User defined custom scripts

The program's default behavior fetches Telegram token and chat_id from Binance Trade Bot's apprise.yml file.
Only the Telegram users in the chat with chat_id equal to the one set in the apprise.yml file will be able to use the bot.

⚠ The program is fully compatible with Linux and Windows through WSL;
RWX permission problems are present on native Windows and MacOS.

Installation

Python 3 is required.
BTB-manager-telegram should be installed in the same parent directory as Binance Trade Bot.
Your filesystem should look like this:

.
└── *parent_dir*
    β”œβ”€β”€ BTB-manager-telegram
    └── binance-trade-bot
  1. Clone this repository:
$ git clone https://github.com/lorcalhost/BTB-manager-telegram.git
  1. Move to BTB-manager-telegram's directory:
$ cd BTB-manager-telegram
  1. Install BTB-manager-telegram's dependencies:
$ python3 -m pip install -r requirements.txt

⚠ Make sure the correct rwx permissions are set and the program is run with correct privileges.

Setup

  • For a quick Telegram bot setup guide click here.
  • For a Docker setup guide click here.
  • If you would like to run several Binance Trade Bot instances at the same time click here.

Note:
BTB-manager-telegram also supports user defined custom scripts.

Usage

BTBManagerTelegram can be run directly by executing the following command:

# Run normally
$ python3 -m btb_manager_telegram

# If the bot is running on a server you may want to keep it running even after ssh connection is closed by using nohup
$ nohup python3 -m btb_manager_telegram &

# If you are using a virtual environment for the binance trade bot you can specify the Python binary path
$ python3 -m btb_manager_telegram --python_path=/home/pi/binance-trade-bot/venv/bin/python

Make sure Binance Trade Bot's apprise.yml file is correctly setup before running.

Note:
If Binance Trade Bot and BTB-Manager-Telegram were not installed in the same parent directory or you want to use different token and chat_id from the ones in the apprise.yml file, the following optional arguments can be used:

optional arguments:
  -p PATH, --path PATH  (optional) binance-trade-bot installation path
  -y PYTHON, --python_path PYTHON_PATH
                        (optional) Python binary to be used for the BTB. If unset, uses the same executable (and thus virtual env if any) than the telegram bot.
  -t TOKEN, --token TOKEN
                        (optional) Telegram bot token
  -c CHAT_ID, --chat_id CHAT_ID
                        (optional) Telegram chat id
  -d DOCKER, --docker DOCKER
                        (optional) Run the script in a docker container.
                        NOTE: Run the 'docker_setup.py' file before passing this flag.

⚠ Please check the Docker setup guide if you would like to run the bot in a Docker container.

Interaction

Interaction with BTBManagerTelegram can be started by sending the /start command in the bot's Telegram chat.
Every time the Telegram bot is restarted, the /start command should be sent again.

You can also add the bot to a group if multiple people need to access this bot. Please note that each user will have to type /start in the group, before they can start interacting with the bot.

Screenshots

Click here

         

Troubleshooting

Support the project

If you like BTB-manager-telegram and use it on a daily basis consider supporting the project through a small donation. πŸ˜„

❀️ Sponsor on GitHub

Donations through GitHub sponsors will be matched by GitHub (e.g. if you decide to donate 10$, GitHub will add 10$ to the donation).

Contributions and feature requests

If you have any feature requests please open an issue.

Contributions from anyone are welcome! Before opening pull requests please read the contributing guidelines.

Disclaimer

This project is for informational purposes only. You should not consider any such information or other material as legal, tax, investment, financial, or other advice. Nothing contained here constitutes a solicitation, recommendation, endorsement, or offer by me or any third party service provider to buy or sell any securities or other financial instruments in this or in any other jurisdiction in which such solicitation or offer would be unlawful under the securities laws of such jurisdiction.

If you plan to use real money, USE AT YOUR OWN RISK.

Under no circumstances will I or the project's maintainers be held responsible or liable in any way for any claims, damages, losses, expenses, costs, or liabilities whatsoever, including, without limitation, any direct or indirect damages for loss of profits.

Contributors ✨

Many people contributed to the project by providing ideas, finding bugs and helping in the development (Emoji Key ✨).
This project follows the all-contributors specification.


Lorenzo Callegari 乐子睿

πŸš‡ ⚠️ πŸ’» πŸ“– 🚧 πŸ› πŸ€”

Dmytro Litvinov

πŸ’» πŸ€” 🚧 πŸ§‘β€πŸ«

Heitor Ramon Ribeiro

πŸ€” 🎨

NovusEdge

πŸ’»

Sachin S. Kamath

πŸ€” πŸ“–

Hoang Dinh

πŸ›

Dmitry Kravtsov

πŸ€” πŸ’»

Florian Sydekum

πŸ’»

Nico L.

πŸ›

SeriousSeal

πŸ’»

titulebolide

πŸ’» πŸ€”

Stephen Goult

πŸ›

About

A fully-featured but easy-to-use Telegram bot for remotely managing Binance Trade Bot instances

License:MIT License


Languages

Language:Python 99.6%Language:Dockerfile 0.4%