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
package/js/src/delta.js CHANGED
@@ -509,31 +509,49 @@ export default class delta extends Exchange {
509
509
  async fetchCurrencies(params = {}) {
510
510
  const response = await this.publicGetAssets(params);
511
511
  //
512
- // {
513
- // "result":[
514
- // {
515
- // "base_withdrawal_fee":"0.0005",
516
- // "deposit_status":"enabled",
517
- // "id":2,
518
- // "interest_credit":true,
519
- // "interest_slabs":[
520
- // {"limit":"0.1","rate":"0"},
521
- // {"limit":"1","rate":"0.05"},
522
- // {"limit":"5","rate":"0.075"},
523
- // {"limit":"10","rate":"0.1"},
524
- // {"limit":"9999999999999999","rate":"0"}
525
- // ],
526
- // "kyc_deposit_limit":"10",
527
- // "kyc_withdrawal_limit":"2",
528
- // "min_withdrawal_amount":"0.001",
529
- // "minimum_precision":4,
530
- // "name":"Bitcoin",
531
- // "precision":8,
532
- // "sort_priority":1,
533
- // "symbol":"BTC",
534
- // "variable_withdrawal_fee":"0",
535
- // "withdrawal_status":"enabled"
536
- // },
512
+ // {
513
+ // "result": [
514
+ // {
515
+ // "base_withdrawal_fee": "0.005000000000000000",
516
+ // "id": "1",
517
+ // "interest_credit": false,
518
+ // "interest_slabs": null,
519
+ // "kyc_deposit_limit": "0.000000000000000000",
520
+ // "kyc_withdrawal_limit": "0.000000000000000000",
521
+ // "min_withdrawal_amount": "0.010000000000000000",
522
+ // "minimum_precision": "4",
523
+ // "name": "Ethereum",
524
+ // "networks": [
525
+ // {
526
+ // "allowed_deposit_groups": null,
527
+ // "base_withdrawal_fee": "0.0025",
528
+ // "deposit_status": "enabled",
529
+ // "memo_required": false,
530
+ // "min_deposit_amount": "0.000050000000000000",
531
+ // "min_withdrawal_amount": "0.010000000000000000",
532
+ // "minimum_deposit_confirmations": "12",
533
+ // "network": "ERC20",
534
+ // "variable_withdrawal_fee": "0",
535
+ // "withdrawal_status": "enabled"
536
+ // },
537
+ // {
538
+ // "allowed_deposit_groups": null,
539
+ // "base_withdrawal_fee": "0.0001",
540
+ // "deposit_status": "enabled",
541
+ // "memo_required": false,
542
+ // "min_deposit_amount": "0.000050000000000000",
543
+ // "min_withdrawal_amount": "0.000300000000000000",
544
+ // "minimum_deposit_confirmations": "15",
545
+ // "network": "BEP20(BSC)",
546
+ // "variable_withdrawal_fee": "0",
547
+ // "withdrawal_status": "enabled"
548
+ // }
549
+ // ],
550
+ // "precision": "18",
551
+ // "sort_priority": "3",
552
+ // "symbol": "ETH",
553
+ // "variable_withdrawal_fee": "0.000000000000000000"
554
+ // },
537
555
  // ],
538
556
  // "success":true
539
557
  // }
@@ -545,20 +563,42 @@ export default class delta extends Exchange {
545
563
  const id = this.safeString(currency, 'symbol');
546
564
  const numericId = this.safeInteger(currency, 'id');
547
565
  const code = this.safeCurrencyCode(id);
548
- const depositStatus = this.safeString(currency, 'deposit_status');
549
- const withdrawalStatus = this.safeString(currency, 'withdrawal_status');
550
- const depositsEnabled = (depositStatus === 'enabled');
551
- const withdrawalsEnabled = (withdrawalStatus === 'enabled');
552
- const active = depositsEnabled && withdrawalsEnabled;
553
- result[code] = {
566
+ const chains = this.safeList(currency, 'networks', []);
567
+ const networks = {};
568
+ for (let j = 0; j < chains.length; j++) {
569
+ const chain = chains[j];
570
+ const networkId = this.safeString(chain, 'network');
571
+ const networkCode = this.networkIdToCode(networkId);
572
+ networks[networkCode] = {
573
+ 'id': networkId,
574
+ 'network': networkCode,
575
+ 'name': this.safeString(chain, 'name'),
576
+ 'info': chain,
577
+ 'active': this.safeString(chain, 'status') === 'enabled',
578
+ 'deposit': this.safeString(chain, 'deposit_status') === 'enabled',
579
+ 'withdraw': this.safeString(chain, 'withdrawal_status') === 'enabled',
580
+ 'fee': this.safeNumber(chain, 'base_withdrawal_fee'),
581
+ 'limits': {
582
+ 'deposit': {
583
+ 'min': this.safeNumber(chain, 'min_deposit_amount'),
584
+ 'max': undefined,
585
+ },
586
+ 'withdraw': {
587
+ 'min': this.safeNumber(chain, 'min_withdrawal_amount'),
588
+ 'max': undefined,
589
+ },
590
+ },
591
+ };
592
+ }
593
+ result[code] = this.safeCurrencyStructure({
554
594
  'id': id,
555
595
  'numericId': numericId,
556
596
  'code': code,
557
597
  'name': this.safeString(currency, 'name'),
558
598
  'info': currency,
559
- 'active': active,
560
- 'deposit': depositsEnabled,
561
- 'withdraw': withdrawalsEnabled,
599
+ 'active': undefined,
600
+ 'deposit': this.safeString(currency, 'deposit_status') === 'enabled',
601
+ 'withdraw': this.safeString(currency, 'withdrawal_status') === 'enabled',
562
602
  'fee': this.safeNumber(currency, 'base_withdrawal_fee'),
563
603
  'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'precision'))),
564
604
  'limits': {
@@ -568,9 +608,9 @@ export default class delta extends Exchange {
568
608
  'max': undefined,
569
609
  },
570
610
  },
571
- 'networks': {},
611
+ 'networks': networks,
572
612
  'type': 'crypto',
573
- };
613
+ });
574
614
  }
575
615
  return result;
576
616
  }
package/js/src/deribit.js CHANGED
@@ -637,18 +637,17 @@ export default class deribit extends Exchange {
637
637
  // "testnet": true
638
638
  // }
639
639
  //
640
- const data = this.safeValue(response, 'result', {});
640
+ const data = this.safeList(response, 'result', []);
641
641
  const result = {};
642
642
  for (let i = 0; i < data.length; i++) {
643
643
  const currency = data[i];
644
644
  const currencyId = this.safeString(currency, 'currency');
645
645
  const code = this.safeCurrencyCode(currencyId);
646
- const name = this.safeString(currency, 'currency_long');
647
- result[code] = {
646
+ result[code] = this.safeCurrencyStructure({
648
647
  'info': currency,
649
648
  'code': code,
650
649
  'id': currencyId,
651
- 'name': name,
650
+ 'name': this.safeString(currency, 'currency_long'),
652
651
  'active': undefined,
653
652
  'deposit': undefined,
654
653
  'withdraw': undefined,
@@ -670,7 +669,7 @@ export default class deribit extends Exchange {
670
669
  },
671
670
  },
672
671
  'networks': undefined,
673
- };
672
+ });
674
673
  }
675
674
  return result;
676
675
  }
