mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-13 23:16:45 +00:00
Added some Huobi Websocket response structs.
This commit is contained in:
@@ -39,6 +39,23 @@ const (
|
||||
|
||||
var HuobiSocket *socketio.SocketIO
|
||||
|
||||
type HuobiWebsocketTrade struct {
|
||||
Price []float64 `json:"price"`
|
||||
Level []float64 `json:"level"`
|
||||
Amount []float64 `json:"amount"`
|
||||
AccuAmount []float64 `json:"accuAmount"`
|
||||
}
|
||||
|
||||
type HuobiWebsocketTradeDetail struct {
|
||||
SymbolID string `json:"symbolId"`
|
||||
TradeID []int64 `json:"tradeId"`
|
||||
Price []float64 `json:"price"`
|
||||
Time []int64 `json:"time"`
|
||||
Amount []float64 `json:"amount"`
|
||||
TopBids []HuobiWebsocketTrade `json:"topBids"`
|
||||
TopAsks []HuobiWebsocketTrade `json:"topAsks"`
|
||||
}
|
||||
|
||||
type HuobiWebsocketMarketOverview struct {
|
||||
SymbolID string `json:"symbolId"`
|
||||
Last float64 `json:"priceNew"`
|
||||
@@ -51,6 +68,16 @@ type HuobiWebsocketMarketOverview struct {
|
||||
TotalAmount float64 `json:"totalAmount"`
|
||||
}
|
||||
|
||||
type HuobiWebsocketLastTimeline struct {
|
||||
ID int64 `json:"_id"`
|
||||
SymbolID string `json:"symbolId"`
|
||||
Time int64 `json:"time"`
|
||||
LastPrice float64 `json:"priceLast"`
|
||||
Amount float64 `json:"amount"`
|
||||
Volume float64 `json:"volume"`
|
||||
Count int64 `json:"count"`
|
||||
}
|
||||
|
||||
type HuobiResponse struct {
|
||||
Version int `json:"version"`
|
||||
MsgType string `json:"msgType"`
|
||||
|
||||
Reference in New Issue
Block a user