- Connect to the Coinbase cryptocurrency exchange via WebSocket
- Subscribe to prices for three instruments: ETH-BTC, BTC-USD, BTC-EUR (data will come in through the WebSocket as they appear on the exchange)
- Create a "ticks" table in MySql with the following fields:
timestamp
(int64) - price timesymbol
(string) - instrument namebid
(float64) - selling priceask
(float64) - buying price
- Connect to MySql and write data received through WebSocket to the
ticks
table - Write data from the three instruments (ETH-BTC, BTC-USD, BTC-EUR) to the database in three threads (each instrument has its own write thread)
- Publish the project repository on Github
- Use good development practices to enable further application functionality expansion
Project based on Clean architecture principles.
Requirements:
- Go 1.19+ installed
- Docker installed (to run docker-compose)
# Run docker-compose
make compose.start
# Stop docker-compose
make compose.stop
# other command - call help
make help
- Logger points
- Rate limiter
- Prometheus metrics
- Testing