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
@@ -62,6 +62,9 @@ class coinbase extends coinbase$1 {
62
62
  'fetchCrossBorrowRate': false,
63
63
  'fetchCrossBorrowRates': false,
64
64
  'fetchCurrencies': true,
65
+ 'fetchDepositAddress': 'emulated',
66
+ 'fetchDepositAddresses': false,
67
+ 'fetchDepositAddressesByNetwork': true,
65
68
  'fetchDeposits': true,
66
69
  'fetchFundingHistory': false,
67
70
  'fetchFundingRate': false,
@@ -129,6 +132,7 @@ class coinbase extends coinbase$1 {
129
132
  'public': {
130
133
  'get': [
131
134
  'currencies',
135
+ 'currencies/crypto',
132
136
  'time',
133
137
  'exchange-rates',
134
138
  'users/{user_id}',
@@ -323,6 +327,10 @@ class coinbase extends coinbase$1 {
323
327
  'ACCOUNT_TYPE_CRYPTO',
324
328
  'ACCOUNT_TYPE_FIAT',
325
329
  ],
330
+ 'networks': {
331
+ 'ERC20': 'ethereum',
332
+ 'XLM': 'stellar',
333
+ },
326
334
  'createMarketBuyOrderRequiresPrice': true,
327
335
  'advanced': true,
328
336
  'fetchMarkets': 'fetchMarketsV3',
@@ -678,10 +686,10 @@ class coinbase extends coinbase$1 {
678
686
  return this.parseTrades(buys['data'], undefined, since, limit);
679
687
  }
680
688
  async fetchTransactionsWithMethod(method, code = undefined, since = undefined, limit = undefined, params = {}) {
681
- const request = await this.prepareAccountRequestWithCurrencyCode(code, limit, params);
689
+ let request = undefined;
690
+ [request, params] = await this.prepareAccountRequestWithCurrencyCode(code, limit, params);
682
691
  await this.loadMarkets();
683
- const query = this.omit(params, ['account_id', 'accountId']);
684
- const response = await this[method](this.extend(request, query));
692
+ const response = await this[method](this.extend(request, params));
685
693
  return this.parseTransactions(response['data'], undefined, since, limit);
686
694
  }
687
695
  async fetchWithdrawals(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -1233,15 +1241,45 @@ class coinbase extends coinbase$1 {
1233
1241
  const expires = this.safeInteger(options, 'expires', 1000);
1234
1242
  const now = this.milliseconds();
1235
1243
  if ((timestamp === undefined) || ((now - timestamp) > expires)) {
1236
- const currencies = await this.v2PublicGetCurrencies(params);
1244
+ const promises = [
1245
+ this.v2PublicGetCurrencies(params),
1246
+ this.v2PublicGetCurrenciesCrypto(params),
1247
+ ];
1248
+ const promisesResult = await Promise.all(promises);
1249
+ const fiatResponse = this.safeDict(promisesResult, 0, {});
1250
+ //
1251
+ // [
1252
+ // "data": {
1253
+ // id: 'IMP',
1254
+ // name: 'Isle of Man Pound',
1255
+ // min_size: '0.01'
1256
+ // },
1257
+ // ...
1258
+ // ]
1259
+ //
1260
+ const cryptoResponse = this.safeDict(promisesResult, 1, {});
1261
+ //
1262
+ // {
1263
+ // asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
1264
+ // code: 'AERO',
1265
+ // name: 'Aerodrome Finance',
1266
+ // color: '#0433FF',
1267
+ // sort_index: '340',
1268
+ // exponent: '8',
1269
+ // type: 'crypto',
1270
+ // address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
1271
+ // }
1272
+ //
1273
+ const fiatData = this.safeList(fiatResponse, 'data', []);
1274
+ const cryptoData = this.safeList(cryptoResponse, 'data', []);
1237
1275
  const exchangeRates = await this.v2PublicGetExchangeRates(params);
1238
1276
  this.options['fetchCurrencies'] = this.extend(options, {
1239
- 'currencies': currencies,
1277
+ 'currencies': this.arrayConcat(fiatData, cryptoData),
1240
1278
  'exchangeRates': exchangeRates,
1241
1279
  'timestamp': now,
1242
1280
  });
1243
1281
  }
1244
- return this.safeValue(this.options, 'fetchCurrencies', {});
1282
+ return this.safeDict(this.options, 'fetchCurrencies', {});
1245
1283
  }
1246
1284
  async fetchCurrencies(params = {}) {
1247
1285
  /**
@@ -1256,18 +1294,27 @@ class coinbase extends coinbase$1 {
1256
1294
  const response = await this.fetchCurrenciesFromCache(params);
1257
1295
  const currencies = this.safeValue(response, 'currencies', {});
1258
1296
  //
1259
- // {
1260
- // "data":[
1261
- // {"id":"AED","name":"United Arab Emirates Dirham","min_size":"0.01000000"},
1262
- // {"id":"AFN","name":"Afghan Afghani","min_size":"0.01000000"},
1263
- // {"id":"ALL","name":"Albanian Lek","min_size":"0.01000000"},
1264
- // {"id":"AMD","name":"Armenian Dram","min_size":"0.01000000"},
1265
- // {"id":"ANG","name":"Netherlands Antillean Gulden","min_size":"0.01000000"},
1266
- // ...
1267
- // ],
1268
- // }
1297
+ // fiat
1298
+ //
1299
+ // {
1300
+ // id: 'IMP',
1301
+ // name: 'Isle of Man Pound',
1302
+ // min_size: '0.01'
1303
+ // },
1304
+ //
1305
+ // crypto
1306
+ //
1307
+ // {
1308
+ // asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
1309
+ // code: 'AERO',
1310
+ // name: 'Aerodrome Finance',
1311
+ // color: '#0433FF',
1312
+ // sort_index: '340',
1313
+ // exponent: '8',
1314
+ // type: 'crypto',
1315
+ // address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
1316
+ // }
1269
1317
  //
1270
- const exchangeRates = this.safeValue(response, 'exchangeRates', {});
1271
1318
  //
1272
1319
  // {
1273
1320
  // "data":{
@@ -1283,24 +1330,23 @@ class coinbase extends coinbase$1 {
1283
1330
  // }
1284
1331
  // }
1285
1332
  //
1286
- const data = this.safeValue(currencies, 'data', []);
1287
- const dataById = this.indexBy(data, 'id');
1288
- const rates = this.safeValue(this.safeValue(exchangeRates, 'data', {}), 'rates', {});
1289
- const keys = Object.keys(rates);
1290
1333
  const result = {};
1291
- for (let i = 0; i < keys.length; i++) {
1292
- const key = keys[i];
1293
- const type = (key in dataById) ? 'fiat' : 'crypto';
1294
- const currency = this.safeValue(dataById, key, {});
1295
- const id = this.safeString(currency, 'id', key);
1296
- const name = this.safeString(currency, 'name');
1334
+ const networks = {};
1335
+ const networksById = {};
1336
+ for (let i = 0; i < currencies.length; i++) {
1337
+ const currency = currencies[i];
1338
+ const assetId = this.safeString(currency, 'asset_id');
1339
+ const id = this.safeString2(currency, 'id', 'code');
1297
1340
  const code = this.safeCurrencyCode(id);
1341
+ const name = this.safeString(currency, 'name');
1342
+ this.options['networks'][code] = name.toLowerCase();
1343
+ this.options['networksById'][code] = name.toLowerCase();
1298
1344
  result[code] = {
1345
+ 'info': currency,
1299
1346
  'id': id,
1300
1347
  'code': code,
1301
- 'info': currency,
1302
- 'type': type,
1303
- 'name': name,
1348
+ 'type': (assetId !== undefined) ? 'crypto' : 'fiat',
1349
+ 'name': this.safeString(currency, 'name'),
1304
1350
  'active': true,
1305
1351
  'deposit': undefined,
1306
1352
  'withdraw': undefined,
@@ -1317,7 +1363,14 @@ class coinbase extends coinbase$1 {
1317
1363
  },
1318
1364
  },
1319
1365
  };
1366
+ if (assetId !== undefined) {
1367
+ const lowerCaseName = name.toLowerCase();
1368
+ networks[code] = lowerCaseName;
1369
+ networksById[lowerCaseName] = code;
1370
+ }
1320
1371
  }
1372
+ this.options['networks'] = this.extend(networks, this.options['networks']);
1373
+ this.options['networksById'] = this.extend(networksById, this.options['networksById']);
1321
1374
  return result;
1322
1375
  }
1323
1376
  async fetchTickers(symbols = undefined, params = {}) {
@@ -1689,17 +1742,18 @@ class coinbase extends coinbase$1 {
1689
1742
  * @see https://docs.cloud.coinbase.com/sign-in-with-coinbase/docs/api-accounts#list-accounts
1690
1743
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1691
1744
  * @param {boolean} [params.v3] default false, set true to use v3 api endpoint
1745
+ * @param {object} [params.type] "spot" (default) or "swap"
1692
1746
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1693
1747
  */
1694
1748
  await this.loadMarkets();
1695
- const request = {
1696
- 'limit': 250,
1697
- };
1749
+ const request = {};
1698
1750
  let response = undefined;
1699
1751
  const isV3 = this.safeBool(params, 'v3', false);
1700
- params = this.omit(params, 'v3');
1752
+ const type = this.safeString(params, 'type');
1753
+ params = this.omit(params, ['v3', 'type']);
1701
1754
  const method = this.safeString(this.options, 'fetchBalance', 'v3PrivateGetBrokerageAccounts');
1702
1755
  if ((isV3) || (method === 'v3PrivateGetBrokerageAccounts')) {
1756
+ request['limit'] = 250;
1703
1757
  response = await this.v3PrivateGetBrokerageAccounts(this.extend(request, params));
1704
1758
  }
1705
1759
  else {
@@ -1776,6 +1830,7 @@ class coinbase extends coinbase$1 {
1776
1830
  // "size": 9
1777
1831
  // }
1778
1832
  //
1833
+ params['type'] = type;
1779
1834
  return this.parseCustomBalance(response, params);
1780
1835
  }
1781
1836
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -1795,12 +1850,12 @@ class coinbase extends coinbase$1 {
1795
1850
  if (code !== undefined) {
1796
1851
  currency = this.currency(code);
1797
1852
  }
1798
- const request = await this.prepareAccountRequestWithCurrencyCode(code, limit, params);
1799
- const query = this.omit(params, ['account_id', 'accountId']);
1853
+ let request = undefined;
1854
+ [request, params] = await this.prepareAccountRequestWithCurrencyCode(code, limit, params);
1800
1855
  // for pagination use parameter 'starting_after'
1801
1856
  // the value for the next page can be obtained from the result of the previous call in the 'pagination' field
1802
1857
  // eg: instance.last_json_response.pagination.next_starting_after
1803
- const response = await this.v2PrivateGetAccountsAccountIdTransactions(this.extend(request, query));
1858
+ const response = await this.v2PrivateGetAccountsAccountIdTransactions(this.extend(request, params));
1804
1859
  return this.parseLedger(response['data'], currency, since, limit);
1805
1860
  }
1806
1861
  parseLedgerEntryStatus(status) {
@@ -2158,6 +2213,7 @@ class coinbase extends coinbase$1 {
2158
2213
  }
2159
2214
  async prepareAccountRequestWithCurrencyCode(code = undefined, limit = undefined, params = {}) {
2160
2215
  let accountId = this.safeString2(params, 'account_id', 'accountId');
2216
+ params = this.omit(params, ['account_id', 'accountId']);
2161
2217
  if (accountId === undefined) {
2162
2218
  if (code === undefined) {
2163
2219
  throw new errors.ArgumentsRequired(this.id + ' prepareAccountRequestWithCurrencyCode() method requires an account_id (or accountId) parameter OR a currency code argument');
@@ -2173,7 +2229,7 @@ class coinbase extends coinbase$1 {
2173
2229
  if (limit !== undefined) {
2174
2230
  request['limit'] = limit;
2175
2231
  }
2176
- return request;
2232
+ return [request, params];
2177
2233
  }
2178
2234
  async createMarketBuyOrderWithCost(symbol, cost, params = {}) {
2179
2235
  /**
@@ -3346,6 +3402,140 @@ class coinbase extends coinbase$1 {
3346
3402
  const data = this.safeValue(response, 'data', {});
3347
3403
  return this.parseTransaction(data, currency);
3348
3404
  }
3405
+ async fetchDepositAddressesByNetwork(code, params = {}) {
3406
+ /**
3407
+ * @method
3408
+ * @name coinbase#fetchDepositAddress
3409
+ * @description fetch the deposit address for a currency associated with this account
3410
+ * @see https://docs.cloud.coinbase.com/exchange/reference/exchangerestapi_postcoinbaseaccountaddresses
3411
+ * @param {string} code unified currency code
3412
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
3413
+ * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
3414
+ */
3415
+ await this.loadMarkets();
3416
+ const currency = this.currency(code);
3417
+ let request = undefined;
3418
+ [request, params] = await this.prepareAccountRequestWithCurrencyCode(currency['code']);
3419
+ const response = await this.v2PrivateGetAccountsAccountIdAddresses(this.extend(request, params));
3420
+ //
3421
+ // {
3422
+ // pagination: {
3423
+ // ending_before: null,
3424
+ // starting_after: null,
3425
+ // previous_ending_before: null,
3426
+ // next_starting_after: null,
3427
+ // limit: '25',
3428
+ // order: 'desc',
3429
+ // previous_uri: null,
3430
+ // next_uri: null
3431
+ // },
3432
+ // data: [
3433
+ // {
3434
+ // id: '64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
3435
+ // address: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk',
3436
+ // address_info: { address: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk' },
3437
+ // name: null,
3438
+ // created_at: '2023-05-29T21:12:12Z',
3439
+ // updated_at: '2023-05-29T21:12:12Z',
3440
+ // network: 'solana',
3441
+ // uri_scheme: 'solana',
3442
+ // resource: 'address',
3443
+ // resource_path: '/v2/accounts/a7b3d387-bfb8-5ce7-b8da-1f507e81cf25/addresses/64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
3444
+ // warnings: [
3445
+ // {
3446
+ // type: 'correct_address_warning',
3447
+ // title: 'This is an ERC20 USDC address.',
3448
+ // details: 'Only send ERC20 USD Coin (USDC) to this address.',
3449
+ // image_url: 'https://www.coinbase.com/assets/addresses/global-receive-warning-a3d91807e61c717e5a38d270965003dcc025ca8a3cea40ec3d7835b7c86087fa.png',
3450
+ // options: [ { text: 'I understand', style: 'primary', id: 'dismiss' } ]
3451
+ // }
3452
+ // ],
3453
+ // qr_code_image_url: 'https://static-assets.coinbase.com/p2p/l2/asset_network_combinations/v5/usdc-solana.png',
3454
+ // address_label: 'USDC address (Solana)',
3455
+ // default_receive: true,
3456
+ // deposit_uri: 'solana:5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk?spl-token=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
3457
+ // callback_url: null,
3458
+ // share_address_copy: {
3459
+ // line1: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk',
3460
+ // 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.'
3461
+ // },
3462
+ // receive_subtitle: 'ERC-20',
3463
+ // inline_warning: {
3464
+ // 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.',
3465
+ // tooltip: {
3466
+ // title: 'USDC (Solana)',
3467
+ // subtitle: 'This address can only receive USDC-SPL from Solana network.'
3468
+ // }
3469
+ // }
3470
+ // },
3471
+ // ...
3472
+ // ]
3473
+ // }
3474
+ //
3475
+ const data = this.safeList(response, 'data', []);
3476
+ const addressStructures = this.parseDepositAddresses(data, undefined, false);
3477
+ return this.indexBy(addressStructures, 'network');
3478
+ }
3479
+ parseDepositAddress(depositAddress, currency = undefined) {
3480
+ //
3481
+ // {
3482
+ // id: '64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
3483
+ // address: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk',
3484
+ // address_info: {
3485
+ // address: 'GCF74576I7AQ56SLMKBQAP255EGUOWCRVII3S44KEXVNJEOIFVBDMXVL',
3486
+ // destination_tag: '3722061866'
3487
+ // },
3488
+ // name: null,
3489
+ // created_at: '2023-05-29T21:12:12Z',
3490
+ // updated_at: '2023-05-29T21:12:12Z',
3491
+ // network: 'solana',
3492
+ // uri_scheme: 'solana',
3493
+ // resource: 'address',
3494
+ // resource_path: '/v2/accounts/a7b3d387-bfb8-5ce7-b8da-1f507e81cf25/addresses/64ceb5f1-5fa2-5310-a4ff-9fd46271003d',
3495
+ // warnings: [
3496
+ // {
3497
+ // type: 'correct_address_warning',
3498
+ // title: 'This is an ERC20 USDC address.',
3499
+ // details: 'Only send ERC20 USD Coin (USDC) to this address.',
3500
+ // image_url: 'https://www.coinbase.com/assets/addresses/global-receive-warning-a3d91807e61c717e5a38d270965003dcc025ca8a3cea40ec3d7835b7c86087fa.png',
3501
+ // options: [ { text: 'I understand', style: 'primary', id: 'dismiss' } ]
3502
+ // }
3503
+ // ],
3504
+ // qr_code_image_url: 'https://static-assets.coinbase.com/p2p/l2/asset_network_combinations/v5/usdc-solana.png',
3505
+ // address_label: 'USDC address (Solana)',
3506
+ // default_receive: true,
3507
+ // deposit_uri: 'solana:5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk?spl-token=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
3508
+ // callback_url: null,
3509
+ // share_address_copy: {
3510
+ // line1: '5xjPKeAXpnhA2kHyinvdVeui6RXVdEa3B2J3SCAwiKnk',
3511
+ // 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.'
3512
+ // },
3513
+ // receive_subtitle: 'ERC-20',
3514
+ // inline_warning: {
3515
+ // 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.',
3516
+ // tooltip: {
3517
+ // title: 'USDC (Solana)',
3518
+ // subtitle: 'This address can only receive USDC-SPL from Solana network.'
3519
+ // }
3520
+ // }
3521
+ // }
3522
+ //
3523
+ const address = this.safeString(depositAddress, 'address');
3524
+ this.checkAddress(address);
3525
+ const networkId = this.safeString(depositAddress, 'network');
3526
+ const code = this.safeCurrencyCode(undefined, currency);
3527
+ const addressLabel = this.safeString(depositAddress, 'address_label');
3528
+ const splitAddressLabel = addressLabel.split(' ');
3529
+ const marketId = this.safeString(splitAddressLabel, 0);
3530
+ const addressInfo = this.safeDict(depositAddress, 'address_info');
3531
+ return {
3532
+ 'info': depositAddress,
3533
+ 'currency': this.safeCurrencyCode(marketId, currency),
3534
+ 'address': address,
3535
+ 'tag': this.safeString(addressInfo, 'destination_tag'),
3536
+ 'network': this.networkIdToCode(networkId, code),
3537
+ };
3538
+ }
3349
3539
  sign(path, api = [], method = 'GET', params = {}, headers = undefined, body = undefined) {
3350
3540
  const version = api[0];
3351
3541
  const signed = api[1] === 'private';
@@ -189,6 +189,7 @@ class coincheck extends coincheck$1 {
189
189
  * @method
190
190
  * @name coincheck#fetchBalance
191
191
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
192
+ * @see https://coincheck.com/documents/exchange/api#order-transactions-pagination
192
193
  * @param {object} [params] extra parameters specific to the exchange API endpoint
193
194
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
194
195
  */
@@ -201,6 +202,7 @@ class coincheck extends coincheck$1 {
201
202
  * @method
202
203
  * @name coincheck#fetchOpenOrders
203
204
  * @description fetch all unfilled currently open orders
205
+ * @see https://coincheck.com/documents/exchange/api#order-opens
204
206
  * @param {string} symbol unified market symbol
205
207
  * @param {int} [since] the earliest time in ms to fetch open orders for
206
208
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -276,6 +278,7 @@ class coincheck extends coincheck$1 {
276
278
  * @method
277
279
  * @name coincheck#fetchOrderBook
278
280
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
281
+ * @see https://coincheck.com/documents/exchange/api#order-book
279
282
  * @param {string} symbol unified symbol of the market to fetch the order book for
280
283
  * @param {int} [limit] the maximum amount of order book entries to return
281
284
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -332,6 +335,7 @@ class coincheck extends coincheck$1 {
332
335
  * @method
333
336
  * @name coincheck#fetchTicker
334
337
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
338
+ * @see https://coincheck.com/documents/exchange/api#ticker
335
339
  * @param {string} symbol unified symbol of the market to fetch the ticker for
336
340
  * @param {object} [params] extra parameters specific to the exchange API endpoint
337
341
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -445,6 +449,7 @@ class coincheck extends coincheck$1 {
445
449
  * @method
446
450
  * @name coincheck#fetchMyTrades
447
451
  * @description fetch all trades made by the user
452
+ * @see https://coincheck.com/documents/exchange/api#order-transactions-pagination
448
453
  * @param {string} symbol unified market symbol
449
454
  * @param {int} [since] the earliest time in ms to fetch trades for
450
455
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -488,6 +493,7 @@ class coincheck extends coincheck$1 {
488
493
  * @method
489
494
  * @name coincheck#fetchTrades
490
495
  * @description get the list of most recent trades for a particular symbol
496
+ * @see https://coincheck.com/documents/exchange/api#public-trades
491
497
  * @param {string} symbol unified symbol of the market to fetch trades for
492
498
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
493
499
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -521,6 +527,7 @@ class coincheck extends coincheck$1 {
521
527
  * @method
522
528
  * @name coincheck#fetchTradingFees
523
529
  * @description fetch the trading fees for multiple markets
530
+ * @see https://coincheck.com/documents/exchange/api#account-info
524
531
  * @param {object} [params] extra parameters specific to the exchange API endpoint
525
532
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
526
533
  */
@@ -567,6 +574,7 @@ class coincheck extends coincheck$1 {
567
574
  * @method
568
575
  * @name coincheck#createOrder
569
576
  * @description create a trade order
577
+ * @see https://coincheck.com/documents/exchange/api#order-new
570
578
  * @param {string} symbol unified symbol of the market to create an order in
571
579
  * @param {string} type 'market' or 'limit'
572
580
  * @param {string} side 'buy' or 'sell'
@@ -603,6 +611,7 @@ class coincheck extends coincheck$1 {
603
611
  * @method
604
612
  * @name coincheck#cancelOrder
605
613
  * @description cancels an open order
614
+ * @see https://coincheck.com/documents/exchange/api#order-cancel
606
615
  * @param {string} id order id
607
616
  * @param {string} symbol not used by coincheck cancelOrder ()
608
617
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -618,6 +627,7 @@ class coincheck extends coincheck$1 {
618
627
  * @method
619
628
  * @name coincheck#fetchDeposits
620
629
  * @description fetch all deposits made to an account
630
+ * @see https://coincheck.com/documents/exchange/api#account-deposits
621
631
  * @param {string} code unified currency code
622
632
  * @param {int} [since] the earliest time in ms to fetch deposits for
623
633
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -666,6 +676,7 @@ class coincheck extends coincheck$1 {
666
676
  * @method
667
677
  * @name coincheck#fetchWithdrawals
668
678
  * @description fetch all withdrawals made from an account
679
+ * @see https://coincheck.com/documents/exchange/api#withdraws
669
680
  * @param {string} code unified currency code
670
681
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
671
682
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve