A Golang SDK for OKX API.
go get github.com/tbtc-bot/go-okex
import ( "github.com/tbtc-bot/go-okex" )
Init client for API services. Get APIKey/SecretKey/Password from your okx account.
client := okex.NewClient("apikey", "apisecret", "password")
res, err := client.NewMaximumLoanService().InstrumentId("ETH-USDT").ManagementMode("cross").ManagementCurrency("USDT").Do(context.Background())
if err != nil { fmt.Println(err) return } fmt.Println(res)