bybit.go.api/examples/user/get_api_key_info.go

22 lines
430 B
Go
Raw Normal View History

2023-12-10 16:25:04 +02:00
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))
}