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