forked from nntaoli-project/goex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
WsApi.go
35 lines (29 loc) · 1.13 KB
/
WsApi.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
package goex
type FuturesWsApi interface {
DepthCallback(func(depth *Depth))
TickerCallback(func(ticker *FutureTicker))
TradeCallback(func(trade *Trade, contract string))
//OrderCallback(func(order *FutureOrder))
//PositionCallback(func(position *FuturePosition))
//AccountCallback(func(account *FutureAccount))
SubscribeDepth(pair CurrencyPair, contractType string) error
SubscribeTicker(pair CurrencyPair, contractType string) error
SubscribeTrade(pair CurrencyPair, contractType string) error
//Login() error
//SubscribeOrder(pair CurrencyPair, contractType string) error
//SubscribePosition(pair CurrencyPair, contractType string) error
//SubscribeAccount(pair CurrencyPair) error
}
type SpotWsApi interface {
DepthCallback(func(depth *Depth))
TickerCallback(func(ticker *Ticker))
TradeCallback(func(trade *Trade))
//OrderCallback(func(order *Order))
//AccountCallback(func(account *Account))
SubscribeDepth(pair CurrencyPair) error
SubscribeTicker(pair CurrencyPair) error
SubscribeTrade(pair CurrencyPair) error
//Login() error
//SubscribeOrder(pair CurrencyPair) error
//SubscribeAccount(pair CurrencyPair) error
}