Skip to content

Commit

Permalink
fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriz authored and dmzoneill committed May 3, 2018
1 parent ce646be commit dc409bc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions node-binance-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ module.exports = function() {
headers: {
'User-Agent': userAgent,
'Content-type': contentType,
'X-MBX-APIKEY': key || undefined
'X-MBX-APIKEY': key || ''
}
})

Expand Down Expand Up @@ -148,9 +148,9 @@ module.exports = function() {
const apiRequest = function(url, data = {}, callback, method = 'GET') {
if ( !options.APIKEY ) throw Error('apiRequest: Invalid API Key');
let opt = reqObj(
url,
data,
method,
url,
data,
method,
options.APIKEY
);
proxyRequest(opt, callback);
Expand All @@ -170,7 +170,7 @@ module.exports = function() {

let opt = reqObj(
url+(query ? '?'+query : ''),
data,
data,
method,
options.APIKEY
);
Expand All @@ -194,8 +194,8 @@ module.exports = function() {
let signature = crypto.createHmac('sha256', options.APISECRET).update(query).digest('hex'); // set the HMAC hash header

let opt = reqObj(
url+'?'+query+'&signature='+signature,
data,
url+'?'+query+'&signature='+signature,
data,
method,
options.APIKEY
);
Expand Down

0 comments on commit dc409bc

Please sign in to comment.