A Telegram bot for remotely managing Binance Trade Bot.
If you have feature requests please open an issue on this repo, developers are also welcome to contribute!
I wanted to develop an easy way of managing Binance Trade Bot so that I wouldn't have to constantly ssh into the VPS and my non-techy friends could enjoy the benefits of the bot.
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
- Edit coin list (
supported_coin_listfile) - Edit user configuration (
user.cfgfile) - Delete database file (
crypto_trading.dbfile) - Display last 20 log lines
- WIP Display gains / current ratios in the database
The program's default behavior fetches Telegram token and user_id from Binance Trade Bot's apprise.yaml file.
Only the Telegram user with user_id equal to the one set in the apprise.yaml file will be able to use the bot.
⚠ The program should be compatible with any operating system but has not been thoroughly tested on Windows nor MacOS.
Python 3 is required.
- Install dependencies:
# install required Python 3 modules
$ python3 -m pip install -r requirements.txt- Move
BTBManagerTelegram.pyfile into Binance Trade Bot's installation folder (it should be in the same folder assupported_coin_listfile)
⚠ Make sure the correct rwx permissions are set and the program is run with correct privileges.
BTBManagerTelegram can be run directly by executing the following command:
# Run normally
$ python3 BTBManagerTelegram.py
# 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 BTBManagerTelegram.py &Make sure Binance Trade Bot's apprise.yaml file is correctly setup before running.
BTBManagerPython can be imported in your Python script and used in the following way:
from BTBManagerPython import BTBManagerPython
BTBManagerPython()The BTBManagerPython() class takes the following optional initialization arguments:
root_path:
Default value:'./'
Description: Current base directory, to be used in case the bot has not been put inside Binance Trade Bot's installation folder.from_yaml:
Default value:True
Description: Set toFalseif you don't want BTBManagerPython to automatically fetch Telegramtokenanduser_idfromapprise.yamlfile.token:
Default value:None
Description: Iffrom_yamlis set toFalsethis will be used as Telegramtoken.user_id:
Default value:None
Description: Iffrom_yamlis set toFalsethis will be used as Telegramuser_id.
This project is for informational purposes only. You should not construe 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 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.