2023-11-03 02:19:07 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2023-11-05 23:35:56 +02:00
|
|
|
bybit "github.com/wuhewuhe/bybit.go.api"
|
2023-11-03 02:19:07 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
ws := bybit.NewBybitPrivateWebSocket("wss://stream-testnet.bybit.com/v5/private", "8wYkmpLsMg10eNQyPm", "Ouxc34myDnXvei54XsBZgoQzfGxO4bkr2Zsj", func(message string) error {
|
|
|
|
fmt.Println("Received:", message)
|
|
|
|
return nil
|
|
|
|
})
|
|
|
|
// Connect and subscribe to the desired topic
|
|
|
|
_ = ws.Connect([]string{"order"})
|
|
|
|
select {}
|
|
|
|
}
|