This project written in Python 3.12 and use Django 5.0.2 with MySql database. Also used celery and redis for broker.
All services running in docker. Then Docker and docker-compose are needed for running this project
docker-compose up --build -d
For running tests:
make test
For create admin user:
make create-admin-user
- I used settlement checking (buy_from_exchange) asynchronously with celery task in every order creation.
- I used database row level locking for settlement checking and prevent race condition with skip locked rows in every task running.
- I used database row level locking and F object in django for updating balance value for each user
- I used authentication with Basic Auth