bybit.go.api/examples/user/get_api_key_info.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))
}