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

Method futuresTickerStream

src/node-binance-api.ts:5758–5765  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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

Callers 1

reconnectMethod · 0.95

Calls 2

fTickerConvertDataMethod · 0.95

Tested by

no test coverage detected