Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶ added in v0.1.35
type Data struct { UpdatedTime int64 `json:"updatedTime"` Symbol string `json:"symbol"` Size string `json:"size"` Price string `json:"price"` Side string `json:"side"` }
Data struct represents individual liquidation data points.
type Liquidation ¶
type Liquidation interface { // SetClient sets the client for the liquidation functionality. SetClient(client *client.Client) error // Subscribe subscribes to liquidation data for the specified symbols. // It also stores the callback for each topic. Subscribe(symbols []string, callback func(response Data)) error // Unsubscribe unsubscribes from the specified topics. Unsubscribe(topics ...string) error // Listen reads the next message from the liquidation channel. Listen() (int, []byte, error) // Close closes the connection to the liquidation channel. Close() // GetMessagesChan returns a channel that receives messages from the liquidation channel. GetMessagesChan() <-chan []byte // Stop stops the liquidation functionality. Stop() }
Liquidation represents the interface for the liquidation functionality.
Click to show internal directories.
Click to hide internal directories.