diff --git a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js index 03f85c18d..7a885399f 100644 --- a/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js +++ b/Projects/Superalgos/TS/Bot-Modules/Sensor-Bot/Exchange-Raw-Data/HistoricOHLCVs.js @@ -93,6 +93,9 @@ if (API.rateLimit !== undefined) { rateLimit = API.rateLimit } + if (API.limit !== undefined) { + limit = API.limit + } if (API.hostname !== undefined) { hostname = API.hostname } @@ -106,9 +109,6 @@ } } } - if (API.limit !== undefined) { - limit = API.limit - } } } @@ -342,12 +342,13 @@ let lastOHLCVKey = '' let params = undefined let previousSince - let invalidDate = false let fromDate = new Date(since) let lastDate = new Date() while (true) { + let invalidDate = false + /* Reporting we are doing well */ function heartBeat(noNewInternalLoop) { let processingDate = new Date(since)