* Futures WebSocket bookTicker * @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)
| 5786 | * @return {string} the websocket endpoint |
| 5787 | */ |
| 5788 | futuresBookTickerStream(symbol?: string, callback = console.log) { |
| 5789 | const reconnect = () => { |
| 5790 | if (this.Options.reconnect) this.futuresBookTickerStream(symbol, callback); |
| 5791 | }; |
| 5792 | const endpoint = symbol ? `${symbol.toLowerCase()}@bookTicker` : '!bookTicker'; |
| 5793 | const subscription = this.futuresSubscribeSingle(endpoint, data => callback(this.fBookTickerConvertData(data)), { reconnect }); |
| 5794 | return (subscription as any).url; |
| 5795 | } |
| 5796 | |
| 5797 | /** |
| 5798 | * Websocket futures klines |
no test coverage detected