Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { Start int64 `json:"start"` End int64 `json:"end"` Interval string `json:"interval"` Open string `json:"open"` Close string `json:"close"` High string `json:"high"` Low string `json:"low"` Volume string `json:"volume"` Turnover string `json:"turnover"` Confirm bool `json:"confirm"` Timestamp int64 `json:"timestamp"` }
Data struct represents individual kline data points.
type Kline ¶
type Kline interface { // SetClient sets the client for the kline functionality. SetClient(client *client.Client) error // Subscribe subscribes to kline data for the specified symbols and interval. // It also stores the callback for each topic. Subscribe(symbols []string, interval string, callback func(response Data)) error // Unsubscribe unsubscribes from the specified topics. Unsubscribe(topics ...string) error // Listen reads the next message from the kline channel. Listen() (int, []byte, error) // Close closes the connection to the kline channel. Close() // GetMessagesChan returns a channel that receives messages from the kline channel. GetMessagesChan() <-chan []byte // Stop stops the kline functionality. Stop() }
Kline represents the interface for the kline functionality.
Click to show internal directories.
Click to hide internal directories.