@icgio/icg-exchanges-wrapper 1.14.216 → 1.14.217
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/middleware/orders.js +4 -4
- package/package.json +1 -1
package/middleware/orders.js
CHANGED
|
@@ -1439,14 +1439,14 @@ module.exports = class Orders {
|
|
|
1439
1439
|
for (let exchange in exchange_pairs) {
|
|
1440
1440
|
for (let pair of exchange_pairs[exchange]) {
|
|
1441
1441
|
if (Exchanges[exchange].ohlcv) {
|
|
1442
|
-
|
|
1443
|
-
|
|
1442
|
+
const ohlcv_from_timetamp = new Date().floorHours(1).addHours(-OHLCV_DEFAULT_PAST_HOURS).getTime()
|
|
1443
|
+
const ohlcv_to_timestamp = new Date().floorHours(1).getTime()
|
|
1444
1444
|
Exchanges[exchange].ohlcv(pair, ohlcv_from_timetamp, ohlcv_to_timestamp, (res) => {
|
|
1445
1445
|
ohlcv_handler(exchange, pair, res)
|
|
1446
1446
|
})
|
|
1447
1447
|
setInterval(() => {
|
|
1448
|
-
|
|
1449
|
-
|
|
1448
|
+
const ohlcv_from_timetamp = new Date().floorHours(1).addHours(-OHLCV_DEFAULT_PAST_HOURS).getTime()
|
|
1449
|
+
const ohlcv_to_timestamp = new Date().floorHours(1).getTime()
|
|
1450
1450
|
Exchanges[exchange].ohlcv(pair, ohlcv_from_timetamp, ohlcv_to_timestamp, (res) => {
|
|
1451
1451
|
ohlcv_handler(exchange, pair, res)
|
|
1452
1452
|
})
|