Skip to content

Commit

Permalink
renamed url arguments to original names from coinbase fix #3006
Browse files Browse the repository at this point in the history
  • Loading branch information
kroitor committed May 31, 2018
1 parent 317cb7f commit f27a4a8
Showing 1 changed file with 38 additions and 40 deletions.
78 changes: 38 additions & 40 deletions js/coinbase.js
Expand Up @@ -43,13 +43,11 @@ module.exports = class coinbase extends Exchange {
'fetchWithdrawals': false,
},
'urls': {
'logo': 'https://user-images.githubusercontent.com/1294454/27766527-b1be41c6-5edb-11e7-95f6-5b496c469e2c.jpg',
'api': 'https://api.coinbase.com/v2',
'logo': 'https://user-images.githubusercontent.com/1294454/40811661-b6eceae2-653a-11e8-829e-10bfadb078cf.jpg',
'api': 'https://api.coinbase.com',
'www': 'https://www.coinbase.com',
'doc': 'https://developers.coinbase.com/api/v2',
'fees': [
'https://support.coinbase.com/customer/portal/articles/2109597-buy-sell-bank-transfer-fees',
],
'fees': 'https://support.coinbase.com/customer/portal/articles/2109597-buy-sell-bank-transfer-fees',
},
'requiredCredentials': {
'apiKey': true,
Expand All @@ -61,57 +59,57 @@ module.exports = class coinbase extends Exchange {
'currencies',
'time',
'exchange-rates',
'users/{userId}',
'prices/{symbol}/buy',
'prices/{symbol}/sell',
'prices/{symbol}/spot',
'users/{user_id}',
'prices/{currency_pair}/buy',
'prices/{currency_pair}/sell',
'prices/{currency_pair}/spot',
],
},
'private': {
'get': [
'accounts',
'accounts/{accountId}',
'accounts/{accountId}/addresses',
'accounts/{accountId}/addresses/{address_id}',
'accounts/{accountId}/addresses/{address_id}/transactions',
'accounts/{accountId}/transactions',
'accounts/{accountId}/transactions/{transaction_id}',
'accounts/{accountId}/buys',
'accounts/{accountId}/buys/{buyId}',
'accounts/{accountId}/sells',
'accounts/{accountId}/sells/{sellId}',
'accounts/{accountId}/deposits',
'accounts/{accountId}/deposits/{depositId}',
'accounts/{accountId}/withdrawals',
'accounts/{accountId}/withdrawals/{withdrawalId}',
'accounts/{account_id}',
'accounts/{account_id}/addresses',
'accounts/{account_id}/addresses/{address_id}',
'accounts/{account_id}/addresses/{address_id}/transactions',
'accounts/{account_id}/transactions',
'accounts/{account_id}/transactions/{transaction_id}',
'accounts/{account_id}/buys',
'accounts/{account_id}/buys/{buy_id}',
'accounts/{account_id}/sells',
'accounts/{account_id}/sells/{sell_id}',
'accounts/{account_id}/deposits',
'accounts/{account_id}/deposits/{deposit_id}',
'accounts/{account_id}/withdrawals',
'accounts/{account_id}/withdrawals/{withdrawal_id}',
'payment-methods',
'payment-methods/{methodId}',
'payment-methods/{payment_method_id}',
'user',
'user/auth',
],
'post': [
'accounts',
'accounts/{accountId}/primary',
'accounts/{accountId}/addresses',
'accounts/{accountId}/transactions',
'accounts/{accountId}/transactions/{transactionId}/complete',
'accounts/{accountId}/transactions/{transactionId}/resend',
'accounts/{accountId}/buys',
'accounts/{accountId}/buys/{buyId}/commit',
'accounts/{accountId}/sells',
'accounts/{accountId}/sells/{sellId}/commit',
'accounts/{accountId}/deposists',
'accounts/{accountId}/deposists/{depositId}/commit',
'accounts/{accountId}/withdrawals',
'accounts/{accountId}/withdrawals/{withdrawalId}/commit',
'accounts/{account_id}/primary',
'accounts/{account_id}/addresses',
'accounts/{account_id}/transactions',
'accounts/{account_id}/transactions/{transaction_id}/complete',
'accounts/{account_id}/transactions/{transaction_id}/resend',
'accounts/{account_id}/buys',
'accounts/{account_id}/buys/{buy_id}/commit',
'accounts/{account_id}/sells',
'accounts/{account_id}/sells/{sell_id}/commit',
'accounts/{account_id}/deposists',
'accounts/{account_id}/deposists/{deposit_id}/commit',
'accounts/{account_id}/withdrawals',
'accounts/{account_id}/withdrawals/{withdrawal_id}/commit',
],
'put': [
'accounts/{accountId}',
'accounts/{account_id}',
'user',
],
'delete': [
'accounts/{id}',
'accounts/{accountId}/transactions/{transactionId}',
'accounts/{account_id}/transactions/{transaction_id}',
],
},
},
Expand Down Expand Up @@ -171,7 +169,7 @@ module.exports = class coinbase extends Exchange {
if (Object.keys (query).length)
request += '?' + this.urlencode (query);
}
let url = this.urls['api'] + request;
let url = this.urls['api'] + '/' + this.version + request;
if (api === 'private') {
this.checkRequiredCredentials ();
let nonce = this.nonce ().toString ();
Expand Down

0 comments on commit f27a4a8

Please sign in to comment.