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

Method handleDepthStreamData

src/node-binance-api.ts:6475–6488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6473 };
6474
6475 const handleDepthStreamData = depth => {
6476 const symbol = depth.s;
6477 const context = this.depthCacheContext[symbol];
6478 if (context.messageQueue && !context.snapshotUpdateId) {
6479 context.messageQueue.push(depth);
6480 } else {
6481 try {
6482 this.depthHandler(depth);
6483 } catch (err) {
6484 return this.terminate(context.endpointId, true);
6485 }
6486 if (callback) callback(symbol, this.depthCache[symbol], context);
6487 }
6488 };
6489
6490 const getSymbolDepthSnapshot = async (symbol: string) => {
6491 const json = await this.publicSpotRequest('v3/depth', { symbol: symbol, limit: limit });

Callers

nothing calls this directly

Calls 2

depthHandlerMethod · 0.95
terminateMethod · 0.95

Tested by

no test coverage detected