The simple apps for periodic upload last prices currencies from https://api.binance.com/ You can familiarize with this api here
App include next option:
- Through Celery worker periodic upload prices (by default each 30 seconds)
- backend app (from Django) with API endpoinds for getting history prices and admin panel for turnoff monitoring one currency.
- web client from Vue.
- Docker config for running the applications together
Fast way for running:
docker-compose build
docker-compose up
Fill the .env
file in project root directory.
Next variables is example for settings:
DEBUG=TRUE
POSTGRES_DB=curr_mon
POSTGRES_USER=ps_user
POSTGRES_PASSWORD=ps_user
POSTGRES_HOST=postgres
POSTGRES_PORT=5432
If you have outside instance with DB, can disable postgres image in docker-compose.yml
./manage.py uploadrates
before need set environment variables
For disable some currency from monitoring we have two way:
-
open admin panel on
/admin/Trade/currency/
URL and unsetmonitored
on need currency.
for login you may neeed create user./manage.py createsuperuser
-
Upload filled fixture with any currencies with flag
monitores
is False.python manage.py loaddata Trade/fixtures/initial_currencies.json