From 7e4f973f9e0156974a645c7899b3ee960a2f14c4 Mon Sep 17 00:00:00 2001 From: t0chk <86585817+t0chk@users.noreply.github.com> Date: Tue, 3 May 2022 08:59:10 +0300 Subject: [PATCH 1/2] Update node-binance-api.js --- node-binance-api.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node-binance-api.js b/node-binance-api.js index 615485fc..f4a253ed 100644 --- a/node-binance-api.js +++ b/node-binance-api.js @@ -528,7 +528,8 @@ let api = function Binance( options = {} ) { if ( typeof flags.method === 'undefined' ) flags.method = 'GET'; // GET POST PUT DELETE if ( typeof flags.type === 'undefined' ) flags.type = false; // TRADE, SIGNED, MARKET_DATA, USER_DATA, USER_STREAM else { - if ( typeof data.recvWindow === 'undefined' ) data.recvWindow = Binance.options.recvWindow; + if(flags.type !== 'USER_STREAM') + if ( typeof data.recvWindow === 'undefined' ) data.recvWindow = Binance.options.recvWindow; requireApiKey( 'promiseRequest' ); headers['X-MBX-APIKEY'] = Binance.options.APIKEY; } From 7d6afe3cd215c3a8debf8fcc08efaea1d082f566 Mon Sep 17 00:00:00 2001 From: t0chk Date: Tue, 3 May 2022 18:12:41 +0300 Subject: [PATCH 2/2] Update node-binance-api.js advanced parameter to terminate() --- node-binance-api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node-binance-api.js b/node-binance-api.js index f4a253ed..34d9b274 100644 --- a/node-binance-api.js +++ b/node-binance-api.js @@ -5520,9 +5520,9 @@ let api = function Binance( options = {} ) { * @param {string} endpoint - the string associated with the endpoint * @return {undefined} */ - terminate: function ( endpoint ) { + terminate: function ( endpoint, reconnect = false ) { if ( Binance.options.verbose ) Binance.options.log( 'WebSocket terminating:', endpoint ); - return terminate( endpoint ); + return terminate( endpoint, reconnect ); }, /**