Snapshots

This commit is contained in:
Luis Fernando Molina committed 2020-05-10 14:17:33 +02:00
1 parent e91125801d
commit 6368221937
75 files changed
+8943 -4332

No files matched your search

+9 -1
View File
@@ -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;
}
}