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.NewBybitPublicWebSocket("wss://stream.bybit.com/v5/public/spot", func(message string) error {
|
|
|
|
fmt.Println("Received:", message)
|
|
|
|
return nil
|
|
|
|
})
|
|
|
|
_ = ws.Connect([]string{"orderbook.1.BTCUSDT"})
|
|
|
|
select {}
|
|
|
|
}
|