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.
27 lines
1.3 KiB
27 lines
1.3 KiB
package market
|
|
|
|
import (
|
|
"github.com/shopspring/decimal"
|
|
"wss-pool/pkg/model/base"
|
|
)
|
|
|
|
type SubscribeCtKlineResponse struct {
|
|
base base.WebSocketResponseBase
|
|
Channel string `json:"ch"`
|
|
Timestamp int64 `json:"ts"`
|
|
Tick *CtKlineTick
|
|
Data []CtKlineTick
|
|
}
|
|
|
|
type CtKlineTick struct {
|
|
Id int64 `json:"id"` // K线ID,也就是K线时间戳,K线起始时间
|
|
Mrid int64 `json:"mrid"` // 订单ID
|
|
Vol decimal.Decimal `json:"vol"` // 成交量张数。 值是买卖双边之和
|
|
Count decimal.Decimal `json:"count"` // 成交笔数。 值是买卖双边之和
|
|
Open decimal.Decimal `json:"open"` // 开盘价
|
|
Close decimal.Decimal `json:"close"` // 收盘价,当K线为最晚的一根时,是最新成交价
|
|
Low decimal.Decimal `json:"low"` // 最低价
|
|
High decimal.Decimal `json:"high"` // 最高价
|
|
Amount decimal.Decimal `json:"amount"` // 成交量(币), 即 sum(每一笔成交量(张) * 单张合约面值/该笔成交价)。 值是买卖双边之和
|
|
Rrade_Turnover decimal.Decimal `json:"trade_turnover"` // 成交额, 即sum(每一笔成交张数 * 合约面值 * 成交价格)。 值是买卖双边之和
|
|
}
|
|
|