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