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

Function futuresKlineConcat

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

Source from the content-addressed store, hash-verified

1024 * @return {array} - interval data for given symbol
1025 */
1026 const futuresKlineConcat = (symbol, interval) => {
1027 let output = Binance.futuresTicks[symbol][interval];
1028 if (typeof Binance.futuresRealtime[symbol][interval].time === 'undefined') return output;
1029 const time = Binance.futuresRealtime[symbol][interval].time;
1030 const last_updated = Object.keys(Binance.futuresTicks[symbol][interval]).pop();
1031 if (time >= last_updated) {
1032 output[time] = Binance.futuresRealtime[symbol][interval];
1033 //delete output[time].time;
1034 output[last_updated].isFinal = true;
1035 output[time].isFinal = false;
1036 }
1037 return output;
1038 };
1039
1040 /**
1041 * Used for websocket futures @kline

Callers 2

handleFuturesKlineStreamFunction · 0.85
getFuturesKlineSnapshotFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected