diff --git a/pkg/exchange/binance/parse.go b/pkg/exchange/binance/parse.go index 0349daecb..e9b0a0bda 100644 --- a/pkg/exchange/binance/parse.go +++ b/pkg/exchange/binance/parse.go @@ -470,20 +470,22 @@ type KLineEvent struct { func (k *KLine) KLine() types.KLine { return types.KLine{ - Exchange: types.ExchangeBinance, - Symbol: k.Symbol, - Interval: types.Interval(k.Interval), - StartTime: time.Unix(0, k.StartTime*int64(time.Millisecond)), - EndTime: time.Unix(0, k.EndTime*int64(time.Millisecond)), - Open: k.Open.Float64(), - Close: k.Close.Float64(), - High: k.High.Float64(), - Low: k.Low.Float64(), - Volume: k.Volume.Float64(), - QuoteVolume: k.QuoteVolume.Float64(), - LastTradeID: uint64(k.LastTradeID), - NumberOfTrades: uint64(k.NumberOfTrades), - Closed: k.Closed, + Exchange: types.ExchangeBinance, + Symbol: k.Symbol, + Interval: types.Interval(k.Interval), + StartTime: time.Unix(0, k.StartTime*int64(time.Millisecond)), + EndTime: time.Unix(0, k.EndTime*int64(time.Millisecond)), + Open: k.Open.Float64(), + Close: k.Close.Float64(), + High: k.High.Float64(), + 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, } } diff --git a/pkg/types/kline.go b/pkg/types/kline.go index f4f980361..a417e31a6 100644 --- a/pkg/types/kline.go +++ b/pkg/types/kline.go @@ -55,12 +55,14 @@ type KLine struct { Interval Interval `json:"interval" db:"interval"` - Open float64 `json:"open" db:"open"` - Close float64 `json:"close" db:"close"` - High float64 `json:"high" db:"high"` - Low float64 `json:"low" db:"low"` - Volume float64 `json:"volume" db:"volume"` - QuoteVolume float64 `json:"quoteVolume" db:"quote_volume"` + Open float64 `json:"open" db:"open"` + Close float64 `json:"close" db:"close"` + High float64 `json:"high" db:"high"` + 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"`