binance: revert the start time filtering

This commit is contained in:
c9s 2022-06-07 00:50:07 +08:00
parent 53e74b6262
commit d7f9742360
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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),