go-coinbase-socket

module
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2023 License: MIT

README

Coinbase websocket client on Golang

IMG

Task

  1. Connect to the Coinbase cryptocurrency exchange via WebSocket
  2. 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)
  3. 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
  4. Connect to MySql and write data received through WebSocket to the ticks table
  5. 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)
  6. Publish the project repository on Github
  7. 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL