node_modules/binance/lib/websocket-client.js
/**
     * Subscribe to a spot user data stream. Use REST client to generate and persist listen key.
     * Supports spot, margin & isolated margin listen keys.
     */
Subscribe to a spot user data stream. Use REST client to generate and persist listen key.
Supports spot, margin & isolated margin listen keys.
Subscribe to a spot user data stream . Use REST client to generate and persist listen key . Supports spot margin & isolated margin listen keys .
subscribeSpotUserDataStreamWithListenKey(listenKey, forceNewConnection, isReconnecting) {
        const market = 'spot';
        const wsKey = requestUtils_1.getWsKeyWithContext(market, 'userData', undefined, listenKey);
        this.setWsState(wsKey, isReconnecting ? READY_STATE_RECONNECTING : READY_STATE_CONNECTING);
        const ws = this.connectToWsUrl(this.getWsBaseUrl(market, wsKey) + `/ws/${listenKey}`, wsKey, forceNewConnection);
        this.setKeepAliveListenKeyTimer(listenKey, market, ws, wsKey);
        return ws;
    }
subscribeSpotUserDataStreamWithListenKey ( listenKey , forceNewConnection , isReconnecting ) { const market = 'spot' ; const wsKey = requestUtils_1 . getWsKeyWithContext ( market , 'userData' , undefined , listenKey ) ; this . setWsState ( wsKey , isReconnecting ? READY_STATE_RECONNECTING : READY_STATE_CONNECTING ) ; const ws = this . connectToWsUrl ( this . getWsBaseUrl ( market , wsKey ) + ` ${ listenKey } ` , wsKey , forceNewConnection ) ; this . setKeepAliveListenKeyTimer ( listenKey , market , ws , wsKey ) ; return ws ; }
Subscribe to a spot user data stream.
Subscribe to a spot user data stream .
// Start & store timer to keep alive listen key (and handle expiration)