diff --git a/node-binance-api.js b/node-binance-api.js index 615485fc..7ae05cb4 100644 --- a/node-binance-api.js +++ b/node-binance-api.js @@ -328,7 +328,7 @@ let api = function Binance( options = {} ) { data.timestamp = new Date().getTime() + Binance.info.timeOffset; if ( typeof data.recvWindow === 'undefined' ) data.recvWindow = Binance.options.recvWindow; let query = method === 'POST' && noDataInSignature ? '' : makeQueryString( data ); - let signature = crypto.createHmac( 'sha256', Binance.options.APISECRET ).update( query ).digest( 'hex' ); // set the HMAC hash header + let signature = crypto.createHmac( 'sha256', Binance.options.APISECRET ).update( decodeURIComponent(query) ).digest( 'hex' ); // set the HMAC hash header if ( method === 'POST' ) { let opt = reqObjPOST( url,