ccxt 4.2.44 → 4.2.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/CHANGELOG.md +3099 -8415
  2. package/README.md +4 -4
  3. package/change.sh +4 -2
  4. package/dist/ccxt.browser.js +1242 -195
  5. package/dist/ccxt.browser.min.js +7 -7
  6. package/dist/cjs/ccxt.js +1 -1
  7. package/dist/cjs/src/base/Exchange.js +48 -0
  8. package/dist/cjs/src/base/ws/Cache.js +13 -5
  9. package/dist/cjs/src/base/ws/OrderBook.js +2 -2
  10. package/dist/cjs/src/binance.js +407 -21
  11. package/dist/cjs/src/bingx.js +43 -5
  12. package/dist/cjs/src/bitfinex2.js +1 -0
  13. package/dist/cjs/src/bithumb.js +5 -0
  14. package/dist/cjs/src/bitstamp.js +1 -1
  15. package/dist/cjs/src/btcturk.js +11 -0
  16. package/dist/cjs/src/bybit.js +96 -43
  17. package/dist/cjs/src/coinbase.js +228 -38
  18. package/dist/cjs/src/coincheck.js +11 -0
  19. package/dist/cjs/src/coinmate.js +114 -1
  20. package/dist/cjs/src/coinspot.js +7 -0
  21. package/dist/cjs/src/cryptocom.js +2 -2
  22. package/dist/cjs/src/deribit.js +1 -1
  23. package/dist/cjs/src/hitbtc.js +2 -0
  24. package/dist/cjs/src/idex.js +60 -1
  25. package/dist/cjs/src/latoken.js +3 -0
  26. package/dist/cjs/src/mercado.js +3 -0
  27. package/dist/cjs/src/oceanex.js +3 -0
  28. package/dist/cjs/src/okx.js +1 -0
  29. package/dist/cjs/src/pro/bitget.js +12 -8
  30. package/dist/cjs/src/pro/bitmart.js +11 -11
  31. package/dist/cjs/src/pro/bitmex.js +4 -4
  32. package/dist/cjs/src/pro/cex.js +2 -2
  33. package/dist/cjs/src/pro/gate.js +76 -42
  34. package/dist/cjs/src/pro/gemini.js +4 -3
  35. package/dist/cjs/src/pro/hitbtc.js +1 -0
  36. package/dist/cjs/src/probit.js +3 -3
  37. package/dist/cjs/src/timex.js +65 -0
  38. package/js/ccxt.d.ts +1 -1
  39. package/js/ccxt.js +1 -1
  40. package/js/src/abstract/bequant.d.ts +2 -0
  41. package/js/src/abstract/bitcoincom.d.ts +2 -0
  42. package/js/src/abstract/bithumb.d.ts +5 -0
  43. package/js/src/abstract/coinbase.d.ts +1 -0
  44. package/js/src/abstract/coinmate.d.ts +12 -0
  45. package/js/src/abstract/fmfwio.d.ts +2 -0
  46. package/js/src/abstract/hitbtc.d.ts +2 -0
  47. package/js/src/abstract/hitbtc3.d.ts +2 -0
  48. package/js/src/abstract/okx.d.ts +1 -0
  49. package/js/src/base/Exchange.d.ts +12 -6
  50. package/js/src/base/Exchange.js +48 -0
  51. package/js/src/base/ws/Cache.d.ts +5 -1
  52. package/js/src/base/ws/Cache.js +13 -5
  53. package/js/src/base/ws/OrderBook.d.ts +5 -1
  54. package/js/src/base/ws/OrderBook.js +3 -3
  55. package/js/src/binance.d.ts +2 -1
  56. package/js/src/binance.js +407 -21
  57. package/js/src/bingx.d.ts +2 -1
  58. package/js/src/bingx.js +43 -5
  59. package/js/src/bitfinex2.js +1 -0
  60. package/js/src/bithumb.js +5 -0
  61. package/js/src/bitstamp.js +1 -1
  62. package/js/src/btcturk.js +11 -0
  63. package/js/src/bybit.d.ts +4 -1
  64. package/js/src/bybit.js +96 -43
  65. package/js/src/coinbase.d.ts +10 -4
  66. package/js/src/coinbase.js +228 -38
  67. package/js/src/coincheck.js +11 -0
  68. package/js/src/coinmate.d.ts +3 -1
  69. package/js/src/coinmate.js +114 -1
  70. package/js/src/coinspot.js +7 -0
  71. package/js/src/cryptocom.js +2 -2
  72. package/js/src/deribit.js +1 -1
  73. package/js/src/hitbtc.js +2 -0
  74. package/js/src/idex.d.ts +14 -0
  75. package/js/src/idex.js +60 -1
  76. package/js/src/latoken.js +3 -0
  77. package/js/src/mercado.js +3 -0
  78. package/js/src/oceanex.js +3 -0
  79. package/js/src/okx.js +1 -0
  80. package/js/src/pro/bitget.js +12 -8
  81. package/js/src/pro/bitmart.js +11 -11
  82. package/js/src/pro/bitmex.js +4 -4
  83. package/js/src/pro/cex.js +2 -2
  84. package/js/src/pro/gate.d.ts +4 -0
  85. package/js/src/pro/gate.js +76 -42
  86. package/js/src/pro/gemini.js +4 -3
  87. package/js/src/pro/hitbtc.js +1 -0
  88. package/js/src/probit.js +3 -3
  89. package/js/src/timex.d.ts +14 -0
  90. package/js/src/timex.js +65 -0
  91. package/package.json +1 -1
  92. package/skip-tests.json +4 -0
