28 lines
372 B
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)
|
|
}
|