This is the repository of the Bitcoin Rate solution. It contains the following applications:
- API: Responsible to expose two endpoints:
- Get the BTC-USD latest rate from a local database.
- Get the BTC-USD historical rates from a local database.
- Extractor: Responsible to constantly get the BTC-USD exchange rate from Coinlayer and save to a database.
This section contains the information required to configure and test the local environment
- Pipenv preferably using Brew (https://brew.sh/)
- Make
- Coinlayer API KEY
make setup
make test
This section contains the information to setup and run each component locally
This will run the Extractor start save rates from Coinlayer Public API
make run-extractor
This will create a local DB and run the API
make run-api
API will now be available on http://localhost:5000
.
API documentation is in OpenAPI 3.0 format. To view the docs:
make docs-view
Docs will now be served on http://localhost:8080
- Add security headers
- Add authentication
- Add CI configuration
- Create service and repository layers to abstract database and any other potential low level logic
- Use async web frameworks like FastAPI to run and wrap the API
- Add pagination for the historical bitcoin endpoint
- Add pre-hook commit to validate code format with black.
- Increase unit test coverage
- Add functional tests