bybit.go.api/examples/websocket/private_ws.go

16 lines
337 B
Go
Raw Normal View History

package main
import (
"fmt"
2023-11-05 23:35:56 +02:00
bybit "github.com/wuhewuhe/bybit.go.api"
)
func main() {
2023-11-06 18:29:28 +02:00
ws := bybit.NewBybitPrivateWebSocket("wss://stream-testnet.bybit.com/v5/private", "YOUR_API_KEY", "YOUR_API_SECRET", func(message string) error {
fmt.Println("Received:", message)
return nil
})
_ = ws.Connect([]string{"order"})
select {}
}