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

Function handleKlineStreamData

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

Source from the content-addressed store, hash-verified

5871 }
5872
5873 let handleKlineStreamData = kline => {
5874 let symbol = kline.s, interval = kline.k.i;
5875 if (!Binance.info[symbol][interval].timestamp) {
5876 if (typeof (Binance.klineQueue[symbol][interval]) !== 'undefined' && kline !== null) {
5877 Binance.klineQueue[symbol][interval].push(kline);
5878 }
5879 } else {
5880 //Binance.options.log('@klines at ' + kline.k.t);
5881 klineHandler(symbol, kline);
5882 if (callback) callback(symbol, interval, klineConcat(symbol, interval));
5883 }
5884 };
5885
5886 let getSymbolKlineSnapshot = (symbol, limit = 500) => {
5887 publicRequest(getSpotUrl() + 'v3/klines', { symbol: symbol, interval: interval, limit: limit }, function (error, data) {

Callers

nothing calls this directly

Calls 2

klineHandlerFunction · 0.85
klineConcatFunction · 0.85

Tested by

no test coverage detected