(symbol, interval)
| 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 |
no outgoing calls
no test coverage detected