Snapshots
This commit is contained in:
1 parent
e91125801d
commit
6368221937
75 files changed
+8943
-4332
No files matched your search
+9
-1
@@ -1134,11 +1134,19 @@ module.exports = class bitstamp extends Exchange {
|
||||
body = this.urlencode (query);
|
||||
contentType = 'application/x-www-form-urlencoded';
|
||||
headers['Content-Type'] = contentType;
|
||||
} else {
|
||||
// sending an empty POST request will trigger
|
||||
// an API0020 error returned by the exchange
|
||||
// therefore for empty requests we send a dummy object
|
||||
// https://github.com/ccxt/ccxt/issues/6846
|
||||
body = this.urlencode ({ 'foo': 'bar' });
|
||||
contentType = 'application/x-www-form-urlencoded';
|
||||
headers['Content-Type'] = contentType;
|
||||
}
|
||||
}
|
||||
const authBody = body ? body : '';
|
||||
const auth = xAuth + method + url.replace ('https://', '') + contentType + xAuthNonce + xAuthTimestamp + xAuthVersion + authBody;
|
||||
const signature = this.encode (this.hmac (this.encode (auth), this.encode (this.secret)));
|
||||
const signature = this.hmac (this.encode (auth), this.encode (this.secret));
|
||||
headers['X-Auth-Signature'] = signature;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user