A modular trading data management system designed to store, process, and visualize trade activity. This project includes:
- A RESTful API for storing and querying trade data with authentication.
- A CSV batch importer to automate trade data ingestion from daily exchange reports.
- A PnL computation workflow that generates trade performance reports in the terminal.
- A web dashboard for traders to visualize their daily trading reports interactively.
- GitHub Actions for automating the trade import workflow by calling the API to input trade data.
Python >= 3.11
- Install poetry
pip install poetry- Initialise project
poetry install- Start APIs
uvicorn main:app --reload- Access the API Docs:
Go to
http://localhost:8000/docs - Generate Report
Run
python generate_report_script.py -t <trader_id> -d <date in ISO format>
- Set up environment variables
- Run
docker-compose up -d - Access API Docs at
http://localhost:8000/docs - Access PnL Dashboard at
http://localhost:3000 - Run scripts in shell by running
docker exec -it power_trade_backend bash
- Install poetry
pip install poetry- Initialise project
poetry install --with dev- Run tests
pytest -s