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.
35 lines
1.4 KiB
35 lines
1.4 KiB
2 months ago
|
package bamodel
|
||
|
|
||
|
import (
|
||
|
"github.com/shopspring/decimal"
|
||
|
"wss-pool/pkg/model/base"
|
||
|
)
|
||
|
|
||
|
type SubscribeKLineResponse struct {
|
||
|
base base.BaWebSocketResponseBase
|
||
|
Event string `json:"e"` // 事件类型
|
||
|
TimeE string `json:"E"` // 事件时间
|
||
|
Symbol int64 `json:"s"` // 交易对
|
||
|
Tick *K
|
||
|
Data []K
|
||
|
}
|
||
|
type K struct {
|
||
|
Tt int64 `json:"t"` // 这根K线的起始时间
|
||
|
TT int64 `json:"T"` // 这根K线的结束时间
|
||
|
S string `json:"s"` // 交易对
|
||
|
I string `json:"i"` // K线间隔
|
||
|
F int `json:"f"` // 这根K线期间第一笔成交ID
|
||
|
L int `json:"L"` // 这根K线期间末一笔成交ID
|
||
|
O decimal.Decimal `json:"o"` // 这根K线期间第一笔成交价
|
||
|
C decimal.Decimal `json:"c"` // 这根K线期间末一笔成交价
|
||
|
H decimal.Decimal `json:"h"` // 这根K线期间最高成交价
|
||
|
Ll decimal.Decimal `json:"l"` // 这根K线期间最低成交价
|
||
|
V decimal.Decimal `json:"v"` // 这根K线期间成交量
|
||
|
N int `json:"n"` // 这根K线期间成交笔数
|
||
|
X bool `json:"x"` // 这根K线是否完结(是否已经开始下一根K线)
|
||
|
Q decimal.Decimal `json:"q"` // 这根K线期间成交额
|
||
|
Vv decimal.Decimal `json:"V"` // 主动买入的成交量
|
||
|
Qq decimal.Decimal `json:"Q"` // 主动买入的成交额
|
||
|
B decimal.Decimal `json:"B"` // 忽略此参数
|
||
|
}
|