From 123abbe13ea620cfc3cfd5cc8c9cb27e330fccac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=20=D0=93=D1=83=D0=B1?= =?UTF-8?q?=D0=B0=D0=BD=D0=BE=D0=B2?= Date: Sun, 26 Sep 2021 17:41:07 +0300 Subject: [PATCH] fixed bug in the orderStatus() method; changed some URLs from WAPI to SAPI --- node-binance-api.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/node-binance-api.js b/node-binance-api.js index 3301ec2e..4c991d61 100644 --- a/node-binance-api.js +++ b/node-binance-api.js @@ -3025,7 +3025,7 @@ let api = function Binance( options = {} ) { orderStatus: function ( symbol, orderid, callback, flags = {} ) { let parameters = Object.assign( { symbol: symbol }, flags ); if (orderid){ - Object.assign( { orderId: orderid }, parameters ) + Object.assign( parameters, { orderId: orderid } ); } if ( !callback ) { @@ -3539,10 +3539,10 @@ let api = function Binance( options = {} ) { resolve( response ); } } - signedRequest( wapi + 'v3/tradeFee.html', params, callback ); + signedRequest( sapi + 'v1/asset/tradeFee', params, callback ); } ) } else { - signedRequest( wapi + 'v3/tradeFee.html', params, callback ); + signedRequest( sapi + 'v1/asset/tradeFee', params, callback ); } }, @@ -4058,7 +4058,7 @@ let api = function Binance( options = {} ) { return promiseRequest( 'v1/marginType', params, { base:fapi, method:'POST', type:'SIGNED' } ); }, - // type: 1: Add postion margin,2: Reduce postion margin + // type: 1: Add postion margin, 2: Reduce postion margin futuresPositionMargin: async ( symbol, amount, type = 1, params = {} ) => { params.symbol = symbol; params.amount = amount; @@ -4343,7 +4343,7 @@ let api = function Binance( options = {} ) { return promiseRequest( 'v1/marginType', params, { base:dapi, method:'POST', type:'SIGNED' } ); }, - // type: 1: Add postion margin,2: Reduce postion margin + // type: 1: Add postion margin, 2: Reduce postion margin deliveryPositionMargin: async ( symbol, amount, type = 1, params = {} ) => { params.symbol = symbol; params.amount = amount;