mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
types: add TakerBuyBaseAssetVolume and TakerBuyQuoteAssetVolume fields to kline
This commit is contained in:
parent
2925a77815
commit
e3473572e9
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user