* Futures WebSocket prevDay ticker * @param {symbol} symbol name or false. can also be a callback * @param {function} callback - callback function * @return {string} the websocket endpoint
(symbol?: string, callback = console.log)
| 5756 | * @return {string} the websocket endpoint |
| 5757 | */ |
| 5758 | futuresTickerStream(symbol?: string, callback = console.log) { |
| 5759 | const reconnect = () => { |
| 5760 | if (this.Options.reconnect) this.futuresTickerStream(symbol, callback); |
| 5761 | }; |
| 5762 | const endpoint = symbol ? `${symbol.toLowerCase()}@ticker` : '!ticker@arr'; |
| 5763 | const subscription = this.futuresSubscribeSingle(endpoint, data => callback(this.fTickerConvertData(data)), { reconnect }); |
| 5764 | return (subscription as any).url; |
| 5765 | } |
| 5766 | |
| 5767 | /** |
| 5768 | * Futures WebSocket miniTicker |
no test coverage detected