package/js/src/derive.js CHANGED
@@ -453,14 +453,50 @@ export default class derive extends Exchange {
453
453
  const result = {};
454
454
  const tokenResponse = await this.publicGetGetAllCurrencies(params);
455
455
  //
456
- // {
457
- // "result": [
458
- // {
459
- // "currency": "USDC",
460
- // "spot_price": "1.000066413299999872",
461
- // "spot_price_24h": "1.000327785299999872"
462
- // }
463
- // ],
456
+ // {
457
+ // "result": [
458
+ // {
459
+ // "currency": "SEI",
460
+ // "instrument_types": [
461
+ // "perp"
462
+ // ],
463
+ // "protocol_asset_addresses": {
464
+ // "perp": "0x7225889B75fd34C68eA3098dAE04D50553C09840",
465
+ // "option": null,
466
+ // "spot": null,
467
+ // "underlying_erc20": null
468
+ // },
469
+ // "managers": [
470
+ // {
471
+ // "address": "0x28c9ddF9A3B29c2E6a561c1BC520954e5A33de5D",
472
+ // "margin_type": "SM",
473
+ // "currency": null
474
+ // }
475
+ // ],
476
+ // "srm_im_discount": "0",
477
+ // "srm_mm_discount": "0",
478
+ // "pm2_collateral_discounts": [],
479
+ // "borrow_apy": "0",
480
+ // "supply_apy": "0",
481
+ // "total_borrow": "0",
482
+ // "total_supply": "0",
483
+ // "asset_cap_and_supply_per_manager": {
484
+ // "perp": {
485
+ // "SM": [
486
+ // {
487
+ // "current_open_interest": "0",
488
+ // "interest_cap": "2000000",
489
+ // "manager_currency": null
490
+ // }
491
+ // ]
492
+ // },
493
+ // "option": {},
494
+ // "erc20": {}
495
+ // },
496
+ // "market_type": "SRM_PERP_ONLY",
497
+ // "spot_price": "0.2193542905042081",
498
+ // "spot_price_24h": "0.238381655533635830"
499
+ // },
464
500
  // "id": "7e07fe1d-0ab4-4d2b-9e22-b65ce9e232dc"
465
501
  // }
466
502
  //
@@ -469,7 +505,7 @@ export default class derive extends Exchange {
469
505
  const currency = currencies[i];
470
506
  const currencyId = this.safeString(currency, 'currency');
471
507
  const code = this.safeCurrencyCode(currencyId);
472
- result[code] = {
508
+ result[code] = this.safeCurrencyStructure({
473
509
  'id': currencyId,
474
510
  'name': undefined,
475
511
  'code': code,
@@ -490,7 +526,7 @@ export default class derive extends Exchange {
490
526
  },
491
527
  },
492
528
  'info': currency,
493
- };
529
+ });
494
530
  }
