From 8bf5c5f7786044a3f54cf54c1d20220a09afbfa4 Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 26 Dec 2021 03:14:19 +0800 Subject: [PATCH] fix kline sync query --- pkg/exchange/kucoin/exchange.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/exchange/kucoin/exchange.go b/pkg/exchange/kucoin/exchange.go index 18ca213cb..473e31af9 100644 --- a/pkg/exchange/kucoin/exchange.go +++ b/pkg/exchange/kucoin/exchange.go @@ -158,9 +158,8 @@ func (e *Exchange) QueryKLines(ctx context.Context, symbol string, interval type req.Interval(toLocalInterval(interval)) if options.StartTime != nil { req.StartAt(*options.StartTime) - } - - if options.EndTime != nil { + req.EndAt(options.StartTime.Add(1500 * interval.Duration())) + } else if options.EndTime != nil { req.EndAt(*options.EndTime) }