ccxt 4.4.91 → 4.4.93

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 (64) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.min.js +2 -2
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ascendex.js +9 -8
  5. package/dist/cjs/src/base/Exchange.js +81 -33
  6. package/dist/cjs/src/binance.js +44 -1
  7. package/dist/cjs/src/bitmart.js +7 -0
  8. package/dist/cjs/src/bitmex.js +4 -4
  9. package/dist/cjs/src/bitvavo.js +10 -1
  10. package/dist/cjs/src/bybit.js +83 -8
  11. package/dist/cjs/src/coinbaseexchange.js +53 -0
  12. package/dist/cjs/src/coincheck.js +47 -4
  13. package/dist/cjs/src/coinex.js +19 -14
  14. package/dist/cjs/src/cryptomus.js +30 -53
  15. package/dist/cjs/src/deribit.js +6 -6
  16. package/dist/cjs/src/exmo.js +72 -59
  17. package/dist/cjs/src/htx.js +1 -1
  18. package/dist/cjs/src/hyperliquid.js +3 -2
  19. package/dist/cjs/src/krakenfutures.js +1 -1
  20. package/dist/cjs/src/kucoin.js +13 -15
  21. package/dist/cjs/src/latoken.js +19 -74
  22. package/dist/cjs/src/lbank.js +118 -34
  23. package/dist/cjs/src/okx.js +158 -2
  24. package/dist/cjs/src/paradex.js +54 -0
  25. package/dist/cjs/src/phemex.js +3 -3
  26. package/dist/cjs/src/pro/bitstamp.js +55 -16
  27. package/dist/cjs/src/pro/bybit.js +6 -7
  28. package/js/ccxt.d.ts +1 -1
  29. package/js/ccxt.js +1 -1
  30. package/js/src/abstract/lbank.d.ts +1 -0
  31. package/js/src/ascendex.js +9 -8
  32. package/js/src/base/Exchange.d.ts +5 -1
  33. package/js/src/base/Exchange.js +81 -33
  34. package/js/src/binance.d.ts +10 -0
  35. package/js/src/binance.js +44 -1
  36. package/js/src/bitmart.d.ts +7 -0
  37. package/js/src/bitmart.js +7 -0
  38. package/js/src/bitmex.d.ts +1 -1
  39. package/js/src/bitmex.js +4 -4
  40. package/js/src/bitvavo.js +10 -1
  41. package/js/src/bybit.d.ts +12 -1
  42. package/js/src/bybit.js +83 -8
  43. package/js/src/coinbaseexchange.js +53 -0
  44. package/js/src/coincheck.js +48 -5
  45. package/js/src/coinex.js +16 -13
  46. package/js/src/cryptomus.js +30 -53
  47. package/js/src/deribit.js +6 -6
  48. package/js/src/exmo.js +72 -59
  49. package/js/src/htx.js +1 -1
  50. package/js/src/hyperliquid.js +3 -2
  51. package/js/src/krakenfutures.js +1 -1
  52. package/js/src/kucoin.js +13 -15
  53. package/js/src/latoken.d.ts +0 -1
  54. package/js/src/latoken.js +19 -74
  55. package/js/src/lbank.d.ts +9 -1
  56. package/js/src/lbank.js +118 -34
  57. package/js/src/okx.d.ts +13 -1
  58. package/js/src/okx.js +158 -2
  59. package/js/src/paradex.d.ts +10 -0
  60. package/js/src/paradex.js +54 -0
  61. package/js/src/phemex.js +3 -3
  62. package/js/src/pro/bitstamp.js +55 -16
  63. package/js/src/pro/bybit.js +7 -8
  64. package/package.json +1 -1
