updated version of 3commas
Binance Trading Bots (FOR BITSGAP)API made with Flask
- Python 3.8.5 and above
- Postgres 13 and above
- Redis Server
Intiallizing postgres database
CREATE USER bitsgap WITH PASSWORD 'bitsgap';
CREATE DATABASE bitsgap;
GRANT ALL PRIVILEGES ON DATABASE bitsgap TO bitsgap;
Clone the repo:
git clone
Change directory
cd apibitsgap
Note: make sure you have pip
and virtualenv
installed.
Initial installation: make install
To run test: make tests
` To run application: make run
To run all commands at once : make all
Make sure to run the initial migration commands to update the database.
> python3 manage.py db init
> python3 manage.py db migrate --message 'initial database migration'
> python3 manage.py db upgrade
Create virtualenv:
python3 -m venv venv
Activate the virtual environment
source venv/bin/activate
Install the requirements
pip3 install -r requirements.txt
Run the application
python3 manage.py run
Run the application: PRODUCTION Mode
gunicorn manage:app --worker-class gevent --bind 127.0.0.1:5000 --log-level info
Start Celery Background task on a new terminal session
celery -A app.tasks.celery worker -l INFO -B
Start Flower Tool to monitor Celery Task on a new terminal session
flower -A app.tasks.celery --port=5555 -E
curl -X POST -H "Content-Type: application/json" -d '{"email": "test@example.com","username":"username", "password": "password"}' http://127.0.0.1:5550/v1/register