bybit.go.api/examples/market/server_time.go

25 lines
377 B
Go
Raw Normal View History

2023-10-30 20:26:54 +02:00
package main
import (
"context"
"fmt"
2023-11-03 16:29:17 +02:00
bybit "github.com/wuhewuhe/bybit.go.api"
2023-10-30 20:26:54 +02:00
)
func main() {
ServerTime()
}
func ServerTime() {
2023-11-03 16:29:17 +02:00
client := bybit.NewBybitHttpClient("", "")
2023-10-30 20:26:54 +02:00
// NewServerTimeService
2023-11-03 16:29:17 +02:00
serverTime, err := client.NewServerTimeService().Do(context.Background())
if err != nil {
fmt.Println(err)
return
}
2023-10-30 20:26:54 +02:00
fmt.Println(bybit.PrettyPrint(serverTime))
}