A cryptocurrency trader for binance and bittrex
This bot uses external signals fetched from telegram channels to place trades. Other settings are provided by the user.
This project is still under development. Use it for educational purposes. Trade with it at your own risk.
windows users should be able to follow with some minor adjustments
- Pull the repo
- Install the requirements
- Ensure you have python >= 3.6, mysql and node js installed.
- Create a new python virtual environment and activate it.
$ virtualenv venv
$ . /venv/bin/activate
- To install the python dependencies inside your virtual environment,
$ pip install -r requirements.txt
- To install node js dependencies for the dashboard;
$ cd clone-front
$ npm install
- Create a mysql database
- Create a
.flaskenv
file with the following fields
FLASK_APP=dashboard/flaskapp.py
DATABASE_URL=mysql://root:@localhost/clown #or whichever name you like
[email protected]
MAIL_PASSWORD=youmailpassword #read more from flask documentation about email support
BOT_ADDRESS=http://localhost:5080/signal #change port later if this address is in use
SECURITY_PASSWORD_SALT=your salt
HMAC_KEY=your hmac key
JWT_SECRET_KEY=
SECRET_KEY=
ADMINS=
FLASK_RUN_PORT=5000
-
Create a
config.ini
file with the following fields[DEFAULT] Telegram_API_ID = your telegram id Telegram_API_HASH = your telegram hash LOG_LEVEL = 10 #or preferred log level [SQLALCHEMY] DATABASE_URI = mysql://username:password@localhost/clown #checkout sqlalchemy database url format [HTTP_SIGNAL_RECIEVER] PORT=5080
-
Create migrations for the database
with the virtual environment activate
$ flask db migrate $flask db upgrade
-
Launch!! *there are 3 modules
- shell 1 with venv active,
python main.py
- shell 2 with venv active,
flask run
- shell 3 without venv,
cd clone-front
,npm start
- shell 1 with venv active,
You can use systemctl to run the bot. that will require additional setup. Also you can build the frontend react js module.