| 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 }); |
nothing calls this directly
no test coverage detected