OKEx Open API V3 SDK (Golang Version)
go get -u github.com/frankrap/okex-api
package gotest
import (
"fmt"
"github.com/frankrap/okex-api"
"testing"
)
func TestOKExServerTime(t *testing.T) {
serverTime, err := okex.NewOKExClient().GetServerTime()
if err != nil {
t.Error(err)
}
fmt.Println("OKEx's server time: ", serverTime)
}
func NewOKExClient() *okex.Client {
var config okex.Config
config.Endpoint = "https://www.okex.com/"
config.ApiKey = ""
config.SecretKey = ""
config.Passphrase = ""
config.TimeoutSecond = 45
config.IsPrint = true
config.I18n = okex.ENGLISH
client := okex.NewClient(config)
return client
}
go test -v -run TestOKExServerTime okex_open_api_v3_test.go