The goal of this coding challenge is to create a simple bitcoin price calculator on the BTC/EUR trading pair.
Inputs:
- BTC ask
Output:
- Total price of BTC ask
This repository depends on Poetry as a package manager.
Run:
poetry installto install all dependenciespoetry add package-nameto install any additional dependency (you can use any dependency you like)poetry run pytest teststo run all tests
Running a development server:
- You can use
make runto automatically run your development server
Mypy and Black are used for code formatting. All code formatting rules have already been specified.
You can use the Makefile to automatically format your code. (make format)
All data will be fetched from the Bitstamp Orderbook.
The orderbook returns all bids and asks on the EURBTC trading pair.
Each Ask is composed of (at minimum):
- Bitcoin on sale
- Price asked
It is upto you to gather how you would go about calculating BTC price for large orders (> 2 BTC).
A simple fuzz-based test has already been created.
It is upto you to add test cases to help testing your bitcoin price calculator.
Your API must pass all fuzz tests as well as your own tests.