You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.5 KiB

package market
import (
"github.com/shopspring/decimal"
"wss-pool/pkg/model/base"
)
type TickerWebsocketResponse struct {
base base.WebSocketResponseBase
Channel string `json:"ch"`
Timestamp int64 `json:"ts"`
Tick *TickR
Data []TickR
}
type TickerWebsocketResponses struct {
base base.WebSocketResponseBase
Channel string `json:"ch"`
Timestamp int64 `json:"ts"`
Tick *TickR `json:"tick"`
Data []TickR
}
type TickR struct {
Open decimal.Decimal `json:"open"` // 本阶段开盘价(以滚动24小时计)
High decimal.Decimal `json:"high"` // 本阶段最高价(以滚动24小时计)
Low decimal.Decimal `json:"low"` // 本阶段最低价(以滚动24小时计)
Close decimal.Decimal `json:"close"` // 本阶段最新价(以滚动24小时计)
Amount decimal.Decimal `json:"amount"` // 以基础币种计量的交易量(以滚动24小时计)
Count int `json:"count"` // 交易次数(以滚动24小时计)
Bid decimal.Decimal `json:"bid"` // 当前的最高买价
BidSize decimal.Decimal `json:"bidSize"` // 最高买价对应的量
Ask decimal.Decimal `json:"ask"` // 当前的最低卖价
AskSize decimal.Decimal `json:"askSize"` // 最低卖价对应的量
LastPrice decimal.Decimal `json:"lastPrice"` // 最新成交价
LastSize decimal.Decimal `json:"lastSize"` // 最新成交价对应的量
Vol decimal.Decimal `json:"vol"`
IsBa int `json:"is_ba"`
}