495
531
  return result;
496
532
  }
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/ellipx.js';
2
- import { Str, Int, int, Dict, Num, Market, Ticker, OrderBook, OHLCV, Currency, Currencies, Trade, Balances, OrderType, OrderSide, Order, DepositAddress, TradingFeeInterface, Transaction } from '../ccxt.js';
2
+ import { Str, Int, int, Dict, Num, Market, Ticker, OrderBook, OHLCV, Currencies, Trade, Balances, OrderType, OrderSide, Order, DepositAddress, TradingFeeInterface, Transaction } from '../ccxt.js';
3
3
  /**
4
4
  * @class ellipx
5
5
  * @augments Exchange
@@ -73,7 +73,6 @@ export default class ellipx extends Exchange {
73
73
  * @returns {Promise<Currencies>} An object of currency structures indexed by currency codes
74
74
  */
75
75
  fetchCurrencies(params?: {}): Promise<Currencies>;
76
- parseCurrency(currency: any): Currency;
77
76
  /**
78
77
  * @method
79
78
  * @name ellipx#fetchTrades
@@ -222,7 +221,7 @@ export default class ellipx extends Exchange {
222
221
  * @name ellipx#withdraw
223
222
  * @description Make a withdrawal request
224
223
  * @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.zegupoa8g4t9
225
- * @param {string} code Currency code
224
+ * @param {string} code unified currency code
226
225
  * @param {number} amount Amount to withdraw
227
226
  * @param {string} address Destination wallet address
228
227
  * @param {string} [tag] Additional tag/memo for currencies that require it
package/js/src/ellipx.js CHANGED
@@ -10,7 +10,6 @@ import { AuthenticationError, BadRequest, DDoSProtection, ExchangeError, Permiss
10
10
  // import { Precise } from './base/Precise.js';
11
11
  import { TICK_SIZE } from './base/functions/number.js';
12
12
  // import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
13
- // import type { Account, Balances, Bool, Currencies, Currency, Dict, FundingRateHistory, LastPrice, LastPrices, Leverage, LeverageTier, LeverageTiers, Int, Market, Num, OHLCV, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry } from './base/types.js';
14
13
  import { Precise } from '../ccxt.js';
15
14
  import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
16
15
  import { ed25519 } from './static_dependencies/noble-curves/ed25519.js';
@@ -810,85 +809,181 @@ export default class ellipx extends Exchange {
810
809
  'results_per_page': 100,
811
810
  '_expand': '/Crypto_Token,/Crypto_Chain',
812
811
  }, params));
813
- const currencies = {};
814
- const data = this.safeValue(response, 'data', []);
812
+ const result = {};
813
+ const data = this.safeList(response, 'data', []);
815
814
  for (let i = 0; i < data.length; i++) {
816
- const currency = this.parseCurrency(data[i]);
817
- const code = this.safeString(currency, 'code');
818
- if (code !== undefined) {
819
- currencies[code] = currency;
815
+ const networkEntry = data[i];
816
+ //
817
+ // {
818
+ // "Crypto_Token_Info__": "crtev-5nsn35-f4ir-g5hp-iaft-i4ztx6zu",
819
+ // "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
820
+ // "Crypto_Chain__": "chain-xjbini-7wlz-dmzf-gm7z-zf7ei6fq",
821
+ // "Type": "native",
822
+ // "Symbol": null,
823
+ // "Name": null,
824
+ // "Contract_Address": null,
825
+ // "Minimum_Deposit": {
826
+ // "v": "6",
827
+ // "e": "6",
828
+ // "f": "6.0e-6"
829
+ // },
830
+ // "Minimum_Withdraw": {
831
+ // "v": "15",
832
+ // "e": "5",
833
+ // "f": "0.00015"
834
+ // },
835
+ // "Withdraw_Fee": {
836
+ // "v": "1",
837
+ // "e": "4",
838
+ // "f": "0.0001"
839
+ // },
840
+ // "Minimum_Collect": null,
841
+ // "Status": "valid",
842
+ // "Can_Deposit": "Y",
843
+ // "Decimals": null,
844
+ // "Priority": "100",
845
+ // "Created": {
846
+ // "unix": "1727552199",
847
+ // "us": "0",
848
+ // "iso": "2024-09-28 19:36:39.000000",
849
+ // "tz": "UTC",
850
+ // "full": "1727552199000000",
851
+ // "unixms": "1727552199000"
852
+ // },
853
+ // "Crypto_Token": {
854
+ // "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
855
+ // "Name": "Bitcoin",
856
+ // "Symbol": "BTC",
857
+ // "Decimals": "8",
858
+ // "CMC_Id": "1",
859
+ // "Priority": "100",
860
+ // "Can_Deposit": "Y",
861
+ // "Category": "token",
862
+ // "Testnet": "N",
863
+ // "Created": {
864
+ // "unix": "1727552113",
865
+ // "us": "0",
866
+ // "iso": "2024-09-28 19:35:13.000000",
867
+ // "tz": "UTC",
868
+ // "full": "1727552113000000",
869
+ // "unixms": "1727552113000"
870
+ // },
871
+ // "Logo": [
872
+ // {
873
+ // "Crypto_Token_Logo__": "ctklg-aoozyr-rzm5-fphf-dhm7-5wbtetha",
874
+ // "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
875
+ // "Blob__": "blob-d6hvgx-37s5-dh5h-ogj5-qxqvnaoy",
876
+ // "Default": "Y",
877
+ // "Format": "png",
878
+ // "Priority": "0",
879
+ // "Created": {
880
+ // "unix": "1730196627",
881
+ // "us": "929660",
882
+ // "iso": "2024-10-29 10:10:27.929660",
883
+ // "tz": "UTC",
884
+ // "full": "1730196627929660",
885
+ // "unixms": "1730196627929"
886
+ // },
887
+ // "Source": {
888
+ // "Media_Image__": "blob-d6hvgx-37s5-dh5h-ogj5-qxqvnaoy",
889
+ // "Url": "https://static.atonline.net/image/m_X7_tnmIYFCwn6EUVQuMKqrCuPB3CMl4ONTegeYpC0wIg68YZM0CuBpbjspnYwz/1a942eab068a2173e66d08c736283cfe22e1c1ed"
890
+ // }
891
+ // }
892
+ // ]
893
+ // },
894
+ // "Crypto_Chain": {
895
+ // "Crypto_Chain__": "chain-xjbini-7wlz-dmzf-gm7z-zf7ei6fq",
896
+ // "EVM_Chain__": null,
897
+ // "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
898
+ // "Name": "Bitcoin",
899
+ // "Key": "bitcoin",
900
+ // "Type": "Bitcoin",
901
+ // "Curve": "secp256k1",
902
+ // "Backend_Url": null,
903
+ // "Wallet_Verification_Methods": {
904
+ // "signature": true
905
+ // },
906
+ // "Block_Margin": "3",
907
+ // "Created": {
908
+ // "unix": "1725340084",
909
+ // "us": "0",
910
+ // "iso": "2024-09-03 05:08:04.000000",
911
+ // "tz": "UTC",
912
+ // "full": "1725340084000000",
913
+ // "unixms": "1725340084000"
914
+ // }
915
+ // }
916
+ // }
917
+ //
918
+ const id = this.safeString(networkEntry, 'Crypto_Token__');
919
+ const token = this.safeDict(networkEntry, 'Crypto_Token', {});
920
+ const code = this.safeCurrencyCode(this.safeString(token, 'Symbol'));
921
+ if (!(code in result)) {
922
+ result[code] = {
923
+ 'id': id,
924
+ 'code': code,
925
+ 'info': [],
926
+ 'type': undefined,
927
+ 'name': this.safeString(token, 'Name'),
928
+ 'active': undefined,
929
+ 'deposit': undefined,
930
+ 'withdraw': undefined,
931
+ 'fee': undefined,
932
+ 'precision': undefined,
933
+ 'limits': {
934
+ 'amount': {
935
+ 'min': undefined,
936
+ 'max': undefined,
937
+ },
938
+ 'withdraw': {
939
+ 'min': undefined,
940
+ 'max': undefined,
941
+ },
942
+ 'deposit': {
943
+ 'min': undefined,
944
+ 'max': undefined,
945
+ },
946
+ },
947
+ 'networks': {},
948
+ };
820
949
  }
950
+ const networkId = this.safeString(networkEntry, 'Crypto_Chain__');
951
+ const cryptoChainDict = this.safeString(networkEntry, 'Crypto_Chain');
952
+ const networkName = this.safeString(cryptoChainDict, 'Type', 'default');
953
+ const networkCode = this.networkIdToCode(networkName);
954
+ result[code]['networks'][networkCode] = {
955
+ 'id': networkId,
956
+ 'network': networkCode,
957
+ 'active': this.safeString(networkEntry, 'Status') === 'valid',
958
+ 'deposit': this.safeString(networkEntry, 'Can_Deposit') === 'Y',
959
+ 'withdraw': undefined,
960
+ 'fee': this.parseNumber(this.parseAmount(networkEntry['Withdraw_Fee'])),
961
+ 'precision': this.parseNumber(this.parsePrecision(this.safeString(token, 'Decimals'))),
962
+ 'limits': {
963
+ 'amount': {
964
+ 'min': undefined,
965
+ 'max': undefined,
966
+ },
967
+ 'withdraw': {
968
+ 'min': this.parseAmount(networkEntry['Minimum_Withdraw']),
969
+ 'max': undefined,
970
+ },
971
+ 'deposit': {
972
+ 'min': this.parseAmount(networkEntry['Minimum_Deposit']),
973
+ 'max': undefined,
974
+ },
975
+ },
976
+ };
977
+ const infos = this.safeList(result[code], 'info', []);
978
+ infos.push(networkEntry);
979
+ result[code]['info'] = infos;
821
980
  }
822
- return currencies;
823
- }
824
- parseCurrency(currency) {
825
- const id = this.safeString(currency, 'Crypto_Token__');
826
- const token = this.safeValue(currency, 'Crypto_Token', {});
827
- const code = this.safeCurrencyCode(this.safeString(token, 'Symbol'));
828
- const name = this.safeString(token, 'Name');
829
- const active = this.safeString(currency, 'Status') === 'valid';
830
- const deposit = this.safeString(currency, 'Can_Deposit') === 'Y';
831
- const withdraw = this.safeString(currency, 'Status') === 'valid';
832
- let fee = undefined;
833
- if (currency['Withdraw_Fee'] !== undefined) {
834
- fee = this.parseNumber(this.parseAmount(currency['Withdraw_Fee']));
835
- }
836
- const precision = this.parseNumber(this.parsePrecision(this.safeString(token, 'Decimals')));
837
- let minDeposit = undefined;
838
- if (currency['Minimum_Deposit'] !== undefined) {
839
- minDeposit = this.parseAmount(currency['Minimum_Deposit']);
840
- }
841
- let minWithdraw = undefined;
842
- if (currency['Minimum_Withdraw'] !== undefined) {
843
- minWithdraw = this.parseAmount(currency['Minimum_Withdraw']);
981
+ // only after all entries are formed in currencies, restructure each entry
982
+ const allKeys = Object.keys(result);
983
+ for (let i = 0; i < allKeys.length; i++) {
984
+ const code = allKeys[i];
985
+ result[code] = this.safeCurrencyStructure(result[code]); // this is needed after adding network entry
844
986
  }
845
- const networkId = this.safeString(currency, 'Crypto_Chain__');
846
- const networkData = this.safeValue(currency, 'Crypto_Chain', {});
847
- const networkCode = this.safeString(networkData, 'Type', 'default');
848
- const networks = {
849
- 'string': undefined,
850
- 'info': networkCode === 'default' ? {} : networkData,
851
- 'id': networkId || id || '',
852
- 'network': networkCode,
853
- 'active': active,
854
- 'deposit': deposit,
855
- 'withdraw': withdraw,
856
- 'fee': fee,
857
- 'precision': precision,
858
- 'limits': {
859
- 'deposit': {
860
- 'min': minDeposit,
861
- 'max': undefined,
862
- },
863
- 'withdraw': {
864
- 'min': minWithdraw,
865
- 'max': undefined,
866
- },
867
- },
868
- };
869
- const result = {
870
- 'info': currency,
871
- 'id': id,
872
- 'code': code,
873
- 'name': name,
874
- 'active': active,
875
- 'deposit': deposit,
876
- 'withdraw': withdraw,
877
- 'fee': fee,
878
- 'precision': precision,
879
- 'type': undefined,
880
- 'limits': {
881
- 'amount': {
882
- 'min': undefined,
883
- 'max': undefined,
884
- },
885
- 'withdraw': {
886
- 'min': minWithdraw,
887
- 'max': undefined,
888
- },
889
- },
890
- 'networks': networks,
891
- };
892
987
  return result;
893
988
  }
894
989
  /**
@@ -1088,14 +1183,14 @@ export default class ellipx extends Exchange {
1088
1183
  for (let i = 0; i < dataArray.length; i++) {
1089
1184
  const entry = dataArray[i];
1090
1185
  const balance = this.safeDict(entry, 'Balance', {});
1091
- const currency = this.safeString(balance, 'currency');
1092
- if (currency !== undefined) {
1186
+ const code = this.safeString(balance, 'currency');
1187
+ if (code !== undefined) {
1093
1188
  const account = {
1094
1189
  'free': this.parseAmount(entry['Unencumbered_Balance']['value_xint']),
1095
1190
  'used': this.parseAmount(entry['Liabilities']['value_xint']),
1096
1191
  'total': this.parseAmount(balance['value_xint']),
1097
1192
  };
1098
- result[currency] = account;
1193
+ result[code] = account;
1099
1194
  }
1100
1195
  }
1101
1196
  return this.safeBalance(result);
@@ -1718,7 +1813,7 @@ export default class ellipx extends Exchange {
1718
1813
  * @name ellipx#withdraw
1719
1814
  * @description Make a withdrawal request
1720
1815
  * @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.zegupoa8g4t9
1721
- * @param {string} code Currency code
1816
+ * @param {string} code unified currency code
1722
1817
  * @param {number} amount Amount to withdraw
1723
1818
  * @param {string} address Destination wallet address
1724
1819
  * @param {string} [tag] Additional tag/memo for currencies that require it
package/js/src/gate.js CHANGED
@@ -1901,7 +1901,7 @@ export default class gate extends Exchange {
1901
1901
  'code': code,
1902
1902
  'type': type,
1903
1903
  'precision': precision,
1904
- 'limits': this.limits,
1904
+ 'limits': undefined,
1905
1905
  'networks': {},
1906
1906
  'info': [], // will be filled below
1907
1907
  };
package/js/src/gemini.js CHANGED
@@ -264,7 +264,7 @@ export default class gemini extends Exchange {
264
264
  'fetchMarketFromWebRetries': 10,
265
265
  'fetchMarketsFromAPI': {
266
266
  'fetchDetailsForAllSymbols': false,
267
- 'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH'],
267
+ 'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH', 'SOL'],
268
268
  },
269
269
  'fetchMarkets': {
270
270
  'webApiEnable': true,
@@ -424,8 +424,6 @@ export default class gemini extends Exchange {
424
424
  let networkCode = undefined;
425
425
  if (networkId !== undefined) {
426
426
  networkCode = this.networkIdToCode(networkId);
427
- }
428
- if (networkCode !== undefined) {
429
427
  networks[networkCode] = {
430
428
  'info': currency,
431
429
  'id': networkId,
@@ -447,7 +445,7 @@ export default class gemini extends Exchange {
447
445
  },
448
446
  };
449
447
  }
450
- result[code] = {
448
+ result[code] = this.safeCurrencyStructure({
451
449
  'info': currency,
452
450
  'id': id,
453
451
  'code': code,
@@ -469,7 +467,7 @@ export default class gemini extends Exchange {
469
467
  },
470
468
  },
471
469
  'networks': networks,
472
- };
470
+ });
473
471
  }
474
472
  return result;
475
473
  }