module
Version:
v0.9.3
Opens a new window with list of versions in this module.
Published: Oct 24, 2024
License: MIT
Opens a new window with license information.
README
¶
Coinbase websocket client on Golang
Task
- 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 time
symbol
(string) - instrument name
bid
(float64) - selling price
ask
(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
How to use
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
TODO
- Logger points
- Rate limiter
- Prometheus metrics
- Testing
Resources
Directories
¶
Click to show internal directories.
Click to hide internal directories.