types: add TakerBuyBaseAssetVolume and TakerBuyQuoteAssetVolume fields to kline

This commit is contained in:
c9s 2021-05-30 23:29:13 +08:00
parent 2925a77815
commit e3473572e9
2 changed files with 24 additions and 20 deletions

View File

@ -481,6 +481,8 @@ func (k *KLine) KLine() types.KLine {
Low: k.Low.Float64(),
Volume: k.Volume.Float64(),
QuoteVolume: k.QuoteVolume.Float64(),
TakerBuyBaseAssetVolume: k.TakerBuyBaseAssetVolume.Float64(),
TakerBuyQuoteAssetVolume: k.TakerBuyQuoteAssetVolume.Float64(),
LastTradeID: uint64(k.LastTradeID),
NumberOfTrades: uint64(k.NumberOfTrades),
Closed: k.Closed,

View File

@ -61,6 +61,8 @@ type KLine struct {
Low float64 `json:"low" db:"low"`
Volume float64 `json:"volume" db:"volume"`
QuoteVolume float64 `json:"quoteVolume" db:"quote_volume"`
TakerBuyBaseAssetVolume float64 `json:"takerBuyBaseAssetVolume"`
TakerBuyQuoteAssetVolume float64 `json:"takerBuyQuoteAssetVolume"`
LastTradeID uint64 `json:"lastTradeID" db:"last_trade_id"`
NumberOfTrades uint64 `json:"numberOfTrades" db:"num_trades"`