@@ -11,7 +11,7 @@ goex project is designed to unify and standardize the interfaces of each digital
1111### Exchanges are supported by goex ` 23+ `
1212| Exchange | Market API | Order API | Version |
1313| --- | --- | --- | --- |
14- | hbg.com | Y | Y | 1 |
14+ | huobi.pro | Y | Y | 1 |
1515| hbdm.com | Y (REST / WS)| Y | 1 |
1616| okex.com (spot/future)| Y (REST / WS) | Y | 1 |
1717| okex.com (swap future) | Y | Y | 2 |
@@ -21,104 +21,38 @@ goex project is designed to unify and standardize the interfaces of each digital
2121| bitfinex.com | Y | Y | 1 |
2222| zb.com | Y | Y | 1 |
2323| kraken.com | Y | Y | * |
24- | poloniex.com | Y | Y | * |
25- | aacoin.com | Y | Y | 1 |
26- | allcoin.ca | Y | Y | * |
24+ | poloniex.com | Y | Y | * |
2725| big.one | Y | Y | 2\| 3 |
28- | fcoin.com | Y (REST / WS) | Y | 2 |
2926| hitbtc.com | Y | Y | * |
3027| coinex.com | Y | Y | 1 |
3128| exx.com | Y | Y | 1 |
3229| bithumb.com | Y | Y | * |
3330| gate.io | Y | N | 1 |
34- | btcbox.co.jp | Y | N | * |
3531| bittrex.com | Y | N | 1.1 |
36- | btcchina.com | Y | Y | 1 |
37- | coinbig.com | Y | Y | * |
3832
3933### Install goex
40- ``` go get github.com/nntaoli-project/goex ```
41-
42- ### Example
43- ``` golang
44-
45- package main
46-
47- import (
48- " github.com/nntaoli-project/goex"
49- " github.com/nntaoli-project/goex/builder"
50- " log"
51- " time"
52- )
53-
54- func main () {
55- apiBuilder := builder.NewAPIBuilder ().HttpTimeout (5 * time.Second )
56- // apiBuilder := builder.NewAPIBuilder().HttpTimeout(5 * time.Second).HttpProxy("socks5://127.0.0.1:1080")
57-
58- // build spot api
59- // api := apiBuilder.APIKey("").APISecretkey("").ClientID("123").Build(goex.BITSTAMP)
60- api := apiBuilder.APIKey (" " ).APISecretkey (" " ).Build (goex.HUOBI_PRO )
61- log.Println (api.GetExchangeName ())
62- log.Println (api.GetTicker (goex.BTC_USD ))
63- log.Println (api.GetDepth (2 , goex.BTC_USD ))
64- // log.Println(api.GetAccount())
65- // log.Println(api.GetUnfinishOrders(goex.BTC_USD))
66-
67- // build future api
68- futureApi := apiBuilder.APIKey (" " ).APISecretkey (" " ).BuildFuture (goex.HBDM )
69- log.Println (futureApi.GetExchangeName ())
70- log.Println (futureApi.GetFutureTicker (goex.BTC_USD , goex.QUARTER_CONTRACT ))
71- log.Println (futureApi.GetFutureDepth (goex.BTC_USD , goex.QUARTER_CONTRACT , 5 ))
72- // log.Println(futureApi.GetFutureUserinfo()) // account
73- // log.Println(futureApi.GetFuturePosition(goex.BTC_USD , goex.QUARTER_CONTRACT))//position info
74- }
34+ > go get
7535
76- ```
36+ ``` go get github.com/nntaoli-project/goex ```
37+ > go mod
7738
78- ### websocket Example
79- ``` golang
80- import (
81- " github.com/nntaoli-project/goex"
82- " github.com/nntaoli-project/goex/huobi"
83- // "github.com/nntaoli-project/goex/okcoin"
84- " log"
39+ ```
40+ require (
41+ github.com/nntaoli-project/goex latest
8542)
86-
87- func main () {
88-
89- // ws := okcoin.NewOKExFutureWs() //ok future
90- ws := huobi.NewHbdmWs () // huobi future
91- // setup callback
92- ws.SetCallbacks (func (ticker *goex.FutureTicker ) {
93- log.Println (ticker)
94- }, func (depth *goex.Depth ) {
95- log.Println (depth)
96- }, func (trade *goex.Trade , contract string ) {
97- log.Println (contract, trade)
98- })
99- // subscribe
100- ws.SubscribeTrade (goex.BTC_USDT , goex.NEXT_WEEK_CONTRACT )
101- ws.SubscribeDepth (goex.BTC_USDT , goex.QUARTER_CONTRACT , 5 )
102- ws.SubscribeTicker (goex.BTC_USDT , goex.QUARTER_CONTRACT )
103- }
104-
10543```
10644
107- ### More Detail
108-
109- [ goex.TOP] ( https://goex.top )
110-
111- # Highly Recommended(IMPORTANCE)
45+ #Recommended(IMPORTANCE)
112461 . use GoLand development.
113472 . turn off the auto format function.
114483 . DONOT reformat existing files, which will result in a particularly bad commit.
115494 . use the OrderID2 field instead of the OrderID
50+ 5 . can't use the deprecated field or method
11651
117- ### How to find us
118- Join QQ group: [ 574829125] ( # )
119-
52+ donate & Buy a cup of Coffee for author
12053-----------------
54+ BTC:13cBHLk6B7t3Uj7caJbCwv1UaiuiA6Qx8z
12155
122- ### Buy me a Coffe
123-
124- < img src = " https://raw.githubusercontent.com/nntaoli-project/goex/dev/wx_pay.JPG " width = " 250 " alt = " Buy me a Coffe " > & nbsp ;& nbsp ;& nbsp ; < img src = " https://raw.githubusercontent.com/nntaoli-project/goex/dev/IMG_1177.jpg " width = " 250 " alt = " Buy me a Coffe " >
56+ LTC : LVxM7y1K2dnpuNBU42ei3dKzPySf4VAm1H
57+
58+ ETH:0x98573ddb33cdddce480c3bc1f9279ccd88ca1e93
0 commit comments