22 lines
430 B
Go
22 lines
430 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
bybit "github.com/wuhewuhe/bybit.go.api"
|
|
)
|
|
|
|
func main() {
|
|
GetApiKeyInfo()
|
|
}
|
|
|
|
func GetApiKeyInfo() {
|
|
client := bybit.NewBybitHttpClient("YOUR_API_KEY", "YOUR_API_SECRET", bybit.WithBaseURL(bybit.TESTNET))
|
|
userResult, err := client.NewUserServiceNoParams().GetAPIKeyInfo(context.Background())
|
|
if err != nil {
|
|
fmt.Println(err)
|
|
return
|
|
}
|
|
fmt.Println(bybit.PrettyPrint(userResult))
|
|
}
|