package/js/src/exmo.js CHANGED
@@ -673,8 +673,9 @@ export default class exmo extends Exchange {
673
673
  * @returns {object} an associative dictionary of currencies
674
674
  */
675
675
  async fetchCurrencies(params = {}) {
676
+ const promises = [];
676
677
  //
677
- const currencyList = await this.publicGetCurrencyListExtended(params);
678
+ promises.push(this.publicGetCurrencyListExtended(params));
678
679
  //
679
680
  // [
680
681
  // {"name":"VLX","description":"Velas"},
@@ -683,7 +684,7 @@ export default class exmo extends Exchange {
683
684
  // {"name":"USD","description":"US Dollar"}
684
685
  // ]
685
686
  //
686
- const cryptoList = await this.publicGetPaymentsProvidersCryptoList(params);
687
+ promises.push(this.publicGetPaymentsProvidersCryptoList(params));
687
688
  //
688
689
  // {
689
690
  // "BTC":[
@@ -708,86 +709,98 @@ export default class exmo extends Exchange {
708
709
  // ],
709
710
  // }
710
711
  //
712
+ const responses = await Promise.all(promises);
713
+ const currencyList = responses[0];
714
+ const cryptoList = responses[1];
711
715
  const result = {};
712
716
  for (let i = 0; i < currencyList.length; i++) {
713
717
  const currency = currencyList[i];
714
718
  const currencyId = this.safeString(currency, 'name');
715
- const name = this.safeString(currency, 'description');
716
- const providers = this.safeValue(cryptoList, currencyId);
717
- let active = false;
719
+ const code = this.safeCurrencyCode(currencyId);
718
720
  let type = 'crypto';
719
- const limits = {
720
- 'deposit': {
721
- 'min': undefined,
722
- 'max': undefined,
723
- },
724
- 'withdraw': {
725
- 'min': undefined,
726
- 'max': undefined,
727
- },
728
- };
729
- let fee = undefined;
730
- let depositEnabled = undefined;
731
- let withdrawEnabled = undefined;
721
+ const networks = {};
722
+ const providers = this.safeList(cryptoList, currencyId);
732
723
  if (providers === undefined) {
733
- active = true;
734
724
  type = 'fiat';
735
725
  }
736
726
  else {
737
727
  for (let j = 0; j < providers.length; j++) {
738
728
  const provider = providers[j];
729
+ const name = this.safeString(provider, 'name');
730
+ // get network-id by removing extra things
731
+ let networkId = name.replace(currencyId + ' ', '');
732
+ networkId = networkId.replace('(', '');
733
+ const replaceChar = ')'; // transpiler trick
734
+ networkId = networkId.replace(replaceChar, '');
735
+ const networkCode = this.networkIdToCode(networkId);
736
+ if (!(networkCode in networks)) {
737
+ networks[networkCode] = {
738
+ 'id': networkId,
739
+ 'network': networkCode,
740
+ 'active': undefined,
741
+ 'deposit': undefined,
742
+ 'withdraw': undefined,
743
+ 'fee': undefined,
744
+ 'limits': {
745
+ 'withdraw': {
746
+ 'min': undefined,
747
+ 'max': undefined,
748
+ },
749
+ 'deposit': {
750
+ 'min': undefined,
751
+ 'max': undefined,
752
+ },
753
+ },
754
+ 'info': [], // set as array, because of multiple network sub-entries
755
+ };
756
+ }
739
757
  const typeInner = this.safeString(provider, 'type');
740
758
  const minValue = this.safeString(provider, 'min');
741
- let maxValue = this.safeString(provider, 'max');
742
- if (Precise.stringEq(maxValue, '0.0')) {
743
- maxValue = undefined;
744
- }
745
- const activeProvider = this.safeValue(provider, 'enabled');
759
+ const maxValue = this.safeString(provider, 'max');
760
+ const activeProvider = this.safeBool(provider, 'enabled');
761
+ const networkEntry = networks[networkCode];
746
762
  if (typeInner === 'deposit') {
747
- if (activeProvider && !depositEnabled) {
748
- depositEnabled = true;
749
- }
750
- else if (!activeProvider) {
751
- depositEnabled = false;
752
- }
763
+ networkEntry['deposit'] = activeProvider;
764
+ networkEntry['limits']['deposit']['min'] = minValue;
765
+ networkEntry['limits']['deposit']['max'] = maxValue;
753
766
  }
754
767
  else if (typeInner === 'withdraw') {
755
- if (activeProvider && !withdrawEnabled) {
756
- withdrawEnabled = true;
757
- }
758
- else if (!activeProvider) {
759
- withdrawEnabled = false;
760
- }
761
- }
762
- if (activeProvider) {
763
- active = true;
764
- const limitMin = this.numberToString(limits[typeInner]['min']);
765
- if ((limits[typeInner]['min'] === undefined) || (Precise.stringLt(minValue, limitMin))) {
766
- limits[typeInner]['min'] = minValue;
767
- limits[typeInner]['max'] = maxValue;
768
- if (typeInner === 'withdraw') {
769
- const commissionDesc = this.safeString(provider, 'commission_desc');
770
- fee = this.parseFixedFloatValue(commissionDesc);
771
- }
772
- }
768
+ networkEntry['withdraw'] = activeProvider;
769
+ networkEntry['limits']['withdraw']['min'] = minValue;
770
+ networkEntry['limits']['withdraw']['max'] = maxValue;
773
771
  }
772
+ const info = this.safeList(networkEntry, 'info');
773
+ info.push(provider);
774
+ networkEntry['info'] = info;
775
+ networks[networkCode] = networkEntry;
774
776
  }
775
777
  }
776
- const code = this.safeCurrencyCode(currencyId);
777
- result[code] = {
778
+ result[code] = this.safeCurrencyStructure({
778
779
  'id': currencyId,
779
780
  'code': code,
780
- 'name': name,
781
+ 'name': this.safeString(currency, 'description'),
781
782
  'type': type,
782
- 'active': active,
783
- 'deposit': depositEnabled,
784
- 'withdraw': withdrawEnabled,
785
- 'fee': fee,
783
+ 'active': undefined,
784
+ 'deposit': undefined,
785
+ 'withdraw': undefined,
786
+ 'fee': undefined,
786
787
  'precision': this.parseNumber('1e-8'),
787
- 'limits': limits,
788
- 'info': providers,
789
- 'networks': {},
790
- };
788
+ 'limits': {
789
+ 'withdraw': {
790
+ 'min': undefined,
791
+ 'max': undefined,
792
+ },
793
+ 'deposit': {
794
+ 'min': undefined,
795
+ 'max': undefined,
796
+ },
797
+ },
798
+ 'info': {
799
+ 'currency': currency,
800
+ 'providers': providers,
801
+ },
802
+ 'networks': networks,
803
+ });
791
804
  }
792
805
  return result;
793
806
  }
package/js/src/htx.js CHANGED
@@ -6859,7 +6859,7 @@ export default class htx extends Exchange {
6859
6859
  let fee = this.safeNumber(params, 'fee');
6860
6860
  if (fee === undefined) {
6861
6861
  const currencies = await this.fetchCurrencies();
6862
- this.currencies = this.deepExtend(this.currencies, currencies);
6862
+ this.currencies = this.mapToSafeMap(this.deepExtend(this.currencies, currencies));
6863
6863
  const targetNetwork = this.safeValue(currency['networks'], networkCode, {});
6864
6864
  fee = this.safeNumber(targetNetwork, 'fee');
6865
6865
  if (fee === undefined) {
@@ -48,9 +48,9 @@ export default class hyperliquid extends Exchange {
48
48
  'createMarketBuyOrderWithCost': false,
49
49
  'createMarketOrderWithCost': false,
50
50
  'createMarketSellOrderWithCost': false,
51
- 'createOrderWithTakeProfitAndStopLoss': true,
52
51
  'createOrder': true,
53
52
  'createOrders': true,
53
+ 'createOrderWithTakeProfitAndStopLoss': true,
54
54
  'createReduceOnlyOrder': true,
55
55
  'createStopOrder': true,
56
56
  'createTriggerOrder': true,
@@ -695,7 +695,8 @@ export default class hyperliquid extends Exchange {
695
695
  // }
696
696
  //
697
697
  const quoteId = 'USDC';
698
- const base = this.safeString(market, 'name');
698
+ const baseName = this.safeString(market, 'name');
699
+ const base = this.safeCurrencyCode(baseName);
699
700
  const quote = this.safeCurrencyCode(quoteId);
700
701
  const baseId = this.safeString(market, 'baseId');
701
702
  const settleId = 'USDC';
@@ -534,7 +534,7 @@ export default class krakenfutures extends Exchange {
534
534
  'precision': undefined,
535
535
  });
536
536
  }
537
- this.currencies = this.deepExtend(currencies, this.currencies);
537
+ this.currencies = this.mapToSafeMap(this.deepExtend(currencies, this.currencies));
538
538
  return result;
539
539
  }
540
540
  /**
package/js/src/kucoin.js CHANGED
@@ -1389,36 +1389,32 @@ export default class kucoin extends Exchange {
1389
1389
  // }
1390
1390
  //
1391
1391
  const currenciesData = this.safeList(response, 'data', []);
1392
+ const brokenCurrencies = this.safeList(this.options, 'brokenCurrencies', ['00', 'OPEN_ERROR', 'HUF', 'BDT']);
1393
+ const otherFiats = this.safeList(this.options, 'fiats', ['KWD', 'IRR', 'PKR']);
1392
1394
  const result = {};
1393
1395
  for (let i = 0; i < currenciesData.length; i++) {
1394
1396
  const entry = currenciesData[i];
1395
1397
  const id = this.safeString(entry, 'currency');
1396
- const name = this.safeString(entry, 'fullName');
1398
+ if (this.inArray(id, brokenCurrencies)) {
1399
+ continue; // skip buggy entries: https://t.me/KuCoin_API/217798
1400
+ }
1397
1401
  const code = this.safeCurrencyCode(id);
1398
1402
  const networks = {};
1399
1403
  const chains = this.safeList(entry, 'chains', []);
1400
- const rawPrecision = this.safeString(entry, 'precision');
1401
- const precision = this.parseNumber(this.parsePrecision(rawPrecision));
1402
1404
  const chainsLength = chains.length;
1403
- if (!chainsLength) {
1404
- // one buggy coin, which doesn't contain info https://t.me/KuCoin_API/173118
1405
- continue;
1406
- }
1407
1405
  for (let j = 0; j < chainsLength; j++) {
1408
1406
  const chain = chains[j];
1409
1407
  const chainId = this.safeString(chain, 'chainId');
1410
1408
  const networkCode = this.networkIdToCode(chainId, code);
1411
- const chainWithdrawEnabled = this.safeBool(chain, 'isWithdrawEnabled', false);
1412
- const chainDepositEnabled = this.safeBool(chain, 'isDepositEnabled', false);
1413
1409
  networks[networkCode] = {
1414
1410
  'info': chain,
1415
1411
  'id': chainId,
1416
1412
  'name': this.safeString(chain, 'chainName'),
1417
1413
  'code': networkCode,
1418
- 'active': chainWithdrawEnabled && chainDepositEnabled,
1414
+ 'active': undefined,
1419
1415
  'fee': this.safeNumber(chain, 'withdrawalMinFee'),
1420
- 'deposit': chainDepositEnabled,
1421
- 'withdraw': chainWithdrawEnabled,
1416
+ 'deposit': this.safeBool(chain, 'isDepositEnabled'),
1417
+ 'withdraw': this.safeBool(chain, 'isWithdrawEnabled'),
1422
1418
  'precision': this.parseNumber(this.parsePrecision(this.safeString(chain, 'withdrawPrecision'))),
1423
1419
  'limits': {
1424
1420
  'withdraw': {
@@ -1433,10 +1429,12 @@ export default class kucoin extends Exchange {
1433
1429
  };
1434
1430
  }
1435
1431
  // kucoin has determined 'fiat' currencies with below logic
1436
- const isFiat = (rawPrecision === '2') && (chainsLength === 0);
1432
+ const rawPrecision = this.safeString(entry, 'precision');
1433
+ const precision = this.parseNumber(this.parsePrecision(rawPrecision));
1434
+ const isFiat = this.inArray(id, otherFiats) || ((rawPrecision === '2') && (chainsLength === 0));
1437
1435
  result[code] = this.safeCurrencyStructure({
1438
1436
  'id': id,
1439
- 'name': name,
1437
+ 'name': this.safeString(entry, 'fullName'),
1440
1438
  'code': code,
1441
1439
  'type': isFiat ? 'fiat' : 'crypto',
1442
1440
  'precision': precision,
@@ -2697,7 +2695,7 @@ export default class kucoin extends Exchange {
2697
2695
  async cancelAllOrders(symbol = undefined, params = {}) {
2698
2696
  await this.loadMarkets();
2699
2697
  const request = {};
2700
- const trigger = this.safeBool(params, 'stop', false);
2698
+ const trigger = this.safeBool2(params, 'trigger', 'stop', false);
2701
2699
  let hf = undefined;
2702
2700
  [hf, params] = this.handleHfAndParams(params);
2703
2701
  params = this.omit(params, 'stop');
@@ -25,7 +25,6 @@ export default class latoken extends Exchange {
25
25
  * @returns {object[]} an array of objects representing market data
26
26
  */
27
27
  fetchMarkets(params?: {}): Promise<Market[]>;
28
- fetchCurrenciesFromCache(params?: {}): Promise<any>;
29
28
  /**
30
29
  * @method
31
30
  * @name latoken#fetchCurrencies
package/js/src/latoken.js CHANGED
@@ -236,6 +236,8 @@ export default class latoken extends Exchange {
236
236
  'fetchTradingFee': {
237
237
  'method': 'fetchPrivateTradingFee', // or 'fetchPublicTradingFee'
238
238
  },
239
+ 'timeDifference': 0,
240
+ 'adjustForTimeDifference': true, // controls the adjustment logic upon instantiation
239
241
  },
240
242
  'features': {
241
243
  'spot': {
@@ -336,39 +338,6 @@ export default class latoken extends Exchange {
336
338
  * @returns {object[]} an array of objects representing market data
337
339
  */
338
340
  async fetchMarkets(params = {}) {
339
- const currencies = await this.fetchCurrenciesFromCache(params);
340
- //
341
- // [
342
- // {
343
- // "id":"1a075819-9e0b-48fc-8784-4dab1d186d6d",
344
- // "status":"CURRENCY_STATUS_ACTIVE",
345
- // "type":"CURRENCY_TYPE_ALTERNATIVE", // CURRENCY_TYPE_CRYPTO, CURRENCY_TYPE_IEO
346
- // "name":"MyCryptoBank",
347
- // "tag":"MCB",
348
- // "description":"",
349
- // "logo":"",
350
- // "decimals":18,
351
- // "created":1572912000000,
352
- // "tier":1,
353
- // "assetClass":"ASSET_CLASS_UNKNOWN",
354
- // "minTransferAmount":0
355
- // },
356
- // {
357
- // "id":"db02758e-2507-46a5-a805-7bc60355b3eb",
358
- // "status":"CURRENCY_STATUS_ACTIVE",
359
- // "type":"CURRENCY_TYPE_FUTURES_CONTRACT",
360
- // "name":"BTC USDT Futures Contract",
361
- // "tag":"BTCUSDT",
362
- // "description":"",
363
- // "logo":"",
364
- // "decimals":8,
365
- // "created":1589459984395,
366
- // "tier":1,
367
- // "assetClass":"ASSET_CLASS_UNKNOWN",
368
- // "minTransferAmount":0
369
- // },
370
- // ]
371
- //
372
341
  const response = await this.publicGetPair(params);
373
342
  //
374
343
  // [
@@ -390,9 +359,10 @@ export default class latoken extends Exchange {
390
359
  // }
391
360
  // ]
392
361
  //
393
- if (this.safeValue(this.options, 'adjustForTimeDifference', true)) {
362
+ if (this.safeBool(this.options, 'adjustForTimeDifference', false)) {
394
363
  await this.loadTimeDifference();
395
364
  }
365
+ const currencies = this.safeDict(this.options, 'cachedCurrencies', {});
396
366
  const currenciesById = this.indexBy(currencies, 'id');
397
367
  const result = [];
398
368
  for (let i = 0; i < response.length; i++) {
@@ -401,11 +371,13 @@ export default class latoken extends Exchange {
401
371
  // the exchange shows them inverted
402
372
  const baseId = this.safeString(market, 'baseCurrency');
403
373
  const quoteId = this.safeString(market, 'quoteCurrency');
404
- const baseCurrency = this.safeValue(currenciesById, baseId);
405
- const quoteCurrency = this.safeValue(currenciesById, quoteId);
406
- if (baseCurrency !== undefined && quoteCurrency !== undefined) {
407
- const base = this.safeCurrencyCode(this.safeString(baseCurrency, 'tag'));
408
- const quote = this.safeCurrencyCode(this.safeString(quoteCurrency, 'tag'));
374
+ const baseCurrency = this.safeDict(currenciesById, baseId);
375
+ const quoteCurrency = this.safeDict(currenciesById, quoteId);
376
+ const baseCurrencyInfo = this.safeDict(baseCurrency, 'info');
377
+ const quoteCurrencyInfo = this.safeDict(quoteCurrency, 'info');
378
+ if (baseCurrencyInfo !== undefined && quoteCurrencyInfo !== undefined) {
379
+ const base = this.safeCurrencyCode(this.safeString(baseCurrencyInfo, 'tag'));
380
+ const quote = this.safeCurrencyCode(this.safeString(quoteCurrencyInfo, 'tag'));
409
381
  const lowercaseQuote = quote.toLowerCase();
410
382
  const capitalizedQuote = this.capitalize(lowercaseQuote);
411
383
  const status = this.safeString(market, 'status');
@@ -462,22 +434,6 @@ export default class latoken extends Exchange {
462
434
  }
463
435
  return result;
464
436
  }
465
- async fetchCurrenciesFromCache(params = {}) {
466
- // this method is now redundant
467
- // currencies are now fetched before markets
468
- const options = this.safeValue(this.options, 'fetchCurrencies', {});
469
- const timestamp = this.safeInteger(options, 'timestamp');
470
- const expires = this.safeInteger(options, 'expires', 1000);
471
- const now = this.milliseconds();
472
- if ((timestamp === undefined) || ((now - timestamp) > expires)) {
473
- const response = await this.publicGetCurrency(params);
474
- this.options['fetchCurrencies'] = this.extend(options, {
475
- 'response': response,
476
- 'timestamp': now,
477
- });
478
- }
479
- return this.safeValue(this.options['fetchCurrencies'], 'response');
480
- }
481
437
  /**
482
438
  * @method
483
439
  * @name latoken#fetchCurrencies
@@ -486,7 +442,7 @@ export default class latoken extends Exchange {
486
442
  * @returns {object} an associative dictionary of currencies
487
443
  */
488
444
  async fetchCurrencies(params = {}) {
489
- const response = await this.fetchCurrenciesFromCache(params);
445
+ const response = await this.publicGetCurrency(params);
490
446
  //
491
447
  // [
492
448
  // {
@@ -525,29 +481,18 @@ export default class latoken extends Exchange {
525
481
  const id = this.safeString(currency, 'id');
526
482
  const tag = this.safeString(currency, 'tag');
527
483
  const code = this.safeCurrencyCode(tag);
528
- const fee = this.safeNumber(currency, 'fee');
529
484
  const currencyType = this.safeString(currency, 'type');
530
- let type = undefined;
531
- if (currencyType === 'CURRENCY_TYPE_ALTERNATIVE') {
532
- type = 'other';
533
- }
534
- else {
535
- // CURRENCY_TYPE_CRYPTO and CURRENCY_TYPE_IEO are all cryptos
536
- type = 'crypto';
537
- }
538
- const status = this.safeString(currency, 'status');
539
- const active = (status === 'CURRENCY_STATUS_ACTIVE');
540
- const name = this.safeString(currency, 'name');
541
- result[code] = {
485
+ const isCrypto = (currencyType === 'CURRENCY_TYPE_CRYPTO' || currencyType === 'CURRENCY_TYPE_IEO');
486
+ result[code] = this.safeCurrencyStructure({
542
487
  'id': id,
543
488
  'code': code,
544
489
  'info': currency,
545
- 'name': name,
546
- 'type': type,
547
- 'active': active,
490
+ 'name': this.safeString(currency, 'name'),
491
+ 'type': isCrypto ? 'crypto' : 'other',
492
+ 'active': this.safeString(currency, 'status') === 'CURRENCY_STATUS_ACTIVE',
548
493
  'deposit': undefined,
549
494
  'withdraw': undefined,
550
- 'fee': fee,
495
+ 'fee': this.safeNumber(currency, 'fee'),
551
496
  'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'decimals'))),
552
497
  'limits': {
553
498
  'amount': {
@@ -560,7 +505,7 @@ export default class latoken extends Exchange {
560
505
  },
561
506
  },
562
507
  'networks': {},
563
- };
508
+ });
564
509
  }
565
510
  return result;
566
511
  }
package/js/src/lbank.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/lbank.js';
2
- import type { Balances, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, int, DepositAddress, FundingRates, FundingRate } from './base/types.js';
2
+ import type { Balances, Currency, Currencies, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, int, DepositAddress, FundingRates, FundingRate } from './base/types.js';
3
3
  /**
4
4
  * @class lbank
5
5
  * @augments Exchange
@@ -16,6 +16,14 @@ export default class lbank extends Exchange {
16
16
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
17
17
  */
18
18
  fetchTime(params?: {}): Promise<Int>;
19
+ /**
20
+ * @method
21
+ * @name lbank#fetchCurrencies
22
+ * @description fetches all available currencies on an exchange
23
+ * @param {dict} [params] extra parameters specific to the exchange API endpoint
24
+ * @returns {dict} an associative dictionary of currencies
25
+ */
26
+ fetchCurrencies(params?: {}): Promise<Currencies>;
19
27
  /**
20
28
  * @method
21
29
  * @name lbank#fetchMarkets