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

Method deliveryBookTickerStream

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

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

Source from the content-addressed store, hash-verified

6014 * @return {string} the websocket endpoint
6015 */
6016 deliveryBookTickerStream(symbol?: string, callback = console.log) {
6017 const reconnect = () => {
6018 if (this.Options.reconnect) this.deliveryBookTickerStream(symbol, callback);
6019 };
6020 const endpoint = symbol ? `${symbol.toLowerCase()}@bookTicker` : '!bookTicker';
6021 const subscription = this.deliverySubscribeSingle(endpoint, data => callback(this.dBookTickerConvertData(data)), { reconnect });
6022 return (subscription as any).url;
6023 }
6024
6025 /**
6026 * Websocket delivery klines

Callers 1

reconnectMethod · 0.95

Calls 2

Tested by

no test coverage detected