fix kline sync query

This commit is contained in:
c9s 2021-12-26 03:14:19 +08:00
parent a5c7ffa134
commit 8bf5c5f778

View File

@ -158,9 +158,8 @@ func (e *Exchange) QueryKLines(ctx context.Context, symbol string, interval type
req.Interval(toLocalInterval(interval)) req.Interval(toLocalInterval(interval))
if options.StartTime != nil { if options.StartTime != nil {
req.StartAt(*options.StartTime) req.StartAt(*options.StartTime)
} req.EndAt(options.StartTime.Add(1500 * interval.Duration()))
} else if options.EndTime != nil {
if options.EndTime != nil {
req.EndAt(*options.EndTime) req.EndAt(*options.EndTime)
} }