Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FormattedData ¶
type FormattedData struct {
EventTime int64
Symbol string
LastPrice float64
PriceChange float64
HighPrice float64
LowPrice float64
Volume float64
QuoteVolume float64
OpenTime int64
CloseTime int64
TradeCount int
Latency int64
}
FormattedData represents the structure of the processed data
func FormatTickerData ¶
func FormatTickerData(td TickerData) FormattedData
FormatTickerData converts TickerData to FormattedData
type TickerData ¶
type TickerData struct {
EventType string `json:"e"`
EventTime utils.Int64 `json:"E"`
Symbol string `json:"s"`
LastPrice string `json:"c"`
PriceChange string `json:"p"`
HighPrice string `json:"h"`
LowPrice string `json:"l"`
Volume string `json:"v"`
QuoteVolume string `json:"q"`
OpenTime utils.Int64 `json:"O"`
CloseTime utils.Int64 `json:"C"`
FirstTradeID int `json:"F"`
LastTradeID int `json:"L"`
TradeCount int `json:"n"`
}
TickerData represents the structure of the incoming WebSocket message
Click to show internal directories.
Click to hide internal directories.