From 64bff63930a7cffc3efafc6ee27416697df7e8ab Mon Sep 17 00:00:00 2001 From: Raidho Feoh Date: Tue, 6 Sep 2022 08:07:41 +0300 Subject: [PATCH] Update node-binance-api.js Add 'listenKeyExpired' event to USER DATA STREAM --- node-binance-api.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node-binance-api.js b/node-binance-api.js index 615485fc..46537113 100644 --- a/node-binance-api.js +++ b/node-binance-api.js @@ -2122,7 +2122,9 @@ let api = function Binance( options = {} ) { */ const userDeliveryDataHandler = ( data ) => { let type = data.e; - if ( type === "MARGIN_CALL" ) { + if ( type === "listenKeyExpired" ) { + console.log("User data stream listen key expired"); + } else if ( type === "MARGIN_CALL" ) { Binance.options.delivery_margin_call_callback( fUserDataMarginConvertData( data ) );