This repository has been archived on 2022-11-30. You can view files and clone it, but cannot push or open issues or pull requests.
tacitus/cmd/watcher/main.go

28 lines
372 B
Go

package main
import (
"github.com/kcotugno/tacitus"
"github.com/kcotugno/tacitus/websocket"
"log"
"time"
)
func main() {
c := websocket.NewClient()
err := c.Open()
if err != nil {
log.Print(err)
}
req := tacitus.Request{Type: tacitus.Subscribe,
ProductIds: []string{"ETH-USD"}}
time.Sleep(2 * time.Second)
c.Send(req)
time.Sleep(30 * time.Second)
}