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