diff --git a/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js b/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js index 64d03654e..527115ad3 100644 --- a/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js +++ b/Projects/Foundations/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js @@ -494,6 +494,10 @@ while (foundDate !== true) { + if (new Date(since).valueOf() >= (new Date).setSeconds(0,0)) { + return OHLCVs + } + await new Promise(resolve => setTimeout(resolve, rateLimit)) // rate limit const nextValidOHLCVs = useFetchTradesForFetchOHLCVs ? await fetchTradesForOHLCV(symbol, '1m', since, limit, params) :