@icgio/icg-exchanges-wrapper 1.17.26 → 1.17.27
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.
|
@@ -576,11 +576,12 @@ const get_exchanges_market_history = function (Exchanges, exchange_pair_dict, ti
|
|
|
576
576
|
}
|
|
577
577
|
check_status()
|
|
578
578
|
})
|
|
579
|
-
//
|
|
580
|
-
//
|
|
581
|
-
//
|
|
582
|
-
//
|
|
583
|
-
|
|
579
|
+
// Do NOT cache this promise. `Exchange.market_history_ws(pair, tf, cb)` returns a
|
|
580
|
+
// filtered/sorted SNAPSHOT of `market_history_dict[pair]` at call time (see icg-exchanges
|
|
581
|
+
// mexc.js:214), so the result is frozen once the promise resolves. Rerunning the else
|
|
582
|
+
// branch each poll lets a new `market_history_ws` call pick up trades the WebSocket has
|
|
583
|
+
// appended since last tick; `first_time[Exchange_name]` still prevents the underlying
|
|
584
|
+
// WS from being reopened, so there's no reconnect cost.
|
|
584
585
|
}
|
|
585
586
|
|
|
586
587
|
// If WebSocket promise rejects (timeout/error), fall back to REST for all pairs
|