MCPcopy Create free account
hub / github.com/ccxt/node-binance-api / handleDepthStreamData

Function handleDepthStreamData

deprecated/node-binance-api.js:5684–5697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5682 };
5683
5684 let handleDepthStreamData = depth => {
5685 let symbol = depth.s;
5686 let context = Binance.depthCacheContext[symbol];
5687 if (context.messageQueue && !context.snapshotUpdateId) {
5688 context.messageQueue.push(depth);
5689 } else {
5690 try {
5691 depthHandler(depth);
5692 } catch (err) {
5693 return terminate(context.endpointId, true);
5694 }
5695 if (callback) callback(symbol, Binance.depthCache[symbol], context);
5696 }
5697 };
5698
5699 let getSymbolDepthSnapshot = (symbol, cb) => {
5700 publicRequest(getSpotUrl() + 'v3/depth', { symbol: symbol, limit: limit }, function (error, json) {

Callers

nothing calls this directly

Calls 2

depthHandlerFunction · 0.85
terminateFunction · 0.85

Tested by

no test coverage detected