This service use the coinbase websocket match api to calculate the VWAP of given pairs.
Update the following configuration in the config.yaml file at root dir.
coinbase:
websocket_url: wss://ws-feed.pro.coinbase.com
channels:
- BTC-USD
- ETH-USD
- ETH-BTC
vwap:
datapoints: 200go mod downloadgo test ./..../scripts/build.shIf you want to change the update the config after building the app config.yaml is also copied in the bin dir bin/config.yaml, by default it loads the
config file relative to executable.
./bin/vwap_appIf you want to load the configuration file from any other path, use -c=path-of-config-path.
- Gorilla Websocket
- Stretchr Testify
.
βββ README.md
βββ cmd
βΒ Β βββ vwap_app.go
βββ config.go
βββ config.yaml
βββ go.mod
βββ go.sum
βββ pkg
βΒ Β βββ coinbase
βΒ Β βΒ Β βββ coinbase.go
βΒ Β βΒ Β βββ coinbase_test.go
βΒ Β βββ vwap
βΒ Β βββ vwap.go
βΒ Β βββ vwap_stream.go
βΒ Β βββ vwap_test.go
βββ scripts
βββ build.sh