- Notifications
You must be signed in to change notification settings - Fork639
Home
bit_he edited this pageDec 11, 2020 ·4 revisions
package mainimport ("github.com/nntaoli-project/goex""github.com/nntaoli-project/goex/builder""log")funcmain() {api:=builder.DefaultAPIBuilder.APIKey("").APISecretkey("").ApiPassphrase("").Build(goex.OKEX)//创建现货api实例log.Println(api.GetExchangeName())log.Println(api.GetTicker(goex.BTC_USDT))//获取ticker}
package mainimport ("github.com/nntaoli-project/goex""github.com/nntaoli-project/goex/builder""log")funcmain() {api:=builder.DefaultAPIBuilder.BuildFuture(goex.OKEX)//创建api实例//api := builder.DefaultAPIBuilder.BuildFuture(goex.OKEX_SWAP) //创建Swap API实例log.Println(api.GetExchangeName())log.Println(api.GetFutureTicker(goex.BTC_USDT,goex.QUARTER_CONTRACT))//获取ticker}