package market import ( "github.com/shopspring/decimal" "wss-pool/pkg/model/base" ) type SubscribeCtDetailResponse struct { base base.WebSocketResponseBase Channel string `json:"ch"` // 数据所属的 channel,格式: market.$contract_code.detail Timestamp int64 `json:"ts"` // 响应生成时间点,单位:毫秒 Tick *CtDetailTick } type CtDetailTick struct { Id int64 `json:"id"` // ID Mrid int64 `json:"mrid"` // 订单ID Open decimal.Decimal `json:"open"` // 开盘价 Close decimal.Decimal `json:"close"` // 收盘价,当K线为最晚的一根时,是最新成交价 High decimal.Decimal `json:"high"` // 最高价 Low decimal.Decimal `json:"low"` // 最低价 Amount decimal.Decimal `json:"amount"` // 成交量(币), 即 sum(每一笔成交量(张) * 单张合约面值/该笔成交价)。 值是买卖双边之和 Vol decimal.Decimal `json:"vol"` // 成交量(张)。 值是买卖双边之和 TradeTurnover decimal.Decimal `json:"trade_turnover"` // 成交额,即sum(每一笔成交张数 * 合约面值 * 成交价格)。 值是买卖双边之和 Count int64 `json:"count"` // 成交笔数 Asks []decimal.Decimal `json:"asks"` // [卖1价,卖1量(张)] Bids []decimal.Decimal `json:"bids"` // [买1价,买1量(张)] }