Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Commit ec172bd

Browse files
author
Jon Eyrick
authored
Fix POST requests by afsharsafavi
1 parent a084335 commit ec172bd

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

node-binance-api.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ let api = function Binance() {
123123
'X-MBX-APIKEY': key || ''
124124
}
125125
})
126-
const reqObjPOST = (url, data = {}, method = 'POST', key) => ({
127-
url: url,
128-
form : data,
126+
const reqObjPOST = (url, data = {}, method = 'POST', key) => ({
127+
url: url,
128+
form: data,
129129
method: method,
130130
timeout: Binance.options.recvWindow,
131131
headers: {
@@ -208,13 +208,13 @@ let api = function Binance() {
208208
return a;
209209
}, []).join('&');
210210
let signature = crypto.createHmac('sha256', Binance.options.APISECRET).update(query).digest('hex'); // set the HMAC hash header
211-
if (method==='POST') {
212-
let opt = reqObjPOST(
211+
if (method === 'POST') {
212+
let opt = reqObjPOST(
213213
url + '?signature=' + signature,
214214
data,
215215
method,
216216
Binance.options.APIKEY
217-
);
217+
);
218218
proxyRequest(opt, callback);
219219
} else {
220220
let opt = reqObj(

0 commit comments

Comments
 (0)