mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
binance: revert the start time filtering
This commit is contained in:
parent
53e74b6262
commit
d7f9742360
|
@ -1240,18 +1240,11 @@ func (e *Exchange) QueryKLines(ctx context.Context, symbol string, interval type
|
|||
|
||||
var kLines []types.KLine
|
||||
for _, k := range resp {
|
||||
startTime := types.NewTimeFromUnix(0, k.OpenTime*int64(time.Millisecond))
|
||||
if options.EndTime != nil {
|
||||
if !startTime.Before(*options.EndTime) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
kLines = append(kLines, types.KLine{
|
||||
Exchange: types.ExchangeBinance,
|
||||
Symbol: symbol,
|
||||
Interval: interval,
|
||||
StartTime: startTime,
|
||||
StartTime: types.NewTimeFromUnix(0, k.OpenTime*int64(time.Millisecond)),
|
||||
EndTime: types.NewTimeFromUnix(0, k.CloseTime*int64(time.Millisecond)),
|
||||
Open: fixedpoint.MustNewFromString(k.Open),
|
||||
Close: fixedpoint.MustNewFromString(k.Close),
|
||||
|
|
Loading…
Reference in New Issue
Block a user