ccxt 4.4.85__py2.py3-none-any.whl → 4.4.87__py2.py3-none-any.whl

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. ccxt/__init__.py +7 -5
  2. ccxt/abstract/modetrade.py +119 -0
  3. ccxt/abstract/myokx.py +2 -0
  4. ccxt/abstract/okx.py +2 -0
  5. ccxt/abstract/okxus.py +349 -0
  6. ccxt/ascendex.py +187 -151
  7. ccxt/async_support/__init__.py +7 -5
  8. ccxt/async_support/ascendex.py +187 -151
  9. ccxt/async_support/base/exchange.py +30 -26
  10. ccxt/async_support/bequant.py +1 -1
  11. ccxt/async_support/binance.py +1 -1
  12. ccxt/async_support/bitget.py +4 -4
  13. ccxt/async_support/bitmart.py +1 -1
  14. ccxt/async_support/bitteam.py +31 -0
  15. ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
  16. ccxt/async_support/coinbase.py +2 -5
  17. ccxt/async_support/coinmetro.py +3 -0
  18. ccxt/async_support/deribit.py +4 -5
  19. ccxt/async_support/gate.py +91 -73
  20. ccxt/async_support/hollaex.py +106 -49
  21. ccxt/async_support/htx.py +30 -51
  22. ccxt/async_support/hyperliquid.py +36 -20
  23. ccxt/async_support/kraken.py +5 -8
  24. ccxt/async_support/mexc.py +2 -2
  25. ccxt/async_support/modetrade.py +2727 -0
  26. ccxt/async_support/ndax.py +25 -24
  27. ccxt/async_support/okcoin.py +12 -29
  28. ccxt/async_support/okx.py +99 -3
  29. ccxt/async_support/okxus.py +54 -0
  30. ccxt/async_support/onetrading.py +10 -7
  31. ccxt/async_support/oxfun.py +40 -110
  32. ccxt/async_support/paradex.py +6 -0
  33. ccxt/async_support/phemex.py +4 -6
  34. ccxt/async_support/poloniex.py +172 -159
  35. ccxt/async_support/probit.py +18 -47
  36. ccxt/async_support/timex.py +5 -10
  37. ccxt/async_support/vertex.py +3 -4
  38. ccxt/async_support/whitebit.py +41 -11
  39. ccxt/async_support/woo.py +101 -75
  40. ccxt/async_support/woofipro.py +25 -20
  41. ccxt/async_support/xt.py +31 -41
  42. ccxt/base/exchange.py +12 -9
  43. ccxt/bequant.py +1 -1
  44. ccxt/binance.py +1 -1
  45. ccxt/bitget.py +4 -4
  46. ccxt/bitmart.py +1 -1
  47. ccxt/bitteam.py +31 -0
  48. ccxt/{huobijp.py → bittrade.py} +11 -11
  49. ccxt/coinbase.py +2 -5
  50. ccxt/coinmetro.py +3 -0
  51. ccxt/deribit.py +4 -5
  52. ccxt/gate.py +91 -73
  53. ccxt/hollaex.py +106 -49
  54. ccxt/htx.py +30 -51
  55. ccxt/hyperliquid.py +36 -20
  56. ccxt/kraken.py +5 -8
  57. ccxt/mexc.py +2 -2
  58. ccxt/modetrade.py +2727 -0
  59. ccxt/ndax.py +25 -24
  60. ccxt/okcoin.py +12 -29
  61. ccxt/okx.py +99 -3
  62. ccxt/okxus.py +54 -0
  63. ccxt/onetrading.py +10 -7
  64. ccxt/oxfun.py +40 -110
  65. ccxt/paradex.py +6 -0
  66. ccxt/phemex.py +4 -6
  67. ccxt/poloniex.py +172 -159
  68. ccxt/pro/__init__.py +101 -3
  69. ccxt/pro/binance.py +1 -0
  70. ccxt/pro/{huobijp.py → bittrade.py} +3 -3
  71. ccxt/pro/luno.py +6 -5
  72. ccxt/pro/mexc.py +2 -0
  73. ccxt/pro/modetrade.py +1271 -0
  74. ccxt/pro/okxus.py +38 -0
  75. ccxt/probit.py +18 -47
  76. ccxt/test/tests_async.py +17 -1
  77. ccxt/test/tests_sync.py +17 -1
  78. ccxt/timex.py +5 -10
  79. ccxt/vertex.py +3 -4
  80. ccxt/whitebit.py +41 -11
  81. ccxt/woo.py +100 -75
  82. ccxt/woofipro.py +24 -20
  83. ccxt/xt.py +31 -41
  84. {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/METADATA +19 -8
  85. {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/RECORD +89 -84
  86. ccxt/abstract/kuna.py +0 -182
  87. ccxt/async_support/kuna.py +0 -1935
  88. ccxt/kuna.py +0 -1935
  89. /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
  90. {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/LICENSE.txt +0 -0
  91. {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/WHEEL +0 -0
  92. {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/top_level.txt +0 -0
@@ -38,12 +38,18 @@ class bitteam(Exchange, ImplicitAPI):
38
38
  'future': False,
39
39
  'option': False,
40
40
  'addMargin': False,
41
+ 'borrowCrossMargin': False,
42
+ 'borrowIsolatedMargin': False,
41
43
  'borrowMargin': False,
42
44
  'cancelAllOrders': True,
43
45
  'cancelOrder': True,
44
46
  'cancelOrders': False,
47
+ 'closeAllPositions': False,
48
+ 'closePosition': False,
45
49
  'createDepositAddress': False,
46
50
  'createOrder': True,
51
+ 'createOrderWithTakeProfitAndStopLoss': False,
52
+ 'createOrderWithTakeProfitAndStopLossWs': False,
47
53
  'createPostOnlyOrder': False,
48
54
  'createReduceOnlyOrder': False,
49
55
  'createStopLimitOrder': False,
@@ -55,8 +61,11 @@ class bitteam(Exchange, ImplicitAPI):
55
61
  'fetchBalance': True,
56
62
  'fetchBidsAsks': False,
57
63
  'fetchBorrowInterest': False,
64
+ 'fetchBorrowRate': False,
58
65
  'fetchBorrowRateHistories': False,
59
66
  'fetchBorrowRateHistory': False,
67
+ 'fetchBorrowRates': False,
68
+ 'fetchBorrowRatesPerSymbol': False,
60
69
  'fetchCanceledOrders': True,
61
70
  'fetchClosedOrder': False,
62
71
  'fetchClosedOrders': True,
@@ -72,24 +81,42 @@ class bitteam(Exchange, ImplicitAPI):
72
81
  'fetchDepositWithdrawFee': False,
73
82
  'fetchDepositWithdrawFees': False,
74
83
  'fetchFundingHistory': False,
84
+ 'fetchFundingInterval': False,
85
+ 'fetchFundingIntervals': False,
75
86
  'fetchFundingRate': False,
76
87
  'fetchFundingRateHistory': False,
77
88
  'fetchFundingRates': False,
89
+ 'fetchGreeks': False,
78
90
  'fetchIndexOHLCV': False,
79
91
  'fetchIsolatedBorrowRate': False,
80
92
  'fetchIsolatedBorrowRates': False,
93
+ 'fetchIsolatedPositions': False,
81
94
  'fetchL3OrderBook': False,
82
95
  'fetchLedger': False,
83
96
  'fetchLeverage': False,
97
+ 'fetchLeverages': False,
84
98
  'fetchLeverageTiers': False,
99
+ 'fetchLiquidations': False,
100
+ 'fetchLongShortRatio': False,
101
+ 'fetchLongShortRatioHistory': False,
102
+ 'fetchMarginAdjustmentHistory': False,
103
+ 'fetchMarginMode': False,
104
+ 'fetchMarginModes': False,
85
105
  'fetchMarketLeverageTiers': False,
86
106
  'fetchMarkets': True,
87
107
  'fetchMarkOHLCV': False,
108
+ 'fetchMarkPrices': False,
109
+ 'fetchMyLiquidations': False,
110
+ 'fetchMySettlementHistory': False,
88
111
  'fetchMyTrades': True,
89
112
  'fetchOHLCV': True,
113
+ 'fetchOpenInterest': False,
90
114
  'fetchOpenInterestHistory': False,
115
+ 'fetchOpenInterests': False,
91
116
  'fetchOpenOrder': False,
92
117
  'fetchOpenOrders': True,
118
+ 'fetchOption': False,
119
+ 'fetchOptionChain': False,
93
120
  'fetchOrder': True,
94
121
  'fetchOrderBook': True,
95
122
  'fetchOrderBooks': False,
@@ -103,6 +130,7 @@ class bitteam(Exchange, ImplicitAPI):
103
130
  'fetchPositionsHistory': False,
104
131
  'fetchPositionsRisk': False,
105
132
  'fetchPremiumIndexOHLCV': False,
133
+ 'fetchSettlementHistory': False,
106
134
  'fetchStatus': False,
107
135
  'fetchTicker': True,
108
136
  'fetchTickers': True,
@@ -115,10 +143,13 @@ class bitteam(Exchange, ImplicitAPI):
115
143
  'fetchTransactionFees': False,
116
144
  'fetchTransactions': True,
117
145
  'fetchTransfers': False,
146
+ 'fetchVolatilityHistory': False,
118
147
  'fetchWithdrawal': False,
119
148
  'fetchWithdrawals': False,
120
149
  'fetchWithdrawalWhitelist': False,
121
150
  'reduceMargin': False,
151
+ 'repayCrossMargin': False,
152
+ 'repayIsolatedMargin': False,
122
153
  'repayMargin': False,
123
154
  'setLeverage': False,
124
155
  'setMargin': False,
@@ -4,7 +4,7 @@
4
4
  # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
- from ccxt.abstract.huobijp import ImplicitAPI
7
+ from ccxt.abstract.bittrade import ImplicitAPI
8
8
  import hashlib
9
9
  from ccxt.base.types import Account, Any, Balances, Currencies, Currency, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
@@ -27,12 +27,12 @@ from ccxt.base.decimal_to_precision import TICK_SIZE
27
27
  from ccxt.base.precise import Precise
28
28
 
29
29
 
30
- class huobijp(Exchange, ImplicitAPI):
30
+ class bittrade(Exchange, ImplicitAPI):
31
31
 
32
32
  def describe(self) -> Any:
33
- return self.deep_extend(super(huobijp, self).describe(), {
34
- 'id': 'huobijp',
35
- 'name': 'Huobi Japan',
33
+ return self.deep_extend(super(bittrade, self).describe(), {
34
+ 'id': 'bittrade',
35
+ 'name': 'BitTrade',
36
36
  'countries': ['JP'],
37
37
  'rateLimit': 100,
38
38
  'userAgent': self.userAgents['chrome39'],
@@ -108,10 +108,10 @@ class huobijp(Exchange, ImplicitAPI):
108
108
  'v2Public': 'https://{hostname}',
109
109
  'v2Private': 'https://{hostname}',
110
110
  },
111
- 'www': 'https://www.huobi.co.jp',
112
- 'referral': 'https://www.huobi.co.jp/register/?invite_code=znnq3',
113
- 'doc': 'https://api-doc.huobi.co.jp',
114
- 'fees': 'https://www.huobi.co.jp/support/fee',
111
+ 'www': 'https://www.bittrade.co.jp',
112
+ 'referral': 'https://www.bittrade.co.jp/register/?invite_code=znnq3',
113
+ 'doc': 'https://api-doc.bittrade.co.jp',
114
+ 'fees': 'https://www.bittrade.co.jp/ja-jp/support/fee',
115
115
  },
116
116
  'api': {
117
117
  'v2Public': {
@@ -1483,7 +1483,7 @@ class huobijp(Exchange, ImplicitAPI):
1483
1483
  """
1484
1484
  cancels an open order
1485
1485
  :param str id: order id
1486
- :param str symbol: not used by huobijp cancelOrder()
1486
+ :param str symbol: not used by bittrade cancelOrder()
1487
1487
  :param dict [params]: extra parameters specific to the exchange API endpoint
1488
1488
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1489
1489
  """
@@ -1503,7 +1503,7 @@ class huobijp(Exchange, ImplicitAPI):
1503
1503
  """
1504
1504
  cancel multiple orders
1505
1505
  :param str[] ids: order ids
1506
- :param str symbol: not used by huobijp cancelOrders()
1506
+ :param str symbol: not used by bittrade cancelOrders()
1507
1507
  :param dict [params]: extra parameters specific to the exchange API endpoint
1508
1508
  :returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1509
1509
  """
@@ -1425,9 +1425,6 @@ class coinbase(Exchange, ImplicitAPI):
1425
1425
  self.v3PublicGetBrokerageMarketProducts(self.extend(params, {'product_type': 'FUTURE'})),
1426
1426
  self.v3PublicGetBrokerageMarketProducts(self.extend(params, {'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL'})),
1427
1427
  ]
1428
- if self.check_required_credentials(False):
1429
- unresolvedContractPromises.append(self.extend(params, {'product_type': 'FUTURE'}))
1430
- unresolvedContractPromises.append(self.extend(params, {'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL'}))
1431
1428
  except Exception as e:
1432
1429
  unresolvedContractPromises = [] # the sync version of ccxt won't have the promise.all line so the request is made here. Some users can't access perpetual products
1433
1430
  promises = await asyncio.gather(*spotUnresolvedPromises)
@@ -1440,8 +1437,8 @@ class coinbase(Exchange, ImplicitAPI):
1440
1437
  fees = self.safe_dict(promises, 1, {})
1441
1438
  expiringFutures = self.safe_dict(contractPromises, 0, {})
1442
1439
  perpetualFutures = self.safe_dict(contractPromises, 1, {})
1443
- expiringFees = self.safe_dict(contractPromises, 2, {})
1444
- perpetualFees = self.safe_dict(contractPromises, 3, {})
1440
+ expiringFees = self.safe_dict(contractPromises, 0, {})
1441
+ perpetualFees = self.safe_dict(contractPromises, 1, {})
1445
1442
  #
1446
1443
  # {
1447
1444
  # "total_volume": 0,
@@ -394,6 +394,9 @@ class coinmetro(Exchange, ImplicitAPI):
394
394
  elif typeRaw == 'fiat':
395
395
  type = 'fiat'
396
396
  precisionDigits = self.safe_string_2(currency, 'digits', 'notabeneDecimals')
397
+ if code == 'RENDER':
398
+ # RENDER is an exception(with broken info)
399
+ precisionDigits = '4'
397
400
  result[code] = self.safe_currency_structure({
398
401
  'id': id,
399
402
  'code': code,
@@ -640,18 +640,17 @@ class deribit(Exchange, ImplicitAPI):
640
640
  # "testnet": True
641
641
  # }
642
642
  #
643
- data = self.safe_value(response, 'result', {})
643
+ data = self.safe_list(response, 'result', [])
644
644
  result: dict = {}
645
645
  for i in range(0, len(data)):
646
646
  currency = data[i]
647
647
  currencyId = self.safe_string(currency, 'currency')
648
648
  code = self.safe_currency_code(currencyId)
649
- name = self.safe_string(currency, 'currency_long')
650
- result[code] = {
649
+ result[code] = self.safe_currency_structure({
651
650
  'info': currency,
652
651
  'code': code,
653
652
  'id': currencyId,
654
- 'name': name,
653
+ 'name': self.safe_string(currency, 'currency_long'),
655
654
  'active': None,
656
655
  'deposit': None,
657
656
  'withdraw': None,
@@ -673,7 +672,7 @@ class deribit(Exchange, ImplicitAPI):
673
672
  },
674
673
  },
675
674
  'networks': None,
676
- }
675
+ })
677
676
  return result
678
677
 
679
678
  def code_from_options(self, methodName, params={}):
@@ -126,7 +126,7 @@ class gate(Exchange, ImplicitAPI):
126
126
  'fetchCurrencies': True,
127
127
  'fetchDepositAddress': True,
128
128
  'fetchDepositAddresses': False,
129
- 'fetchDepositAddressesByNetwork': False,
129
+ 'fetchDepositAddressesByNetwork': True,
130
130
  'fetchDeposits': True,
131
131
  'fetchDepositWithdrawFee': 'emulated',
132
132
  'fetchDepositWithdrawFees': True,
@@ -735,6 +735,16 @@ class gate(Exchange, ImplicitAPI):
735
735
  },
736
736
  'networksById': {
737
737
  'OPETH': 'OP',
738
+ 'ETH': 'ERC20', # for GOlang
739
+ 'ERC20': 'ERC20',
740
+ 'TRX': 'TRC20',
741
+ 'TRC20': 'TRC20',
742
+ 'HT': 'HRC20',
743
+ 'HECO': 'HRC20',
744
+ 'BSC': 'BEP20',
745
+ 'BEP20': 'BEP20',
746
+ 'POLYGON': 'MATIC',
747
+ 'POL': 'MATIC',
738
748
  },
739
749
  'timeInForce': {
740
750
  'GTC': 'gtc',
@@ -1224,6 +1234,8 @@ class gate(Exchange, ImplicitAPI):
1224
1234
  """
1225
1235
  if self.options['adjustForTimeDifference']:
1226
1236
  await self.load_time_difference()
1237
+ if self.check_required_credentials(False):
1238
+ await self.load_unified_status()
1227
1239
  sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
1228
1240
  rawPromises = [
1229
1241
  self.fetch_contract_markets(params),
@@ -1797,84 +1809,92 @@ class gate(Exchange, ImplicitAPI):
1797
1809
  apiBackup = self.safe_value(self.urls, 'apiBackup')
1798
1810
  if apiBackup is not None:
1799
1811
  return None
1800
- if self.check_required_credentials(False):
1801
- await self.load_unified_status()
1802
1812
  response = await self.publicSpotGetCurrencies(params)
1803
1813
  #
1804
- # [
1805
- # {
1806
- # "currency": "USDT_ETH",
1807
- # "name": "Tether",
1808
- # "delisted": False,
1809
- # "withdraw_disabled": False,
1810
- # "withdraw_delayed": False,
1811
- # "deposit_disabled": False,
1812
- # "trade_disabled": True,
1813
- # "chain": "ETH"
1814
- # },
1815
- # ]
1814
+ # [
1815
+ # {
1816
+ # "currency": "USDT",
1817
+ # "name": "Tether",
1818
+ # "delisted": False,
1819
+ # "withdraw_disabled": False,
1820
+ # "withdraw_delayed": False,
1821
+ # "deposit_disabled": False,
1822
+ # "trade_disabled": False,
1823
+ # "fixed_rate": "",
1824
+ # "chain": "ETH",
1825
+ # "chains": [
1826
+ # {
1827
+ # "name": "ETH",
1828
+ # "addr": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
1829
+ # "withdraw_disabled": False,
1830
+ # "withdraw_delayed": False,
1831
+ # "deposit_disabled": False
1832
+ # },
1833
+ # {
1834
+ # "name": "ARBEVM",
1835
+ # "addr": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
1836
+ # "withdraw_disabled": False,
1837
+ # "withdraw_delayed": False,
1838
+ # "deposit_disabled": False
1839
+ # },
1840
+ # {
1841
+ # "name": "BSC",
1842
+ # "addr": "0x55d398326f99059fF775485246999027B3197955",
1843
+ # "withdraw_disabled": False,
1844
+ # "withdraw_delayed": False,
1845
+ # "deposit_disabled": False
1846
+ # },
1847
+ # ]
1848
+ # },
1849
+ # ]
1816
1850
  #
1817
1851
  indexedCurrencies = self.index_by(response, 'currency')
1818
1852
  result: dict = {}
1819
1853
  for i in range(0, len(response)):
1820
1854
  entry = response[i]
1821
1855
  currencyId = self.safe_string(entry, 'currency')
1822
- parts = currencyId.split('_')
1823
- partFirst = self.safe_string(parts, 0)
1824
- # if there's an underscore then the second part is always the chain name(except the _OLD suffix)
1825
- currencyName = currencyId if currencyId.endswith('_OLD') else partFirst
1826
- withdrawDisabled = self.safe_bool(entry, 'withdraw_disabled', False)
1827
- depositDisabled = self.safe_bool(entry, 'deposit_disabled', False)
1828
- tradeDisabled = self.safe_bool(entry, 'trade_disabled', False)
1829
- precision = self.parse_number('0.0001') # temporary safe default, because no value provided from API
1830
- code = self.safe_currency_code(currencyName)
1856
+ code = self.safe_currency_code(currencyId)
1831
1857
  # check leveraged tokens(e.g. BTC3S, ETH5L)
1832
- isLeveragedToken = False
1833
- if currencyId.endswith('3S') or currencyId.endswith('3L') or currencyId.endswith('5S') or currencyId.endswith('5L'):
1834
- realCurrencyId = currencyId[0:-2]
1835
- if realCurrencyId in indexedCurrencies:
1836
- isLeveragedToken = True
1837
- type = 'leveraged' if isLeveragedToken else 'crypto'
1838
- # some networks are null, they are mostly obsolete & unsupported dead tokens, so we can default their networkId to their tokenname
1839
- networkId = self.safe_string(entry, 'chain', currencyId)
1840
- networkCode = self.network_id_to_code(networkId, code)
1841
- networkEntry = {
1842
- 'info': entry,
1843
- 'id': networkId,
1844
- 'network': networkCode,
1845
- 'limits': {
1846
- 'deposit': {
1847
- 'min': None,
1848
- 'max': None,
1849
- },
1850
- 'withdraw': {
1851
- 'min': None,
1852
- 'max': None,
1858
+ type = 'leveraged' if self.is_leveraged_currency(currencyId, True, indexedCurrencies) else 'crypto'
1859
+ chains = self.safe_list(entry, 'chains', [])
1860
+ networks = {}
1861
+ for j in range(0, len(chains)):
1862
+ chain = chains[j]
1863
+ networkId = self.safe_string(chain, 'name')
1864
+ networkCode = self.network_id_to_code(networkId)
1865
+ networks[networkCode] = {
1866
+ 'info': chain,
1867
+ 'id': networkId,
1868
+ 'network': networkCode,
1869
+ 'active': None,
1870
+ 'deposit': not self.safe_bool(chain, 'deposit_disabled'),
1871
+ 'withdraw': not self.safe_bool(chain, 'withdraw_disabled'),
1872
+ 'fee': None,
1873
+ 'precision': self.parse_number('0.0001'), # temporary safe default, because no value provided from API,
1874
+ 'limits': {
1875
+ 'deposit': {
1876
+ 'min': None,
1877
+ 'max': None,
1878
+ },
1879
+ 'withdraw': {
1880
+ 'min': None,
1881
+ 'max': None,
1882
+ },
1853
1883
  },
1854
- },
1855
- 'active': not tradeDisabled,
1856
- 'deposit': not depositDisabled,
1857
- 'withdraw': not withdrawDisabled,
1858
- 'fee': None,
1859
- 'precision': precision,
1860
- }
1861
- # check if first entry for the specific currency
1862
- if not (code in result):
1863
- result[code] = {
1864
- 'id': currencyName,
1865
- 'lowerCaseId': currencyName.lower(),
1866
- 'code': code,
1867
- 'type': type,
1868
- 'precision': precision,
1869
- 'limits': None,
1870
- 'networks': {},
1871
- 'info': [], # will be filled below
1872
1884
  }
1873
- result[code]['networks'][networkCode] = networkEntry
1874
- info = self.safe_list(result[code], 'info', [])
1875
- info.append(entry)
1876
- result[code]['info'] = info
1877
- result[code] = self.safe_currency_structure(result[code]) # self is needed after adding network entry
1885
+ result[code] = self.safe_currency_structure({
1886
+ 'id': currencyId,
1887
+ 'code': code,
1888
+ 'name': self.safe_string(entry, 'name'),
1889
+ 'type': type,
1890
+ 'active': not self.safe_bool(entry, 'delisted'),
1891
+ 'deposit': not self.safe_bool(entry, 'deposit_disabled'),
1892
+ 'withdraw': not self.safe_bool(entry, 'withdraw_disabled'),
1893
+ 'fee': None,
1894
+ 'networks': networks,
1895
+ 'precision': self.parse_number('0.0001'),
1896
+ 'info': entry,
1897
+ })
1878
1898
  return result
1879
1899
 
1880
1900
  async def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
@@ -2139,9 +2159,7 @@ class gate(Exchange, ImplicitAPI):
2139
2159
  chains = self.safe_value(response, 'multichain_addresses', [])
2140
2160
  currencyId = self.safe_string(response, 'currency')
2141
2161
  currency = self.safe_currency(currencyId, currency)
2142
- parsed = self.parse_deposit_addresses(chains, [currency['code']], False, {
2143
- 'currency': currency['id'],
2144
- })
2162
+ parsed = self.parse_deposit_addresses(chains, None, False)
2145
2163
  return self.index_by(parsed, 'network')
2146
2164
 
2147
2165
  async def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
@@ -2159,8 +2177,8 @@ class gate(Exchange, ImplicitAPI):
2159
2177
  networkCode = None
2160
2178
  networkCode, params = self.handle_network_code_and_params(params)
2161
2179
  chainsIndexedById = await self.fetch_deposit_addresses_by_network(code, params)
2162
- selectedNetworkId = self.select_network_code_from_unified_networks(code, networkCode, chainsIndexedById)
2163
- return chainsIndexedById[selectedNetworkId]
2180
+ selectedNetworkIdOrCode = self.select_network_code_from_unified_networks(code, networkCode, chainsIndexedById)
2181
+ return chainsIndexedById[selectedNetworkIdOrCode]
2164
2182
 
2165
2183
  def parse_deposit_address(self, depositAddress, currency=None):
2166
2184
  #
@@ -292,6 +292,14 @@ class hollaex(Exchange, ImplicitAPI):
292
292
  'BNB': 'bnb',
293
293
  'MATIC': 'matic',
294
294
  },
295
+ 'networksById': {
296
+ 'eth': 'ERC20',
297
+ 'ETH': 'ERC20',
298
+ 'ERC20': 'ERC20',
299
+ 'trx': 'TRC20',
300
+ 'TRX': 'TRC20',
301
+ 'TRC20': 'TRC20',
302
+ },
295
303
  },
296
304
  })
297
305
 
@@ -421,66 +429,115 @@ class hollaex(Exchange, ImplicitAPI):
421
429
  """
422
430
  response = await self.publicGetConstants(params)
423
431
  #
424
- # {
425
- # "coins":{
426
- # "bch":{
427
- # "id":4,
428
- # "fullname":"Bitcoin Cash",
429
- # "symbol":"bch",
430
- # "active":true,
431
- # "verified":true,
432
- # "allow_deposit":true,
433
- # "allow_withdrawal":true,
434
- # "withdrawal_fee":0.0002,
435
- # "min":0.001,
436
- # "max":100000,
437
- # "increment_unit":0.001,
438
- # "logo":"https://bitholla.s3.ap-northeast-2.amazonaws.com/icon/BCH-hollaex-asset-01.svg",
439
- # "code":"bch",
440
- # "is_public":true,
441
- # "meta":{},
442
- # "estimated_price":null,
443
- # "description":null,
444
- # "type":"blockchain",
445
- # "network":null,
446
- # "standard":null,
447
- # "issuer":"HollaEx",
448
- # "withdrawal_fees":null,
449
- # "created_at":"2019-08-09T10:45:43.367Z",
450
- # "updated_at":"2021-12-13T03:08:32.372Z",
451
- # "created_by":1,
452
- # "owner_id":1
453
- # },
432
+ # {
433
+ # "coins": {
434
+ # "usdt": {
435
+ # "id": "6",
436
+ # "fullname": "USD Tether",
437
+ # "symbol": "usdt",
438
+ # "active": True,
439
+ # "verified": True,
440
+ # "allow_deposit": True,
441
+ # "allow_withdrawal": True,
442
+ # "withdrawal_fee": "20",
443
+ # "min": "1",
444
+ # "max": "10000000",
445
+ # "increment_unit": "0.0001",
446
+ # "logo": "https://hollaex-resources.s3.ap-southeast-1.amazonaws.com/icons/usdt.svg",
447
+ # "code": "usdt",
448
+ # "is_public": True,
449
+ # "meta": {
450
+ # "color": "#27a17a",
451
+ # "website": "https://tether.to",
452
+ # "explorer": "https://blockchair.com/tether",
453
+ # "decimal_points": "6"
454
+ # },
455
+ # "estimated_price": "1",
456
+ # "description": "<p>Tether(USDT) is a stablecoin pegged 1:1 to the US dollar. It is a digital currency that aims to maintain its value while allowing for fast and secure transfer of funds. It was the first stablecoin, and is the most widely used due stablecoin due to its stability and low volatility compared to other cryptocurrencies. It was launched in 2014 by Tether Limited.</p>",
457
+ # "type": "blockchain",
458
+ # "network": "eth,trx,bnb,matic",
459
+ # "standard": "",
460
+ # "issuer": "HollaEx",
461
+ # "withdrawal_fees": {
462
+ # "bnb": {
463
+ # "value": "0.8",
464
+ # "active": True,
465
+ # "symbol": "usdt"
466
+ # },
467
+ # "eth": {
468
+ # "value": "1.5",
469
+ # "active": True,
470
+ # "symbol": "usdt"
471
+ # },
472
+ # "trx": {
473
+ # "value": "4",
474
+ # "active": True,
475
+ # "symbol": "usdt"
476
+ # },
477
+ # "matic": {
478
+ # "value": "0.3",
479
+ # "active": True,
480
+ # "symbol": "usdt"
481
+ # }
482
+ # },
483
+ # "display_name": null,
484
+ # "deposit_fees": null,
485
+ # "is_risky": False,
486
+ # "market_cap": "144568098696.29",
487
+ # "category": "stable",
488
+ # "created_at": "2019-08-09T10:45:43.367Z",
489
+ # "updated_at": "2025-03-25T17:12:37.970Z",
490
+ # "created_by": "168",
491
+ # "owner_id": "1"
492
+ # },
454
493
  # },
455
494
  # "network":"https://api.hollaex.network"
456
495
  # }
457
496
  #
458
- coins = self.safe_value(response, 'coins', {})
497
+ coins = self.safe_dict(response, 'coins', {})
459
498
  keys = list(coins.keys())
460
499
  result: dict = {}
461
500
  for i in range(0, len(keys)):
462
501
  key = keys[i]
463
502
  currency = coins[key]
464
503
  id = self.safe_string(currency, 'symbol')
465
- numericId = self.safe_integer(currency, 'id')
466
504
  code = self.safe_currency_code(id)
467
- name = self.safe_string(currency, 'fullname')
468
- depositEnabled = self.safe_value(currency, 'allow_deposit')
469
- withdrawEnabled = self.safe_value(currency, 'allow_withdrawal')
470
- isActive = self.safe_value(currency, 'active')
471
- active = isActive and depositEnabled and withdrawEnabled
472
- fee = self.safe_number(currency, 'withdrawal_fee')
473
- withdrawalLimits = self.safe_value(currency, 'withdrawal_limits', [])
474
- result[code] = {
505
+ withdrawalLimits = self.safe_list(currency, 'withdrawal_limits', [])
506
+ rawType = self.safe_string(currency, 'type')
507
+ type = 'crypto' if (rawType == 'blockchain') else 'other'
508
+ rawNetworks = self.safe_dict(currency, 'withdrawal_fees', {})
509
+ networks = {}
510
+ networkIds = list(rawNetworks.keys())
511
+ for j in range(0, len(networkIds)):
512
+ networkId = networkIds[j]
513
+ networkEntry = self.safe_dict(rawNetworks, networkId)
514
+ networkCode = self.network_id_to_code(networkId)
515
+ networks[networkCode] = {
516
+ 'id': networkId,
517
+ 'network': networkCode,
518
+ 'active': self.safe_bool(networkEntry, 'active'),
519
+ 'deposit': None,
520
+ 'withdraw': None,
521
+ 'fee': self.safe_number(networkEntry, 'value'),
522
+ 'precision': None,
523
+ 'limits': {
524
+ 'withdraw': {
525
+ 'min': None,
526
+ 'max': None,
527
+ },
528
+ },
529
+ 'info': networkEntry,
530
+ }
531
+ result[code] = self.safe_currency_structure({
475
532
  'id': id,
476
- 'numericId': numericId,
533
+ 'numericId': self.safe_integer(currency, 'id'),
477
534
  'code': code,
478
535
  'info': currency,
479
- 'name': name,
480
- 'active': active,
481
- 'deposit': depositEnabled,
482
- 'withdraw': withdrawEnabled,
483
- 'fee': fee,
536
+ 'name': self.safe_string(currency, 'fullname'),
537
+ 'active': self.safe_bool(currency, 'active'),
538
+ 'deposit': self.safe_bool(currency, 'allow_deposit'),
539
+ 'withdraw': self.safe_bool(currency, 'allow_withdrawal'),
540
+ 'fee': self.safe_number(currency, 'withdrawal_fee'),
484
541
  'precision': self.safe_number(currency, 'increment_unit'),
485
542
  'limits': {
486
543
  'amount': {
@@ -492,9 +549,9 @@ class hollaex(Exchange, ImplicitAPI):
492
549
  'max': self.safe_value(withdrawalLimits, 0),
493
550
  },
494
551
  },
495
- 'networks': {},
496
- 'type': 'crypto',
497
- }
552
+ 'networks': networks,
553
+ 'type': type,
554
+ })
498
555
  return result
499
556
 
500
557
  async def fetch_order_books(self, symbols: Strings = None, limit: Int = None, params={}) -> OrderBooks: