ccxt 4.4.82 → 4.4.86

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 (145) hide show
  1. package/README.md +6 -9
  2. package/dist/ccxt.browser.min.js +7 -7
  3. package/dist/cjs/ccxt.js +6 -17
  4. package/dist/cjs/src/abstract/bittrade.js +9 -0
  5. package/dist/cjs/src/apex.js +2 -1
  6. package/dist/cjs/src/ascendex.js +189 -155
  7. package/dist/cjs/src/base/Exchange.js +15 -2
  8. package/dist/cjs/src/bequant.js +1 -1
  9. package/dist/cjs/src/bitget.js +6 -7
  10. package/dist/cjs/src/bitmart.js +1 -1
  11. package/dist/cjs/src/bitrue.js +14 -35
  12. package/dist/cjs/src/bitso.js +33 -0
  13. package/dist/cjs/src/bitstamp.js +33 -0
  14. package/dist/cjs/src/bittrade.js +2049 -0
  15. package/dist/cjs/src/blofin.js +154 -13
  16. package/dist/cjs/src/btcbox.js +25 -5
  17. package/dist/cjs/src/bybit.js +16 -40
  18. package/dist/cjs/src/cex.js +2 -4
  19. package/dist/cjs/src/coinbase.js +58 -46
  20. package/dist/cjs/src/coinbaseexchange.js +142 -32
  21. package/dist/cjs/src/coincatch.js +14 -67
  22. package/dist/cjs/src/coinex.js +29 -32
  23. package/dist/cjs/src/coinlist.js +16 -15
  24. package/dist/cjs/src/coinmetro.js +22 -11
  25. package/dist/cjs/src/coinone.js +8 -10
  26. package/dist/cjs/src/coinsph.js +126 -1
  27. package/dist/cjs/src/cryptocom.js +111 -1
  28. package/dist/cjs/src/cryptomus.js +43 -89
  29. package/dist/cjs/src/delta.js +76 -36
  30. package/dist/cjs/src/deribit.js +4 -5
  31. package/dist/cjs/src/derive.js +46 -10
  32. package/dist/cjs/src/ellipx.js +175 -79
  33. package/dist/cjs/src/gate.js +1 -1
  34. package/dist/cjs/src/gemini.js +3 -5
  35. package/dist/cjs/src/hitbtc.js +56 -69
  36. package/dist/cjs/src/hollaex.js +107 -49
  37. package/dist/cjs/src/htx.js +20 -44
  38. package/dist/cjs/src/hyperliquid.js +6 -6
  39. package/dist/cjs/src/kraken.js +29 -24
  40. package/dist/cjs/src/kucoinfutures.js +6 -0
  41. package/dist/cjs/src/lbank.js +1 -1
  42. package/dist/cjs/src/mexc.js +2 -2
  43. package/dist/cjs/src/ndax.js +25 -24
  44. package/dist/cjs/src/okcoin.js +12 -31
  45. package/dist/cjs/src/okx.js +9 -0
  46. package/dist/cjs/src/onetrading.js +9 -6
  47. package/dist/cjs/src/oxfun.js +42 -114
  48. package/dist/cjs/src/paradex.js +124 -4
  49. package/dist/cjs/src/pro/binance.js +32 -33
  50. package/dist/cjs/src/pro/bithumb.js +5 -3
  51. package/dist/cjs/src/pro/bittrade.js +605 -0
  52. package/dist/cjs/src/pro/kraken.js +289 -79
  53. package/dist/cjs/src/pro/luno.js +6 -5
  54. package/dist/cjs/src/pro/mexc.js +304 -7
  55. package/dist/cjs/src/pro/poloniex.js +6 -2
  56. package/examples/js/cli.js +127 -13
  57. package/js/ccxt.d.ts +8 -20
  58. package/js/ccxt.js +6 -14
  59. package/js/src/abstract/blofin.d.ts +8 -0
  60. package/js/src/abstract/btcbox.d.ts +1 -0
  61. package/js/src/abstract/myokx.d.ts +2 -0
  62. package/js/src/abstract/okx.d.ts +2 -0
  63. package/js/src/apex.js +2 -1
  64. package/js/src/ascendex.d.ts +2 -0
  65. package/js/src/ascendex.js +189 -155
  66. package/js/src/base/Exchange.d.ts +15 -1
  67. package/js/src/base/Exchange.js +15 -2
  68. package/js/src/base/types.d.ts +3 -0
  69. package/js/src/bequant.js +1 -1
  70. package/js/src/bitget.js +6 -7
  71. package/js/src/bitmart.js +1 -1
  72. package/js/src/bitrue.js +14 -35
  73. package/js/src/bitso.js +33 -0
  74. package/js/src/bitstamp.js +33 -0
  75. package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
  76. package/js/src/{huobijp.js → bittrade.js} +35 -35
  77. package/js/src/blofin.d.ts +42 -2
  78. package/js/src/blofin.js +154 -13
  79. package/js/src/btcbox.js +25 -5
  80. package/js/src/bybit.js +16 -40
  81. package/js/src/cex.js +2 -4
  82. package/js/src/coinbase.js +58 -46
  83. package/js/src/coinbaseexchange.js +142 -32
  84. package/js/src/coincatch.js +14 -67
  85. package/js/src/coinex.js +28 -29
  86. package/js/src/coinlist.js +16 -15
  87. package/js/src/coinmetro.js +22 -11
  88. package/js/src/coinone.js +8 -10
  89. package/js/src/coinsph.d.ts +10 -1
  90. package/js/src/coinsph.js +126 -1
  91. package/js/src/cryptocom.d.ts +10 -1
  92. package/js/src/cryptocom.js +111 -1
  93. package/js/src/cryptomus.js +43 -89
  94. package/js/src/delta.js +76 -36
  95. package/js/src/deribit.js +4 -5
  96. package/js/src/derive.js +46 -10
  97. package/js/src/ellipx.d.ts +2 -3
  98. package/js/src/ellipx.js +175 -80
  99. package/js/src/gate.js +1 -1
  100. package/js/src/gemini.js +3 -5
  101. package/js/src/hitbtc.js +56 -69
  102. package/js/src/hollaex.js +107 -49
  103. package/js/src/htx.js +20 -44
  104. package/js/src/hyperliquid.js +6 -6
  105. package/js/src/kraken.js +29 -24
  106. package/js/src/kucoinfutures.d.ts +1 -0
  107. package/js/src/kucoinfutures.js +6 -0
  108. package/js/src/lbank.js +1 -1
  109. package/js/src/mexc.js +2 -2
  110. package/js/src/ndax.js +25 -24
  111. package/js/src/okcoin.js +12 -31
  112. package/js/src/okx.js +9 -0
  113. package/js/src/onetrading.js +9 -6
  114. package/js/src/oxfun.js +42 -114
  115. package/js/src/paradex.d.ts +12 -1
  116. package/js/src/paradex.js +124 -4
  117. package/js/src/pro/binance.d.ts +26 -26
  118. package/js/src/pro/binance.js +32 -33
  119. package/js/src/pro/bithumb.js +5 -3
  120. package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
  121. package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
  122. package/js/src/pro/kraken.d.ts +7 -6
  123. package/js/src/pro/kraken.js +290 -80
  124. package/js/src/pro/luno.js +6 -5
  125. package/js/src/pro/mexc.d.ts +58 -0
  126. package/js/src/pro/mexc.js +304 -7
  127. package/js/src/pro/poloniex.d.ts +1 -1
  128. package/js/src/pro/poloniex.js +6 -2
  129. package/package.json +1 -1
  130. package/js/src/abstract/bl3p.d.ts +0 -22
  131. package/js/src/abstract/huobijp.js +0 -11
  132. package/js/src/abstract/idex.d.ts +0 -29
  133. package/js/src/abstract/idex.js +0 -11
  134. package/js/src/abstract/kuna.d.ts +0 -185
  135. package/js/src/abstract/kuna.js +0 -11
  136. package/js/src/bl3p.d.ts +0 -116
  137. package/js/src/bl3p.js +0 -552
  138. package/js/src/idex.d.ts +0 -312
  139. package/js/src/idex.js +0 -1961
  140. package/js/src/kuna.d.ts +0 -335
  141. package/js/src/kuna.js +0 -2006
  142. package/js/src/pro/idex.d.ts +0 -81
  143. package/js/src/pro/idex.js +0 -720
  144. /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
  145. /package/js/src/abstract/{bl3p.js → bittrade.js} +0 -0
@@ -506,31 +506,49 @@ class delta extends delta$1 {
506
506
  async fetchCurrencies(params = {}) {
507
507
  const response = await this.publicGetAssets(params);
508
508
  //
509
- // {
510
- // "result":[
511
- // {
512
- // "base_withdrawal_fee":"0.0005",
513
- // "deposit_status":"enabled",
514
- // "id":2,
515
- // "interest_credit":true,
516
- // "interest_slabs":[
517
- // {"limit":"0.1","rate":"0"},
518
- // {"limit":"1","rate":"0.05"},
519
- // {"limit":"5","rate":"0.075"},
520
- // {"limit":"10","rate":"0.1"},
521
- // {"limit":"9999999999999999","rate":"0"}
522
- // ],
523
- // "kyc_deposit_limit":"10",
524
- // "kyc_withdrawal_limit":"2",
525
- // "min_withdrawal_amount":"0.001",
526
- // "minimum_precision":4,
527
- // "name":"Bitcoin",
528
- // "precision":8,
529
- // "sort_priority":1,
530
- // "symbol":"BTC",
531
- // "variable_withdrawal_fee":"0",
532
- // "withdrawal_status":"enabled"
533
- // },
509
+ // {
510
+ // "result": [
511
+ // {
512
+ // "base_withdrawal_fee": "0.005000000000000000",
513
+ // "id": "1",
514
+ // "interest_credit": false,
515
+ // "interest_slabs": null,
516
+ // "kyc_deposit_limit": "0.000000000000000000",
517
+ // "kyc_withdrawal_limit": "0.000000000000000000",
518
+ // "min_withdrawal_amount": "0.010000000000000000",
519
+ // "minimum_precision": "4",
520
+ // "name": "Ethereum",
521
+ // "networks": [
522
+ // {
523
+ // "allowed_deposit_groups": null,
524
+ // "base_withdrawal_fee": "0.0025",
525
+ // "deposit_status": "enabled",
526
+ // "memo_required": false,
527
+ // "min_deposit_amount": "0.000050000000000000",
528
+ // "min_withdrawal_amount": "0.010000000000000000",
529
+ // "minimum_deposit_confirmations": "12",
530
+ // "network": "ERC20",
531
+ // "variable_withdrawal_fee": "0",
532
+ // "withdrawal_status": "enabled"
533
+ // },
534
+ // {
535
+ // "allowed_deposit_groups": null,
536
+ // "base_withdrawal_fee": "0.0001",
537
+ // "deposit_status": "enabled",
538
+ // "memo_required": false,
539
+ // "min_deposit_amount": "0.000050000000000000",
540
+ // "min_withdrawal_amount": "0.000300000000000000",
541
+ // "minimum_deposit_confirmations": "15",
542
+ // "network": "BEP20(BSC)",
543
+ // "variable_withdrawal_fee": "0",
544
+ // "withdrawal_status": "enabled"
545
+ // }
546
+ // ],
547
+ // "precision": "18",
548
+ // "sort_priority": "3",
549
+ // "symbol": "ETH",
550
+ // "variable_withdrawal_fee": "0.000000000000000000"
551
+ // },
534
552
  // ],
535
553
  // "success":true
536
554
  // }
@@ -542,20 +560,42 @@ class delta extends delta$1 {
542
560
  const id = this.safeString(currency, 'symbol');
543
561
  const numericId = this.safeInteger(currency, 'id');
544
562
  const code = this.safeCurrencyCode(id);
545
- const depositStatus = this.safeString(currency, 'deposit_status');
546
- const withdrawalStatus = this.safeString(currency, 'withdrawal_status');
547
- const depositsEnabled = (depositStatus === 'enabled');
548
- const withdrawalsEnabled = (withdrawalStatus === 'enabled');
549
- const active = depositsEnabled && withdrawalsEnabled;
550
- result[code] = {
563
+ const chains = this.safeList(currency, 'networks', []);
564
+ const networks = {};
565
+ for (let j = 0; j < chains.length; j++) {
566
+ const chain = chains[j];
567
+ const networkId = this.safeString(chain, 'network');
568
+ const networkCode = this.networkIdToCode(networkId);
569
+ networks[networkCode] = {
570
+ 'id': networkId,
571
+ 'network': networkCode,
572
+ 'name': this.safeString(chain, 'name'),
573
+ 'info': chain,
574
+ 'active': this.safeString(chain, 'status') === 'enabled',
575
+ 'deposit': this.safeString(chain, 'deposit_status') === 'enabled',
576
+ 'withdraw': this.safeString(chain, 'withdrawal_status') === 'enabled',
577
+ 'fee': this.safeNumber(chain, 'base_withdrawal_fee'),
578
+ 'limits': {
579
+ 'deposit': {
580
+ 'min': this.safeNumber(chain, 'min_deposit_amount'),
581
+ 'max': undefined,
582
+ },
583
+ 'withdraw': {
584
+ 'min': this.safeNumber(chain, 'min_withdrawal_amount'),
585
+ 'max': undefined,
586
+ },
587
+ },
588
+ };
589
+ }
590
+ result[code] = this.safeCurrencyStructure({
551
591
  'id': id,
552
592
  'numericId': numericId,
553
593
  'code': code,
554
594
  'name': this.safeString(currency, 'name'),
555
595
  'info': currency,
556
- 'active': active,
557
- 'deposit': depositsEnabled,
558
- 'withdraw': withdrawalsEnabled,
596
+ 'active': undefined,
597
+ 'deposit': this.safeString(currency, 'deposit_status') === 'enabled',
598
+ 'withdraw': this.safeString(currency, 'withdrawal_status') === 'enabled',
559
599
  'fee': this.safeNumber(currency, 'base_withdrawal_fee'),
560
600
  'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'precision'))),
561
601
  'limits': {
@@ -565,9 +605,9 @@ class delta extends delta$1 {
565
605
  'max': undefined,
566
606
  },
567
607
  },
568
- 'networks': {},
608
+ 'networks': networks,
569
609
  'type': 'crypto',
570
- };
610
+ });
571
611
  }
572
612
  return result;
573
613
  }
@@ -634,18 +634,17 @@ class deribit extends deribit$1 {
634
634
  // "testnet": true
635
635
  // }
636
636
  //
637
- const data = this.safeValue(response, 'result', {});
637
+ const data = this.safeList(response, 'result', []);
638
638
  const result = {};
639
639
  for (let i = 0; i < data.length; i++) {
640
640
  const currency = data[i];
641
641
  const currencyId = this.safeString(currency, 'currency');
642
642
  const code = this.safeCurrencyCode(currencyId);
643
- const name = this.safeString(currency, 'currency_long');
644
- result[code] = {
643
+ result[code] = this.safeCurrencyStructure({
645
644
  'info': currency,
646
645
  'code': code,
647
646
  'id': currencyId,
648
- 'name': name,
647
+ 'name': this.safeString(currency, 'currency_long'),
649
648
  'active': undefined,
650
649
  'deposit': undefined,
651
650
  'withdraw': undefined,
@@ -667,7 +666,7 @@ class deribit extends deribit$1 {
667
666
  },
668
667
  },
669
668
  'networks': undefined,
670
- };
669
+ });
671
670
  }
672
671
  return result;
673
672
  }
@@ -452,14 +452,50 @@ class derive extends derive$1 {
452
452
  const result = {};
453
453
  const tokenResponse = await this.publicGetGetAllCurrencies(params);
454
454
  //
455
- // {
456
- // "result": [
457
- // {
458
- // "currency": "USDC",
459
- // "spot_price": "1.000066413299999872",
460
- // "spot_price_24h": "1.000327785299999872"
461
- // }
462
- // ],
455
+ // {
456
+ // "result": [
457
+ // {
458
+ // "currency": "SEI",
459
+ // "instrument_types": [
460
+ // "perp"
461
+ // ],
462
+ // "protocol_asset_addresses": {
463
+ // "perp": "0x7225889B75fd34C68eA3098dAE04D50553C09840",
464
+ // "option": null,
465
+ // "spot": null,
466
+ // "underlying_erc20": null
467
+ // },
468
+ // "managers": [
469
+ // {
470
+ // "address": "0x28c9ddF9A3B29c2E6a561c1BC520954e5A33de5D",
471
+ // "margin_type": "SM",
472
+ // "currency": null
473
+ // }
474
+ // ],
475
+ // "srm_im_discount": "0",
476
+ // "srm_mm_discount": "0",
477
+ // "pm2_collateral_discounts": [],
478
+ // "borrow_apy": "0",
479
+ // "supply_apy": "0",
480
+ // "total_borrow": "0",
481
+ // "total_supply": "0",
482
+ // "asset_cap_and_supply_per_manager": {
483
+ // "perp": {
484
+ // "SM": [
485
+ // {
486
+ // "current_open_interest": "0",
487
+ // "interest_cap": "2000000",
488
+ // "manager_currency": null
489
+ // }
490
+ // ]
491
+ // },
492
+ // "option": {},
493
+ // "erc20": {}
494
+ // },
495
+ // "market_type": "SRM_PERP_ONLY",
496
+ // "spot_price": "0.2193542905042081",
497
+ // "spot_price_24h": "0.238381655533635830"
498
+ // },
463
499
  // "id": "7e07fe1d-0ab4-4d2b-9e22-b65ce9e232dc"
464
500
  // }
465
501
  //
@@ -468,7 +504,7 @@ class derive extends derive$1 {
468
504
  const currency = currencies[i];
469
505
  const currencyId = this.safeString(currency, 'currency');
470
506
  const code = this.safeCurrencyCode(currencyId);
471
- result[code] = {
507
+ result[code] = this.safeCurrencyStructure({
472
508
  'id': currencyId,
473
509
  'name': undefined,
474
510
  'code': code,
@@ -489,7 +525,7 @@ class derive extends derive$1 {
489
525
  },
490
526
  },
491
527
  'info': currency,
492
- };
528
+ });
493
529
  }
494
530
  return result;
495
531
  }
@@ -805,85 +805,181 @@ class ellipx extends ellipx$1 {
805
805
  'results_per_page': 100,
806
806
  '_expand': '/Crypto_Token,/Crypto_Chain',
807
807
  }, params));
808
- const currencies = {};
809
- const data = this.safeValue(response, 'data', []);
808
+ const result = {};
809
+ const data = this.safeList(response, 'data', []);
810
810
  for (let i = 0; i < data.length; i++) {
811
- const currency = this.parseCurrency(data[i]);
812
- const code = this.safeString(currency, 'code');
813
- if (code !== undefined) {
814
- currencies[code] = currency;
811
+ const networkEntry = data[i];
812
+ //
813
+ // {
814
+ // "Crypto_Token_Info__": "crtev-5nsn35-f4ir-g5hp-iaft-i4ztx6zu",
815
+ // "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
816
+ // "Crypto_Chain__": "chain-xjbini-7wlz-dmzf-gm7z-zf7ei6fq",
817
+ // "Type": "native",
818
+ // "Symbol": null,
819
+ // "Name": null,
820
+ // "Contract_Address": null,
821
+ // "Minimum_Deposit": {
822
+ // "v": "6",
823
+ // "e": "6",
824
+ // "f": "6.0e-6"
825
+ // },
826
+ // "Minimum_Withdraw": {
827
+ // "v": "15",
828
+ // "e": "5",
829
+ // "f": "0.00015"
830
+ // },
831
+ // "Withdraw_Fee": {
832
+ // "v": "1",
833
+ // "e": "4",
834
+ // "f": "0.0001"
835
+ // },
836
+ // "Minimum_Collect": null,
837
+ // "Status": "valid",
838
+ // "Can_Deposit": "Y",
839
+ // "Decimals": null,
840
+ // "Priority": "100",
841
+ // "Created": {
842
+ // "unix": "1727552199",
843
+ // "us": "0",
844
+ // "iso": "2024-09-28 19:36:39.000000",
845
+ // "tz": "UTC",
846
+ // "full": "1727552199000000",
847
+ // "unixms": "1727552199000"
848
+ // },
849
+ // "Crypto_Token": {
850
+ // "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
851
+ // "Name": "Bitcoin",
852
+ // "Symbol": "BTC",
853
+ // "Decimals": "8",
854
+ // "CMC_Id": "1",
855
+ // "Priority": "100",
856
+ // "Can_Deposit": "Y",
857
+ // "Category": "token",
858
+ // "Testnet": "N",
859
+ // "Created": {
860
+ // "unix": "1727552113",
861
+ // "us": "0",
862
+ // "iso": "2024-09-28 19:35:13.000000",
863
+ // "tz": "UTC",
864
+ // "full": "1727552113000000",
865
+ // "unixms": "1727552113000"
866
+ // },
867
+ // "Logo": [
868
+ // {
869
+ // "Crypto_Token_Logo__": "ctklg-aoozyr-rzm5-fphf-dhm7-5wbtetha",
870
+ // "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
871
+ // "Blob__": "blob-d6hvgx-37s5-dh5h-ogj5-qxqvnaoy",
872
+ // "Default": "Y",
873
+ // "Format": "png",
874
+ // "Priority": "0",
875
+ // "Created": {
876
+ // "unix": "1730196627",
877
+ // "us": "929660",
878
+ // "iso": "2024-10-29 10:10:27.929660",
879
+ // "tz": "UTC",
880
+ // "full": "1730196627929660",
881
+ // "unixms": "1730196627929"
882
+ // },
883
+ // "Source": {
884
+ // "Media_Image__": "blob-d6hvgx-37s5-dh5h-ogj5-qxqvnaoy",
885
+ // "Url": "https://static.atonline.net/image/m_X7_tnmIYFCwn6EUVQuMKqrCuPB3CMl4ONTegeYpC0wIg68YZM0CuBpbjspnYwz/1a942eab068a2173e66d08c736283cfe22e1c1ed"
886
+ // }
887
+ // }
888
+ // ]
889
+ // },
890
+ // "Crypto_Chain": {
891
+ // "Crypto_Chain__": "chain-xjbini-7wlz-dmzf-gm7z-zf7ei6fq",
892
+ // "EVM_Chain__": null,
893
+ // "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
894
+ // "Name": "Bitcoin",
895
+ // "Key": "bitcoin",
896
+ // "Type": "Bitcoin",
897
+ // "Curve": "secp256k1",
898
+ // "Backend_Url": null,
899
+ // "Wallet_Verification_Methods": {
900
+ // "signature": true
901
+ // },
902
+ // "Block_Margin": "3",
903
+ // "Created": {
904
+ // "unix": "1725340084",
905
+ // "us": "0",
906
+ // "iso": "2024-09-03 05:08:04.000000",
907
+ // "tz": "UTC",
908
+ // "full": "1725340084000000",
909
+ // "unixms": "1725340084000"
910
+ // }
911
+ // }
912
+ // }
913
+ //
914
+ const id = this.safeString(networkEntry, 'Crypto_Token__');
915
+ const token = this.safeDict(networkEntry, 'Crypto_Token', {});
916
+ const code = this.safeCurrencyCode(this.safeString(token, 'Symbol'));
917
+ if (!(code in result)) {
918
+ result[code] = {
919
+ 'id': id,
920
+ 'code': code,
921
+ 'info': [],
922
+ 'type': undefined,
923
+ 'name': this.safeString(token, 'Name'),
924
+ 'active': undefined,
925
+ 'deposit': undefined,
926
+ 'withdraw': undefined,
927
+ 'fee': undefined,
928
+ 'precision': undefined,
929
+ 'limits': {
930
+ 'amount': {
931
+ 'min': undefined,
932
+ 'max': undefined,
933
+ },
934
+ 'withdraw': {
935
+ 'min': undefined,
936
+ 'max': undefined,
937
+ },
938
+ 'deposit': {
939
+ 'min': undefined,
940
+ 'max': undefined,
941
+ },
942
+ },
943
+ 'networks': {},
944
+ };
815
945
  }
946
+ const networkId = this.safeString(networkEntry, 'Crypto_Chain__');
947
+ const cryptoChainDict = this.safeString(networkEntry, 'Crypto_Chain');
948
+ const networkName = this.safeString(cryptoChainDict, 'Type', 'default');
949
+ const networkCode = this.networkIdToCode(networkName);
950
+ result[code]['networks'][networkCode] = {
951
+ 'id': networkId,
952
+ 'network': networkCode,
953
+ 'active': this.safeString(networkEntry, 'Status') === 'valid',
954
+ 'deposit': this.safeString(networkEntry, 'Can_Deposit') === 'Y',
955
+ 'withdraw': undefined,
956
+ 'fee': this.parseNumber(this.parseAmount(networkEntry['Withdraw_Fee'])),
957
+ 'precision': this.parseNumber(this.parsePrecision(this.safeString(token, 'Decimals'))),
958
+ 'limits': {
959
+ 'amount': {
960
+ 'min': undefined,
961
+ 'max': undefined,
962
+ },
963
+ 'withdraw': {
964
+ 'min': this.parseAmount(networkEntry['Minimum_Withdraw']),
965
+ 'max': undefined,
966
+ },
967
+ 'deposit': {
968
+ 'min': this.parseAmount(networkEntry['Minimum_Deposit']),
969
+ 'max': undefined,
970
+ },
971
+ },
972
+ };
973
+ const infos = this.safeList(result[code], 'info', []);
974
+ infos.push(networkEntry);
975
+ result[code]['info'] = infos;
816
976
  }
817
- return currencies;
818
- }
819
- parseCurrency(currency) {
820
- const id = this.safeString(currency, 'Crypto_Token__');
821
- const token = this.safeValue(currency, 'Crypto_Token', {});
822
- const code = this.safeCurrencyCode(this.safeString(token, 'Symbol'));
823
- const name = this.safeString(token, 'Name');
824
- const active = this.safeString(currency, 'Status') === 'valid';
825
- const deposit = this.safeString(currency, 'Can_Deposit') === 'Y';
826
- const withdraw = this.safeString(currency, 'Status') === 'valid';
827
- let fee = undefined;
828
- if (currency['Withdraw_Fee'] !== undefined) {
829
- fee = this.parseNumber(this.parseAmount(currency['Withdraw_Fee']));
830
- }
831
- const precision = this.parseNumber(this.parsePrecision(this.safeString(token, 'Decimals')));
832
- let minDeposit = undefined;
833
- if (currency['Minimum_Deposit'] !== undefined) {
834
- minDeposit = this.parseAmount(currency['Minimum_Deposit']);
835
- }
836
- let minWithdraw = undefined;
837
- if (currency['Minimum_Withdraw'] !== undefined) {
838
- minWithdraw = this.parseAmount(currency['Minimum_Withdraw']);
977
+ // only after all entries are formed in currencies, restructure each entry
978
+ const allKeys = Object.keys(result);
979
+ for (let i = 0; i < allKeys.length; i++) {
980
+ const code = allKeys[i];
981
+ result[code] = this.safeCurrencyStructure(result[code]); // this is needed after adding network entry
839
982
  }
840
- const networkId = this.safeString(currency, 'Crypto_Chain__');
841
- const networkData = this.safeValue(currency, 'Crypto_Chain', {});
842
- const networkCode = this.safeString(networkData, 'Type', 'default');
843
- const networks = {
844
- 'string': undefined,
845
- 'info': networkCode === 'default' ? {} : networkData,
846
- 'id': networkId || id || '',
847
- 'network': networkCode,
848
- 'active': active,
849
- 'deposit': deposit,
850
- 'withdraw': withdraw,
851
- 'fee': fee,
852
- 'precision': precision,
853
- 'limits': {
854
- 'deposit': {
855
- 'min': minDeposit,
856
- 'max': undefined,
857
- },
858
- 'withdraw': {
859
- 'min': minWithdraw,
860
- 'max': undefined,
861
- },
862
- },
863
- };
864
- const result = {
865
- 'info': currency,
866
- 'id': id,
867
- 'code': code,
868
- 'name': name,
869
- 'active': active,
870
- 'deposit': deposit,
871
- 'withdraw': withdraw,
872
- 'fee': fee,
873
- 'precision': precision,
874
- 'type': undefined,
875
- 'limits': {
876
- 'amount': {
877
- 'min': undefined,
878
- 'max': undefined,
879
- },
880
- 'withdraw': {
881
- 'min': minWithdraw,
882
- 'max': undefined,
883
- },
884
- },
885
- 'networks': networks,
886
- };
887
983
  return result;
888
984
  }
889
985
  /**
@@ -1083,14 +1179,14 @@ class ellipx extends ellipx$1 {
1083
1179
  for (let i = 0; i < dataArray.length; i++) {
1084
1180
  const entry = dataArray[i];
1085
1181
  const balance = this.safeDict(entry, 'Balance', {});
1086
- const currency = this.safeString(balance, 'currency');
1087
- if (currency !== undefined) {
1182
+ const code = this.safeString(balance, 'currency');
1183
+ if (code !== undefined) {
1088
1184
  const account = {
1089
1185
  'free': this.parseAmount(entry['Unencumbered_Balance']['value_xint']),
1090
1186
  'used': this.parseAmount(entry['Liabilities']['value_xint']),
1091
1187
  'total': this.parseAmount(balance['value_xint']),
1092
1188
  };
1093
- result[currency] = account;
1189
+ result[code] = account;
1094
1190
  }
1095
1191
  }
1096
1192
  return this.safeBalance(result);
@@ -1713,7 +1809,7 @@ class ellipx extends ellipx$1 {
1713
1809
  * @name ellipx#withdraw
1714
1810
  * @description Make a withdrawal request
1715
1811
  * @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.zegupoa8g4t9
1716
- * @param {string} code Currency code
1812
+ * @param {string} code unified currency code
1717
1813
  * @param {number} amount Amount to withdraw
1718
1814
  * @param {string} address Destination wallet address
1719
1815
  * @param {string} [tag] Additional tag/memo for currencies that require it
@@ -1898,7 +1898,7 @@ class gate extends gate$1 {
1898
1898
  'code': code,
1899
1899
  'type': type,
1900
1900
  'precision': precision,
1901
- 'limits': this.limits,
1901
+ 'limits': undefined,
1902
1902
  'networks': {},
1903
1903
  'info': [], // will be filled below
1904
1904
  };
@@ -261,7 +261,7 @@ class gemini extends gemini$1 {
261
261
  'fetchMarketFromWebRetries': 10,
262
262
  'fetchMarketsFromAPI': {
263
263
  'fetchDetailsForAllSymbols': false,
264
- 'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH'],
264
+ 'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH', 'SOL'],
265
265
  },
266
266
  'fetchMarkets': {
267
267
  'webApiEnable': true,
@@ -421,8 +421,6 @@ class gemini extends gemini$1 {
421
421
  let networkCode = undefined;
422
422
  if (networkId !== undefined) {
423
423
  networkCode = this.networkIdToCode(networkId);
424
- }
425
- if (networkCode !== undefined) {
426
424
  networks[networkCode] = {
427
425
  'info': currency,
428
426
  'id': networkId,
@@ -444,7 +442,7 @@ class gemini extends gemini$1 {
444
442
  },
445
443
  };
446
444
  }
447
- result[code] = {
445
+ result[code] = this.safeCurrencyStructure({
448
446
  'info': currency,
449
447
  'id': id,
450
448
  'code': code,
@@ -466,7 +464,7 @@ class gemini extends gemini$1 {
466
464
  },
467
465
  },
468
466
  'networks': networks,
469
- };
467
+ });
470
468
  }
471
469
  return result;
472
470
  }