@@ -65,6 +65,9 @@ export default class coinbase extends Exchange {
65
65
  'fetchCrossBorrowRate': false,
66
66
  'fetchCrossBorrowRates': false,
67
67
  'fetchCurrencies': true,
68
+ 'fetchDepositAddress': 'emulated',
69
+ 'fetchDepositAddresses': false,
70
+ 'fetchDepositAddressesByNetwork': true,
68
71
  'fetchDeposits': true,
69
72
  'fetchFundingHistory': false,
70
73
  'fetchFundingRate': false,
@@ -132,6 +135,7 @@ export default class coinbase extends Exchange {
132
135
  'public': {
133
136
  'get': [
134
137
  'currencies',
138
+ 'currencies/crypto',
135
139
  'time',
136
140
  'exchange-rates',
137
141
  'users/{user_id}',
@@ -326,6 +330,10 @@ export default class coinbase extends Exchange {
326
330
  'ACCOUNT_TYPE_CRYPTO',
327
331
  'ACCOUNT_TYPE_FIAT',
328
332
  ],
333
+ 'networks': {
334
+ 'ERC20': 'ethereum',
335
+ 'XLM': 'stellar',
336
+ },
329
337
  'createMarketBuyOrderRequiresPrice': true,
330
338
  'advanced': true,
331
339
  'fetchMarkets': 'fetchMarketsV3',
@@ -681,10 +689,10 @@ export default class coinbase extends Exchange {
681
689
  return this.parseTrades(buys['data'], undefined, since, limit);
682
690
  }
683
691
  async fetchTransactionsWithMethod(method, code = undefined, since = undefined, limit = undefined, params = {}) {
684
- const request = await this.prepareAccountRequestWithCurrencyCode(code, limit, params);
692
+ let request = undefined;
693
+ [request, params] = await this.prepareAccountRequestWithCurrencyCode(code, limit, params);
685
694
  await this.loadMarkets();
686
- const query = this.omit(params, ['account_id', 'accountId']);
687
- const response = await this[method](this.extend(request, query));
695
+ const response = await this[method](this.extend(request, params));
688
696
  return this.parseTransactions(response['data'], undefined, since, limit);
689
697
  }
690
698
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -1236,15 +1244,45 @@ export default class coinbase extends Exchange {
1236
1244
  const expires = this.safeInteger(options, 'expires', 1000);
1237
1245
  const now = this.milliseconds();
1238
1246
  if ((timestamp === undefined) || ((now - timestamp) > expires)) {
1239
- const currencies = await this.v2PublicGetCurrencies(params);
1247
+ const promises = [
1248
+ this.v2PublicGetCurrencies(params),
1249
+ this.v2PublicGetCurrenciesCrypto(params),
1250
+ ];
1251
+ const promisesResult = await Promise.all(promises);
1252
+ const fiatResponse = this.safeDict(promisesResult, 0, {});
1253
+ //
1254
+ // [
1255
+ // "data": {
1256
+ // id: 'IMP',
1257
+ // name: 'Isle of Man Pound',
1258
+ // min_size: '0.01'
1259
+ // },
1260
+ // ...
1261
+ // ]
1262
+ //
1263
+ const cryptoResponse = this.safeDict(promisesResult, 1, {});
1264
+ //
1265
+ // {
1266
+ // asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
1267
+ // code: 'AERO',
1268
+ // name: 'Aerodrome Finance',
1269
+ // color: '#0433FF',
1270
+ // sort_index: '340',
1271
+ // exponent: '8',
1272
+ // type: 'crypto',
1273
+ // address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
1274
+ // }
1275
+ //
1276
+ const fiatData = this.safeList(fiatResponse, 'data', []);
1277
+ const cryptoData = this.safeList(cryptoResponse, 'data', []);
1240
1278
  const exchangeRates = await this.v2PublicGetExchangeRates(params);
1241
1279
  this.options['fetchCurrencies'] = this.extend(options, {
1242
- 'currencies': currencies,
1280
+ 'currencies': this.arrayConcat(fiatData, cryptoData),
1243
1281
  'exchangeRates': exchangeRates,
1244
1282
  'timestamp': now,
1245
1283
  });
1246
1284
  }
1247
- return this.safeValue(this.options, 'fetchCurrencies', {});
1285
+ return this.safeDict(this.options, 'fetchCurrencies', {});
1248
1286
  }
1249
1287
  async fetchCurrencies(params = {}) {
1250
1288
  /**
@@ -1259,18 +1297,27 @@ export default class coinbase extends Exchange {
1259
1297
  const response = await this.fetchCurrenciesFromCache(params);
1260
1298
  const currencies = this.safeValue(response, 'currencies', {});
1261
1299
  //
1262
- // {
1263
- // "data":[
1264
- // {"id":"AED","name":"United Arab Emirates Dirham","min_size":"0.01000000"},
1265
- // {"id":"AFN","name":"Afghan Afghani","min_size":"0.01000000"},
1266
- // {"id":"ALL","name":"Albanian Lek","min_size":"0.01000000"},
1267
- // {"id":"AMD","name":"Armenian Dram","min_size":"0.01000000"},
1268
- // {"id":"ANG","name":"Netherlands Antillean Gulden","min_size":"0.01000000"},
1269
- // ...
1270
- // ],
1271
- // }
1300
+ // fiat
1301
+ //
1302
+ // {
1303
+ // id: 'IMP',
1304
+ // name: 'Isle of Man Pound',
1305
+ // min_size: '0.01'
1306
+ // },
1307
+ //
1308
+ // crypto
1309
+ //
1310
+ // {
1311
+ // asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
1312
+ // code: 'AERO',
1313
+ // name: 'Aerodrome Finance',
1314
+ // color: '#0433FF',
1315
+ // sort_index: '340',
1316
+ // exponent: '8',
1317
+ // type: 'crypto',
1318
+ // address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
1319
+ // }
1272
1320
  //
1273
- const exchangeRates = this.safeValue(response, 'exchangeRates', {});
1274
1321
  //
1275
1322
  // {
1276
1323
  // "data":{
@@ -1286,24 +1333,23 @@ export default class coinbase extends Exchange {
1286
1333
  // }
1287
1334
  // }
1288
1335
  //
1289
- const data = this.safeValue(currencies, 'data', []);
1290
- const dataById = this.indexBy(data, 'id');
1291
- const rates = this.safeValue(this.safeValue(exchangeRates, 'data', {}), 'rates', {});
1292
- const keys = Object.keys(rates);
1293
1336
  const result = {};
1294
- for (let i = 0; i < keys.length; i++) {
1295
- const key = keys[i];
1296
- const type = (key in dataById) ? 'fiat' : 'crypto';
1297
- const currency = this.safeValue(dataById, key, {});
1298
- const id = this.safeString(currency, 'id', key);
1299
- const name = this.safeString(currency, 'name');
1337
+ const networks = {};
1338
+ const networksById = {};
1339
+ for (let i = 0; i < currencies.length; i++) {
1340
+ const currency = currencies[i];
1341
+ const assetId = this.safeString(currency, 'asset_id');
1342
+ const id = this.safeString2(currency, 'id', 'code');
1300
1343
  const code = this.safeCurrencyCode(id);
1344
+ const name = this.safeString(currency, 'name');
1345
+ this.options['networks'][code] = name.toLowerCase();
1346
+ this.options['networksById'][code] = name.toLowerCase();
1301
1347
  result[code] = {
1348
+ 'info': currency,
1302
1349
  'id': id,
1303
1350
  'code': code,
1304
- 'info': currency,
1305
- 'type': type,
1306
- 'name': name,
1351
+ 'type': (assetId !== undefined) ? 'crypto' : 'fiat',
1352
+ 'name': this.safeString(currency, 'name'),
1307
1353
  'active': true,
1308
1354
  'deposit': undefined,
1309
1355
  'withdraw': undefined,
@@ -1320,7 +1366,14 @@ export default class coinbase extends Exchange {
1320
1366
  },
1321
1367
  },
1322
1368
  };
1369
+ if (assetId !== undefined) {
1370
+ const lowerCaseName = name.toLowerCase();
1371
+ networks[code] = lowerCaseName;
1372
+ networksById[lowerCaseName] = code;
1373
+ }
1323
1374
  }
1375
+ this.options['networks'] = this.extend(networks, this.options['networks']);
1376
+ this.options['networksById'] = this.extend(networksById, this.options['networksById']);
1324
1377
  return result;
1325
1378
  }
1326
1379
  async fetchTickers(symbols = undefined, params = {}) {
@@ -1692,17 +1745,18 @@ export default class coinbase extends Exchange {
1692
1745
  * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
1693
1746
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1694
1747
  * @param {boolean} [params.v3] default false, set true to use v3 api endpoint
1748
+ * @param {object} [params.type] "spot" (default) or "swap"
1695
1749
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1696
1750
  */
1697
1751
  await this.loadMarkets();
1698
- const request = {
1699
- 'limit': 250,
1700
- };
1752
+ const request = {};
1701
1753
  let response = undefined;
1702
1754
  const isV3 = this.safeBool(params, 'v3', false);
1703
- params = this.omit(params, 'v3');
1755
+ const type = this.safeString(params, 'type');
1756
+ params = this.omit(params, ['v3', 'type']);
1704
1757
  const method = this.safeString(this.options, 'fetchBalance', 'v3PrivateGetBrokerageAccounts');
1705
1758
  if ((isV3) || (method === 'v3PrivateGetBrokerageAccounts')) {
1759
+ request['limit'] = 250;
1706
1760
  response = await this.v3PrivateGetBrokerageAccounts(this.extend(request, params));
1707
1761
  }
1708
1762
  else {
@@ -1779,6 +1833,7 @@ export default class coinbase extends Exchange {
1779
1833
  // "size": 9
1780
1834
  // }
1781
1835
  //
1836
+ params['type'] = type;
1782
1837
  return this.parseCustomBalance(response, params);
1783
1838
  }
1784
1839
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -1798,12 +1853,12 @@ export default class coinbase extends Exchange {
1798
1853
  if (code !== undefined) {
1799
1854
  currency = this.currency(code);
1800
1855
  }
1801
- const request = await this.prepareAccountRequestWithCurrencyCode(code, limit, params);
1802
- const query = this.omit(params, ['account_id', 'accountId']);
1856
+ let request = undefined;
1857
+ [request, params] = await this.prepareAccountRequestWithCurrencyCode(code, limit, params);
1803
1858
  // for pagination use parameter 'starting_after'
1804
1859
  // the value for the next page can be obtained from the result of the previous call in the 'pagination' field
1805
1860
  // eg: instance.last_json_response.pagination.next_starting_after
1806
- const response = await this.v2PrivateGetAccountsAccountIdTransactions(this.extend(request, query));
1861
+ const response = await this.v2PrivateGetAccountsAccountIdTransactions(this.extend(request, params));
1807
1862
  return this.parseLedger(response['data'], currency, since, limit);
1808
1863
  }
1809
1864
  parseLedgerEntryStatus(status) {
@@ -2161,6 +2216,7 @@ export default class coinbase extends Exchange {
2161
2216
  }
2162
2217
  async prepareAccountRequestWithCurrencyCode(code = undefined, limit = undefined, params = {}) {
2163
2218
  let accountId = this.safeString2(params, 'account_id', 'accountId');
2219
+ params = this.omit(params, ['account_id', 'accountId']);
2164
2220
  if (accountId === undefined) {
2165
2221
  if (code === undefined) {
2166
2222
  throw new ArgumentsRequired(this.id + ' prepareAccountRequestWithCurrencyCode() method requires an account_id (or accountId) parameter OR a currency code argument');
@@ -2176,7 +2232,7 @@ export default class coinbase extends Exchange {
2176
2232
  if (limit !== undefined) {
2177
2233
  request['limit'] = limit;
2178
2234
  }
2179
- return request;
2235
+ return [request, params];
2180
2236
  }
2181
2237
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
2182
2238
  /**
@@ -3349,6 +3405,140 @@ export default class coinbase extends Exchange {
3349
3405
  const data = this.safeValue(response, 'data', {});
3350
3406
  return this.parseTransaction(data, currency);
3351
3407
  }
3408
+ async fetchDepositAddressesByNetwork(code, params = {}) {
3409
+ /**
3410
+ * @method
3411
+ * @name coinbase#fetchDepositAddress
3412
+ * @description fetch the deposit address for a currency associated with this account
3413
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
3414
+ * @param {string} code unified currency code
3415
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3416
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
3417
+ */
3418
+ await this.loadMarkets();
3419
+ const currency = this.currency(code);
3420
+ let request = undefined;
3421
+ [request, params] = await this.prepareAccountRequestWithCurrencyCode(currency['code']);
3422
+ const response = await this.v2PrivateGetAccountsAccountIdAddresses(this.extend(request, params));
3423
+ //
3424
+ // {
3425
+ // pagination: {
3426
+ // ending_before: null,
3427
+ // starting_after: null,
3428
+ // previous_ending_before: null,
3429
+ // next_starting_after: null,
3430
+ // limit: '25',
3431
+ // order: 'desc',
3432
+ // previous_uri: null,
3433
+ // next_uri: null
3434
+ // },
3435
+ // data: [
3436
+ // {
3437
+ // id: '64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
3438
+ // address: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk',
3439
+ // address_info: { address: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk' },
3440
+ // name: null,
3441
+ // created_at: '2023-05-29T21:12:12Z',
3442
+ // updated_at: '2023-05-29T21:12:12Z',
3443
+ // network: 'solana',
3444
+ // uri_scheme: 'solana',
3445
+ // resource: 'address',
3446
+ // resource_path: '/v2/accounts/a7b3d387-bfb8-5ce7-b8da-1f507e81cf25/addresses/64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
3447
+ // warnings: [
3448
+ // {
3449
+ // type: 'correct_address_warning',
3450
+ // title: 'This is an ERC20 USDC address.',
3451
+ // details: 'Only send ERC20 USD Coin (USDC) to this address.',
3452
+ // image_url: 'https://www.coinbase.com/assets/addresses/global-receive-warning-a3d91807e61c717e5a38d270965003dcc025ca8a3cea40ec3d7835b7c86087fa.png',
3453
+ // options: [ { text: 'I understand', style: 'primary', id: 'dismiss' } ]
3454
+ // }
3455
+ // ],
3456
+ // qr_code_image_url: 'https://static-assets.coinbase.com/p2p/l2/asset_network_combinations/v5/usdc-solana.png',
3457
+ // address_label: 'USDC address (Solana)',
3458
+ // default_receive: true,
3459
+ // deposit_uri: 'solana:5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk?spl-token=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
3460
+ // callback_url: null,
3461
+ // share_address_copy: {
3462
+ // line1: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk',
3463
+ // line2: 'This address can only receive USDC-SPL from Solana network. Don’t send USDC from other networks, other SPL tokens or NFTs, or it may result in a loss of funds.'
3464
+ // },
3465
+ // receive_subtitle: 'ERC-20',
3466
+ // inline_warning: {
3467
+ // text: 'This address can only receive USDC-SPL from Solana network. Don’t send USDC from other networks, other SPL tokens or NFTs, or it may result in a loss of funds.',
3468
+ // tooltip: {
3469
+ // title: 'USDC (Solana)',
3470
+ // subtitle: 'This address can only receive USDC-SPL from Solana network.'
3471
+ // }
3472
+ // }
3473
+ // },
3474
+ // ...
3475
+ // ]
3476
+ // }
3477
+ //
3478
+ const data = this.safeList(response, 'data', []);
3479
+ const addressStructures = this.parseDepositAddresses(data, undefined, false);
3480
+ return this.indexBy(addressStructures, 'network');
3481
+ }
3482
+ parseDepositAddress(depositAddress, currency = undefined) {
3483
+ //
3484
+ // {
3485
+ // id: '64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
3486
+ // address: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk',
3487
+ // address_info: {
3488
+ // address: 'GCF74576I7AQ56SLMKBQAP255EGUOWCRVII3S44KEXVNJEOIFVBDMXVL',
3489
+ // destination_tag: '3722061866'
3490
+ // },
3491
+ // name: null,
3492
+ // created_at: '2023-05-29T21:12:12Z',
3493
+ // updated_at: '2023-05-29T21:12:12Z',
3494
+ // network: 'solana',
3495
+ // uri_scheme: 'solana',
3496
+ // resource: 'address',
3497
+ // resource_path: '/v2/accounts/a7b3d387-bfb8-5ce7-b8da-1f507e81cf25/addresses/64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
3498
+ // warnings: [
3499
+ // {
3500
+ // type: 'correct_address_warning',
3501
+ // title: 'This is an ERC20 USDC address.',
3502
+ // details: 'Only send ERC20 USD Coin (USDC) to this address.',
3503
+ // image_url: 'https://www.coinbase.com/assets/addresses/global-receive-warning-a3d91807e61c717e5a38d270965003dcc025ca8a3cea40ec3d7835b7c86087fa.png',
3504
+ // options: [ { text: 'I understand', style: 'primary', id: 'dismiss' } ]
3505
+ // }
3506
+ // ],
3507
+ // qr_code_image_url: 'https://static-assets.coinbase.com/p2p/l2/asset_network_combinations/v5/usdc-solana.png',
3508
+ // address_label: 'USDC address (Solana)',
3509
+ // default_receive: true,
3510
+ // deposit_uri: 'solana:5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk?spl-token=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
3511
+ // callback_url: null,
3512
+ // share_address_copy: {
3513
+ // line1: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk',
3514
+ // line2: 'This address can only receive USDC-SPL from Solana network. Don’t send USDC from other networks, other SPL tokens or NFTs, or it may result in a loss of funds.'
3515
+ // },
3516
+ // receive_subtitle: 'ERC-20',
3517
+ // inline_warning: {
3518
+ // text: 'This address can only receive USDC-SPL from Solana network. Don’t send USDC from other networks, other SPL tokens or NFTs, or it may result in a loss of funds.',
3519
+ // tooltip: {
3520
+ // title: 'USDC (Solana)',
3521
+ // subtitle: 'This address can only receive USDC-SPL from Solana network.'
3522
+ // }
3523
+ // }
3524
+ // }
3525
+ //
3526
+ const address = this.safeString(depositAddress, 'address');
3527
+ this.checkAddress(address);
3528
+ const networkId = this.safeString(depositAddress, 'network');
3529
+ const code = this.safeCurrencyCode(undefined, currency);
3530
+ const addressLabel = this.safeString(depositAddress, 'address_label');
3531
+ const splitAddressLabel = addressLabel.split(' ');
3532
+ const marketId = this.safeString(splitAddressLabel, 0);
3533
+ const addressInfo = this.safeDict(depositAddress, 'address_info');
3534
+ return {
3535
+ 'info': depositAddress,
3536
+ 'currency': this.safeCurrencyCode(marketId, currency),
3537
+ 'address': address,
3538
+ 'tag': this.safeString(addressInfo, 'destination_tag'),
3539
+ 'network': this.networkIdToCode(networkId, code),
3540
+ };
3541
+ }
3352
3542
  sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
3353
3543
  const version = api[0];
3354
3544
  const signed = api[1] === 'private';
@@ -192,6 +192,7 @@ export default class coincheck extends Exchange {
192
192
  * @method
193
193
  * @name coincheck#fetchBalance
194
194
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
195
+ * @see https://coincheck.com/documents/exchange/api#order-transactions-pagination
195
196
  * @param {object} [params] extra parameters specific to the exchange API endpoint
196
197
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
197
198
  */
@@ -204,6 +205,7 @@ export default class coincheck extends Exchange {
204
205
  * @method
205
206
  * @name coincheck#fetchOpenOrders
206
207
  * @description fetch all unfilled currently open orders
208
+ * @see https://coincheck.com/documents/exchange/api#order-opens
207
209
  * @param {string} symbol unified market symbol
208
210
  * @param {int} [since] the earliest time in ms to fetch open orders for
209
211
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -279,6 +281,7 @@ export default class coincheck extends Exchange {
279
281
  * @method
280
282
  * @name coincheck#fetchOrderBook
281
283
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
284
+ * @see https://coincheck.com/documents/exchange/api#order-book
282
285
  * @param {string} symbol unified symbol of the market to fetch the order book for
283
286
  * @param {int} [limit] the maximum amount of order book entries to return
284
287
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -335,6 +338,7 @@ export default class coincheck extends Exchange {
335
338
  * @method
336
339
  * @name coincheck#fetchTicker
337
340
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
341
+ * @see https://coincheck.com/documents/exchange/api#ticker
338
342
  * @param {string} symbol unified symbol of the market to fetch the ticker for
339
343
  * @param {object} [params] extra parameters specific to the exchange API endpoint
340
344
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -448,6 +452,7 @@ export default class coincheck extends Exchange {
448
452
  * @method
449
453
  * @name coincheck#fetchMyTrades
450
454
  * @description fetch all trades made by the user
455
+ * @see https://coincheck.com/documents/exchange/api#order-transactions-pagination
451
456
  * @param {string} symbol unified market symbol
452
457
  * @param {int} [since] the earliest time in ms to fetch trades for
453
458
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -491,6 +496,7 @@ export default class coincheck extends Exchange {
491
496
  * @method
492
497
  * @name coincheck#fetchTrades
493
498
  * @description get the list of most recent trades for a particular symbol
499
+ * @see https://coincheck.com/documents/exchange/api#public-trades
494
500
  * @param {string} symbol unified symbol of the market to fetch trades for
495
501
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
496
502
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -524,6 +530,7 @@ export default class coincheck extends Exchange {
524
530
  * @method
525
531
  * @name coincheck#fetchTradingFees
526
532
  * @description fetch the trading fees for multiple markets
533
+ * @see https://coincheck.com/documents/exchange/api#account-info
527
534
  * @param {object} [params] extra parameters specific to the exchange API endpoint
528
535
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
529
536
  */
@@ -570,6 +577,7 @@ export default class coincheck extends Exchange {
570
577
  * @method
571
578
  * @name coincheck#createOrder
572
579
  * @description create a trade order
580
+ * @see https://coincheck.com/documents/exchange/api#order-new
573
581
  * @param {string} symbol unified symbol of the market to create an order in
574
582
  * @param {string} type 'market' or 'limit'
575
583
  * @param {string} side 'buy' or 'sell'
@@ -606,6 +614,7 @@ export default class coincheck extends Exchange {
606
614
  * @method
607
615
  * @name coincheck#cancelOrder
608
616
  * @description cancels an open order
617
+ * @see https://coincheck.com/documents/exchange/api#order-cancel
609
618
  * @param {string} id order id
610
619
  * @param {string} symbol not used by coincheck cancelOrder ()
611
620
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -621,6 +630,7 @@ export default class coincheck extends Exchange {
621
630
  * @method
622
631
  * @name coincheck#fetchDeposits
623
632
  * @description fetch all deposits made to an account
633
+ * @see https://coincheck.com/documents/exchange/api#account-deposits
624
634
  * @param {string} code unified currency code
625
635
  * @param {int} [since] the earliest time in ms to fetch deposits for
626
636
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -669,6 +679,7 @@ export default class coincheck extends Exchange {
669
679
  * @method
670
680
  * @name coincheck#fetchWithdrawals
671
681
  * @description fetch all withdrawals made from an account
682
+ * @see https://coincheck.com/documents/exchange/api#withdraws
672
683
  * @param {string} code unified currency code
673
684
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
674
685
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/coinmate.js';
2
- import type { Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction } from './base/types.js';
2
+ import type { Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class coinmate
5
5
  * @augments Exchange
@@ -11,6 +11,8 @@ export default class coinmate extends Exchange {
11
11
  fetchBalance(params?: {}): Promise<Balances>;
12
12
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
13
13
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
14
+ fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
15
+ parseTicker(ticker: any, market?: Market): Ticker;
14
16
  fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
15
17
  parseTransactionStatus(status: any): string;
16
18
  parseTransaction(transaction: any, currency?: Currency): Transaction;