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

Function klineConcat

deprecated/node-binance-api.js:2422–2433  ·  view source on GitHub ↗
(symbol, interval)

Source from the content-addressed store, hash-verified

2420 * @return {array} - interval data for given symbol
2421 */
2422 const klineConcat = (symbol, interval) => {
2423 let output = Binance.ohlc[symbol][interval];
2424 if (typeof Binance.ohlcLatest[symbol][interval].time === 'undefined') return output;
2425 const time = Binance.ohlcLatest[symbol][interval].time;
2426 const last_updated = Object.keys(Binance.ohlc[symbol][interval]).pop();
2427 if (time >= last_updated) {
2428 output[time] = Binance.ohlcLatest[symbol][interval];
2429 delete output[time].time;
2430 output[time].isFinal = false;
2431 }
2432 return output;
2433 };
2434
2435 /**
2436 * Used for websocket @kline

Callers 2

handleKlineStreamDataFunction · 0.85
getSymbolKlineSnapshotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected