A prototype aggregator for stock prices.
- Receives price changes (quotes) for various stock (instruments) via websocket
- Aggregates these historic price data for each instrument
- Provides an endpoint for querying these data
- This project is mostly for demonstrating the flexibility of clean architecture
- To actually view events, we'll need a separate service that publishes these stream of events via websocket
- python 3.10
- poetry
- Fast API
Please follow the steps synchronously
- build base image
make build-local-base
- build services
docker-compose build
- apply migrations
docker-compose run candlestick make db_upgrade
- To run tests (currently only infrastructure test is available) First start the database
make start_db
Once db is started, run the test
docker-compose run candlestick make test
Start all the services (api, instrument-consumer and quote-consumer)
make start_infrastructure
To test or view the interactive API documentation, visit http://localhost:8081
- Handle empty candles to use previous price quote
- Improve test coverage
- Proper exception handling
- General cleanup
- Optional --> scaling (Kubernetes)