Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/f0cii/okex-api
OKEx Open API V3 SDK (Golang Version)
https://github.com/f0cii/okex-api
golang okex-api
Last synced: 17 days ago
JSON representation
OKEx Open API V3 SDK (Golang Version)
- Host: GitHub
- URL: https://github.com/f0cii/okex-api
- Owner: f0cii
- License: mit
- Created: 2020-03-20T05:37:50.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-24T02:30:17.000Z (over 4 years ago)
- Last Synced: 2024-06-19T01:47:52.912Z (7 months ago)
- Topics: golang, okex-api
- Language: Go
- Size: 207 KB
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# okex-api
OKEx Open API V3 SDK (Golang Version)-----
### 1.Downloads or updates OKEX code's dependencies, in your command line:
```
go get -u github.com/frankrap/okex-api
```
### 2.Write the go file. warm tips: test go file, must suffix *_test.go, eg: okex_open_api_v3_test.go
```
package gotestimport (
"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.ENGLISHclient := okex.NewClient(config)
return client
}
```
### 3. run test go:
```
go test -v -run TestOKExServerTime okex_open_api_v3_test.go
```