-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest_helper.go
66 lines (53 loc) · 1.66 KB
/
test_helper.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package okex
/*
Get a http client
*/
func GetDefaultConfig() *Config {
var config Config
// flt. 201812. For swap test env.
config.Endpoint = "http://192.168.80.113:9300/"
config.WSEndpoint = "ws://192.168.80.113:10442/"
config.ApiKey = ""
config.SecretKey = ""
// flt. 20190225. For swap test env only
config.Endpoint = "http://192.168.80.113:9300/"
config.ApiKey = ""
config.SecretKey = ""
config.TimeoutSecond = 45
config.IsPrint = true
config.I18n = ENGLISH
config.WSEndpoint = "wss://real.okex.com:8443/ws/v3"
////
////// flt. 20190225.
////// For future test env only. coinmainweb.new.docker.okex.com --> 192.168.80.97
//config.Endpoint = "http://coinmainweb.new.docker.okex.com/"
//config.ApiKey = ""
//config.SecretKey = ""
//
//// flt. 20190305. For spot websocket & restful api test env only
//config.WSEndpoint = "ws://192.168.80.62:10442/"
//config.Endpoint = "http://192.168.80.62:8814/"
//config.ApiKey = ""
//config.SecretKey = ""
//
// flt. 20190306. For account restful api env only
//config.Endpoint = "http://coinmainweb.new.docker.okex.com/"
//config.ApiKey = ""
//config.SecretKey = ""
// flt. 20190306. For margin restful api env only
//config.Endpoint = "http://192.168.80.118:8814/"
//config.ApiKey = ""
//config.SecretKey = ""
// flt. 20190822. For latest version changed api. www.okex.com is binded to 149.129.82.222
config.Endpoint = "https://www.okex.me/" // com
// set your own ApiKey, SecretKey, Passphrase here
config.ApiKey = ""
config.SecretKey = ""
config.Passphrase = ""
return &config
}
func NewTestClient() *Client {
// Set OKEX API's config
client := NewClient(*GetDefaultConfig())
return client
}