Snapshots
This commit is contained in:
1 parent
e91125801d
commit
6368221937
75 files changed
+8943
-4332
No files matched your search
+18
-11
@@ -27,6 +27,7 @@ module.exports = class paymium extends Exchange {
|
||||
'https://github.com/Paymium/api-documentation',
|
||||
'https://www.paymium.com/page/developers',
|
||||
],
|
||||
'referral': 'https://www.paymium.com/page/sign-up?referral=eDAzPoRQFMvaAB8sf-qj',
|
||||
},
|
||||
'api': {
|
||||
'public': {
|
||||
@@ -41,12 +42,12 @@ module.exports = class paymium extends Exchange {
|
||||
},
|
||||
'private': {
|
||||
'get': [
|
||||
'merchant/get_payment/{UUID}',
|
||||
'merchant/get_payment/{uuid}',
|
||||
'user',
|
||||
'user/addresses',
|
||||
'user/addresses/{btc_address}',
|
||||
'user/orders',
|
||||
'user/orders/{UUID}',
|
||||
'user/orders/{uuid}',
|
||||
'user/price_alerts',
|
||||
],
|
||||
'post': [
|
||||
@@ -57,7 +58,7 @@ module.exports = class paymium extends Exchange {
|
||||
'merchant/create_payment',
|
||||
],
|
||||
'delete': [
|
||||
'user/orders/{UUID}/cancel',
|
||||
'user/orders/{uuid}/cancel',
|
||||
'user/price_alerts/{id}',
|
||||
],
|
||||
},
|
||||
@@ -204,9 +205,9 @@ module.exports = class paymium extends Exchange {
|
||||
|
||||
async cancelOrder (id, symbol = undefined, params = {}) {
|
||||
const request = {
|
||||
'UUID': id,
|
||||
'uuid': id,
|
||||
};
|
||||
return await this.privateDeleteUserOrdersUUIDCancel (this.extend (request, params));
|
||||
return await this.privateDeleteUserOrdersUuidCancel (this.extend (request, params));
|
||||
}
|
||||
|
||||
sign (path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
||||
@@ -220,18 +221,24 @@ module.exports = class paymium extends Exchange {
|
||||
this.checkRequiredCredentials ();
|
||||
const nonce = this.nonce ().toString ();
|
||||
let auth = nonce + url;
|
||||
headers = {
|
||||
'Api-Key': this.apiKey,
|
||||
'Api-Nonce': nonce,
|
||||
};
|
||||
if (method === 'POST') {
|
||||
if (Object.keys (query).length) {
|
||||
body = this.json (query);
|
||||
auth += body;
|
||||
headers['Content-Type'] = 'application/json';
|
||||
}
|
||||
} else {
|
||||
if (Object.keys (query).length) {
|
||||
const queryString = this.urlencode (query);
|
||||
auth += queryString;
|
||||
url += '?' + queryString;
|
||||
}
|
||||
}
|
||||
headers = {
|
||||
'Api-Key': this.apiKey,
|
||||
'Api-Signature': this.hmac (this.encode (auth), this.encode (this.secret)),
|
||||
'Api-Nonce': nonce,
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
headers['Api-Signature'] = this.hmac (this.encode (auth), this.encode (this.secret));
|
||||
}
|
||||
return { 'url': url, 'method': method, 'body': body, 'headers': headers };
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user