Documentation ¶
Index ¶
- type API
- func (a *API) Close() error
- func (a *API) Connect() error
- func (a *API) OrderBookSubscribe(cCode1 string, cCode2 string, depth int64, handler SubscriptionHandler) (int64, error)
- func (a *API) OrderBookUnsubscribe(cCode1 string, cCode2 string) error
- func (a *API) Ticker(cCode1 string, cCode2 string) (*responseTicker, error)
- type OrderBookUpdateData
- type SubscriptionHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct { //Key API key Key string //Secret API secret Secret string //Dialer used to connect to WebSocket server Dialer *websocket.Dialer //Logger used for error logging Logger *log.Logger //ReceiveDone send message after Close() initiation ReceiveDone chan bool // contains filtered or unexported fields }
API cex.io websocket API type
func (*API) OrderBookSubscribe ¶
func (a *API) OrderBookSubscribe(cCode1 string, cCode2 string, depth int64, handler SubscriptionHandler) (int64, error)
OrderBookSubscribe subscribes to order book updates. Order book snapshot will come as a first update
func (*API) OrderBookUnsubscribe ¶
OrderBookUnsubscribe unsubscribes from order book updates
type OrderBookUpdateData ¶
type OrderBookUpdateData struct { ID int64 Pair string Timestamp int64 Bids [][]float64 Asks [][]float64 }
OrderBookUpdateData data of order book update
type SubscriptionHandler ¶
type SubscriptionHandler func(updateData OrderBookUpdateData)
SubscriptionHandler subscription update handler type
Click to show internal directories.
Click to hide internal directories.