ccxt 4.4.82__py2.py3-none-any.whl → 4.4.86__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 (121) hide show
  1. ccxt/__init__.py +3 -9
  2. ccxt/abstract/blofin.py +8 -0
  3. ccxt/abstract/btcbox.py +1 -0
  4. ccxt/abstract/myokx.py +2 -0
  5. ccxt/abstract/okx.py +2 -0
  6. ccxt/apex.py +2 -1
  7. ccxt/ascendex.py +187 -151
  8. ccxt/async_support/__init__.py +3 -9
  9. ccxt/async_support/apex.py +2 -1
  10. ccxt/async_support/ascendex.py +187 -151
  11. ccxt/async_support/base/exchange.py +51 -24
  12. ccxt/async_support/base/ws/cache.py +6 -1
  13. ccxt/async_support/bequant.py +1 -1
  14. ccxt/async_support/bitget.py +5 -6
  15. ccxt/async_support/bitmart.py +1 -1
  16. ccxt/async_support/bitrue.py +14 -32
  17. ccxt/async_support/bitso.py +33 -0
  18. ccxt/async_support/bitstamp.py +33 -0
  19. ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
  20. ccxt/async_support/blofin.py +145 -14
  21. ccxt/async_support/btcbox.py +25 -5
  22. ccxt/async_support/bybit.py +16 -37
  23. ccxt/async_support/cex.py +2 -4
  24. ccxt/async_support/coinbase.py +58 -47
  25. ccxt/async_support/coinbaseexchange.py +141 -32
  26. ccxt/async_support/coincatch.py +14 -67
  27. ccxt/async_support/coinex.py +28 -29
  28. ccxt/async_support/coinlist.py +17 -16
  29. ccxt/async_support/coinmetro.py +20 -11
  30. ccxt/async_support/coinone.py +8 -10
  31. ccxt/async_support/coinsph.py +124 -2
  32. ccxt/async_support/cryptocom.py +109 -2
  33. ccxt/async_support/cryptomus.py +42 -80
  34. ccxt/async_support/delta.py +75 -36
  35. ccxt/async_support/deribit.py +4 -5
  36. ccxt/async_support/derive.py +46 -10
  37. ccxt/async_support/ellipx.py +175 -77
  38. ccxt/async_support/gate.py +1 -1
  39. ccxt/async_support/gemini.py +3 -4
  40. ccxt/async_support/hitbtc.py +56 -65
  41. ccxt/async_support/hollaex.py +106 -49
  42. ccxt/async_support/htx.py +20 -43
  43. ccxt/async_support/hyperliquid.py +6 -6
  44. ccxt/async_support/kraken.py +27 -23
  45. ccxt/async_support/kucoinfutures.py +5 -0
  46. ccxt/async_support/lbank.py +1 -1
  47. ccxt/async_support/mexc.py +2 -2
  48. ccxt/async_support/ndax.py +25 -24
  49. ccxt/async_support/okcoin.py +12 -29
  50. ccxt/async_support/okx.py +9 -0
  51. ccxt/async_support/onetrading.py +10 -7
  52. ccxt/async_support/oxfun.py +40 -110
  53. ccxt/async_support/paradex.py +123 -4
  54. ccxt/base/exchange.py +21 -2
  55. ccxt/base/types.py +3 -0
  56. ccxt/bequant.py +1 -1
  57. ccxt/bitget.py +5 -6
  58. ccxt/bitmart.py +1 -1
  59. ccxt/bitrue.py +14 -32
  60. ccxt/bitso.py +33 -0
  61. ccxt/bitstamp.py +33 -0
  62. ccxt/{huobijp.py → bittrade.py} +11 -11
  63. ccxt/blofin.py +145 -14
  64. ccxt/btcbox.py +24 -5
  65. ccxt/bybit.py +16 -37
  66. ccxt/cex.py +2 -4
  67. ccxt/coinbase.py +58 -47
  68. ccxt/coinbaseexchange.py +141 -32
  69. ccxt/coincatch.py +14 -67
  70. ccxt/coinex.py +28 -29
  71. ccxt/coinlist.py +17 -16
  72. ccxt/coinmetro.py +20 -11
  73. ccxt/coinone.py +8 -10
  74. ccxt/coinsph.py +124 -2
  75. ccxt/cryptocom.py +109 -2
  76. ccxt/cryptomus.py +42 -80
  77. ccxt/delta.py +75 -36
  78. ccxt/deribit.py +4 -5
  79. ccxt/derive.py +46 -10
  80. ccxt/ellipx.py +175 -77
  81. ccxt/gate.py +1 -1
  82. ccxt/gemini.py +3 -4
  83. ccxt/hitbtc.py +56 -65
  84. ccxt/hollaex.py +106 -49
  85. ccxt/htx.py +20 -43
  86. ccxt/hyperliquid.py +6 -6
  87. ccxt/kraken.py +27 -23
  88. ccxt/kucoinfutures.py +5 -0
  89. ccxt/lbank.py +1 -1
  90. ccxt/mexc.py +2 -2
  91. ccxt/ndax.py +25 -24
  92. ccxt/okcoin.py +12 -29
  93. ccxt/okx.py +9 -0
  94. ccxt/onetrading.py +10 -7
  95. ccxt/oxfun.py +40 -110
  96. ccxt/paradex.py +123 -4
  97. ccxt/pro/__init__.py +109 -5
  98. ccxt/pro/binance.py +32 -33
  99. ccxt/pro/bithumb.py +5 -3
  100. ccxt/pro/{huobijp.py → bittrade.py} +3 -3
  101. ccxt/pro/kraken.py +249 -79
  102. ccxt/pro/luno.py +6 -5
  103. ccxt/pro/mexc.py +254 -7
  104. ccxt/pro/poloniex.py +6 -2
  105. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/METADATA +8 -11
  106. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/RECORD +110 -121
  107. ccxt/abstract/bl3p.py +0 -19
  108. ccxt/abstract/idex.py +0 -26
  109. ccxt/abstract/kuna.py +0 -182
  110. ccxt/async_support/base/ws/fast_client.py +0 -97
  111. ccxt/async_support/bl3p.py +0 -543
  112. ccxt/async_support/idex.py +0 -1889
  113. ccxt/async_support/kuna.py +0 -1935
  114. ccxt/bl3p.py +0 -543
  115. ccxt/idex.py +0 -1889
  116. ccxt/kuna.py +0 -1935
  117. ccxt/pro/idex.py +0 -687
  118. /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
  119. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/LICENSE.txt +0 -0
  120. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/WHEEL +0 -0
  121. {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/top_level.txt +0 -0
ccxt/btcbox.py CHANGED
@@ -115,6 +115,18 @@ class btcbox(Exchange, ImplicitAPI):
115
115
  'wallet',
116
116
  ],
117
117
  },
118
+ 'webApi': {
119
+ 'get': [
120
+ 'ajax/coin/coinInfo',
121
+ ],
122
+ },
123
+ },
124
+ 'options': {
125
+ 'fetchMarkets': {
126
+ 'webApiEnable': True, # fetches from WEB
127
+ 'webApiRetries': 3,
128
+ },
129
+ 'amountPrecision': '0.0001', # exchange has only few pairs and all of them
118
130
  },
119
131
  'features': {
120
132
  'spot': {
@@ -198,9 +210,12 @@ class btcbox(Exchange, ImplicitAPI):
198
210
  :param dict [params]: extra parameters specific to the exchange API endpoint
199
211
  :returns dict[]: an array of objects representing market data
200
212
  """
201
- response = self.publicGetTickers()
213
+ promise1 = self.publicGetTickers()
214
+ promise2 = self.fetch_web_endpoint('fetchMarkets', 'webApiGetAjaxCoinCoinInfo', True)
215
+ response1, response2 = [promise1, promise2]
202
216
  #
203
- marketIds = list(response.keys())
217
+ result2Data = self.safe_dict(response2, 'data', {})
218
+ marketIds = list(response1.keys())
204
219
  markets = []
205
220
  for i in range(0, len(marketIds)):
206
221
  marketId = marketIds[i]
@@ -209,9 +224,11 @@ class btcbox(Exchange, ImplicitAPI):
209
224
  quote = self.safe_string(symbolParts, 1)
210
225
  quoteId = quote.lower()
211
226
  id = baseCurr.lower()
212
- res = response[marketId]
227
+ res = response1[marketId]
213
228
  symbol = baseCurr + '/' + quote
214
229
  fee = self.parse_number('0.0005') if (id == 'BTC') else self.parse_number('0.0010')
230
+ details = self.safe_dict(result2Data, id, {})
231
+ tradeDetails = self.safe_dict(details, 'trade', {})
215
232
  markets.append(self.safe_market_structure({
216
233
  'id': id,
217
234
  'uppercaseId': None,
@@ -257,10 +274,10 @@ class btcbox(Exchange, ImplicitAPI):
257
274
  },
258
275
  },
259
276
  'precision': {
260
- 'price': None,
277
+ 'price': self.parse_number(self.parse_precision(self.safe_string(tradeDetails, 'pricedecimal'))),
261
278
  'amount': None,
262
279
  },
263
- 'active': None,
280
+ 'active': self.safe_string(tradeDetails, 'enable') == '1',
264
281
  'created': None,
265
282
  'info': res,
266
283
  }))
@@ -717,6 +734,8 @@ class btcbox(Exchange, ImplicitAPI):
717
734
  if api == 'public':
718
735
  if params:
719
736
  url += '?' + self.urlencode(params)
737
+ elif api == 'webApi':
738
+ url = self.urls['www'] + '/' + path
720
739
  else:
721
740
  self.check_required_credentials()
722
741
  nonce = str(self.nonce())
ccxt/bybit.py CHANGED
@@ -1634,78 +1634,57 @@ class bybit(Exchange, ImplicitAPI):
1634
1634
  name = self.safe_string(currency, 'name')
1635
1635
  chains = self.safe_list(currency, 'chains', [])
1636
1636
  networks: dict = {}
1637
- minPrecision = None
1638
- minWithdrawFeeString = None
1639
- minWithdrawString = None
1640
- minDepositString = None
1641
- deposit = False
1642
- withdraw = False
1643
1637
  for j in range(0, len(chains)):
1644
1638
  chain = chains[j]
1645
1639
  networkId = self.safe_string(chain, 'chain')
1646
1640
  networkCode = self.network_id_to_code(networkId)
1647
- precision = self.parse_number(self.parse_precision(self.safe_string(chain, 'minAccuracy')))
1648
- minPrecision = precision if (minPrecision is None) else min(minPrecision, precision)
1649
- depositAllowed = self.safe_integer(chain, 'chainDeposit') == 1
1650
- deposit = depositAllowed if (depositAllowed) else deposit
1651
- withdrawAllowed = self.safe_integer(chain, 'chainWithdraw') == 1
1652
- withdraw = withdrawAllowed if (withdrawAllowed) else withdraw
1653
- withdrawFeeString = self.safe_string(chain, 'withdrawFee')
1654
- if withdrawFeeString is not None:
1655
- minWithdrawFeeString = withdrawFeeString if (minWithdrawFeeString is None) else Precise.string_min(withdrawFeeString, minWithdrawFeeString)
1656
- minNetworkWithdrawString = self.safe_string(chain, 'withdrawMin')
1657
- if minNetworkWithdrawString is not None:
1658
- minWithdrawString = minNetworkWithdrawString if (minWithdrawString is None) else Precise.string_min(minNetworkWithdrawString, minWithdrawString)
1659
- minNetworkDepositString = self.safe_string(chain, 'depositMin')
1660
- if minNetworkDepositString is not None:
1661
- minDepositString = minNetworkDepositString if (minDepositString is None) else Precise.string_min(minNetworkDepositString, minDepositString)
1662
1641
  networks[networkCode] = {
1663
1642
  'info': chain,
1664
1643
  'id': networkId,
1665
1644
  'network': networkCode,
1666
- 'active': depositAllowed and withdrawAllowed,
1667
- 'deposit': depositAllowed,
1668
- 'withdraw': withdrawAllowed,
1669
- 'fee': self.parse_number(withdrawFeeString),
1670
- 'precision': precision,
1645
+ 'active': None,
1646
+ 'deposit': self.safe_integer(chain, 'chainDeposit') == 1,
1647
+ 'withdraw': self.safe_integer(chain, 'chainWithdraw') == 1,
1648
+ 'fee': self.safe_number(chain, 'withdrawFee'),
1649
+ 'precision': self.parse_number(self.parse_precision(self.safe_string(chain, 'minAccuracy'))),
1671
1650
  'limits': {
1672
1651
  'withdraw': {
1673
- 'min': self.parse_number(minNetworkWithdrawString),
1652
+ 'min': self.safe_number(chain, 'withdrawMin'),
1674
1653
  'max': None,
1675
1654
  },
1676
1655
  'deposit': {
1677
- 'min': self.parse_number(minNetworkDepositString),
1656
+ 'min': self.safe_number(chain, 'depositMin'),
1678
1657
  'max': None,
1679
1658
  },
1680
1659
  },
1681
1660
  }
1682
- result[code] = {
1661
+ result[code] = self.safe_currency_structure({
1683
1662
  'info': currency,
1684
1663
  'code': code,
1685
1664
  'id': currencyId,
1686
1665
  'name': name,
1687
- 'active': deposit and withdraw,
1688
- 'deposit': deposit,
1689
- 'withdraw': withdraw,
1690
- 'fee': self.parse_number(minWithdrawFeeString),
1691
- 'precision': minPrecision,
1666
+ 'active': None,
1667
+ 'deposit': None,
1668
+ 'withdraw': None,
1669
+ 'fee': None,
1670
+ 'precision': None,
1692
1671
  'limits': {
1693
1672
  'amount': {
1694
1673
  'min': None,
1695
1674
  'max': None,
1696
1675
  },
1697
1676
  'withdraw': {
1698
- 'min': self.parse_number(minWithdrawString),
1677
+ 'min': None,
1699
1678
  'max': None,
1700
1679
  },
1701
1680
  'deposit': {
1702
- 'min': self.parse_number(minDepositString),
1681
+ 'min': None,
1703
1682
  'max': None,
1704
1683
  },
1705
1684
  },
1706
1685
  'networks': networks,
1707
1686
  'type': 'crypto', # atm exchange api provides only cryptos
1708
- }
1687
+ })
1709
1688
  return result
1710
1689
 
1711
1690
  def fetch_markets(self, params={}) -> List[Market]:
ccxt/cex.py CHANGED
@@ -310,8 +310,6 @@ class cex(Exchange, ImplicitAPI):
310
310
  id = self.safe_string(rawCurrency, 'currency')
311
311
  code = self.safe_currency_code(id)
312
312
  type = 'fiat' if self.safe_bool(rawCurrency, 'fiat') else 'crypto'
313
- currencyDepositEnabled = self.safe_bool(rawCurrency, 'walletDeposit')
314
- currencyWithdrawEnabled = self.safe_bool(rawCurrency, 'walletWithdrawal')
315
313
  currencyPrecision = self.parse_number(self.parse_precision(self.safe_string(rawCurrency, 'precision')))
316
314
  networks: dict = {}
317
315
  rawNetworks = self.safe_dict(rawCurrency, 'blockchains', {})
@@ -349,8 +347,8 @@ class cex(Exchange, ImplicitAPI):
349
347
  'name': None,
350
348
  'type': type,
351
349
  'active': None,
352
- 'deposit': currencyDepositEnabled,
353
- 'withdraw': currencyWithdrawEnabled,
350
+ 'deposit': self.safe_bool(rawCurrency, 'walletDeposit'),
351
+ 'withdraw': self.safe_bool(rawCurrency, 'walletWithdrawal'),
354
352
  'fee': None,
355
353
  'precision': currencyPrecision,
356
354
  'limits': {
ccxt/coinbase.py CHANGED
@@ -1424,9 +1424,6 @@ class coinbase(Exchange, ImplicitAPI):
1424
1424
  self.v3PublicGetBrokerageMarketProducts(self.extend(params, {'product_type': 'FUTURE'})),
1425
1425
  self.v3PublicGetBrokerageMarketProducts(self.extend(params, {'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL'})),
1426
1426
  ]
1427
- if self.check_required_credentials(False):
1428
- unresolvedContractPromises.append(self.extend(params, {'product_type': 'FUTURE'}))
1429
- unresolvedContractPromises.append(self.extend(params, {'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL'}))
1430
1427
  except Exception as e:
1431
1428
  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
1432
1429
  promises = spotUnresolvedPromises
@@ -1439,8 +1436,8 @@ class coinbase(Exchange, ImplicitAPI):
1439
1436
  fees = self.safe_dict(promises, 1, {})
1440
1437
  expiringFutures = self.safe_dict(contractPromises, 0, {})
1441
1438
  perpetualFutures = self.safe_dict(contractPromises, 1, {})
1442
- expiringFees = self.safe_dict(contractPromises, 2, {})
1443
- perpetualFees = self.safe_dict(contractPromises, 3, {})
1439
+ expiringFees = self.safe_dict(contractPromises, 0, {})
1440
+ perpetualFees = self.safe_dict(contractPromises, 1, {})
1444
1441
  #
1445
1442
  # {
1446
1443
  # "total_volume": 0,
@@ -1832,45 +1829,46 @@ class coinbase(Exchange, ImplicitAPI):
1832
1829
  :param dict [params]: extra parameters specific to the exchange API endpoint
1833
1830
  :returns dict: an associative dictionary of currencies
1834
1831
  """
1835
- response = self.fetch_currencies_from_cache(params)
1836
- currencies = self.safe_list(response, 'currencies', [])
1837
- #
1838
- # fiat
1839
- #
1840
- # {
1841
- # id: 'IMP',
1842
- # name: 'Isle of Man Pound',
1843
- # min_size: '0.01'
1844
- # },
1845
- #
1846
- # crypto
1847
- #
1848
- # {
1849
- # asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
1850
- # code: 'AERO',
1851
- # name: 'Aerodrome Finance',
1852
- # color: '#0433FF',
1853
- # sort_index: '340',
1854
- # exponent: '8',
1855
- # type: 'crypto',
1856
- # address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
1857
- # }
1832
+ promises = [
1833
+ self.v2PublicGetCurrencies(params),
1834
+ self.v2PublicGetCurrenciesCrypto(params),
1835
+ self.v2PublicGetExchangeRates(params),
1836
+ ]
1837
+ promisesResult = promises
1838
+ fiatResponse = self.safe_dict(promisesResult, 0, {})
1858
1839
  #
1840
+ # [
1841
+ # "data": [
1842
+ # {
1843
+ # id: 'IMP',
1844
+ # name: 'Isle of Man Pound',
1845
+ # min_size: '0.01'
1846
+ # },
1847
+ # ...
1859
1848
  #
1860
- # {
1861
- # "data":{
1862
- # "currency":"USD",
1863
- # "rates":{
1864
- # "AED":"3.67",
1865
- # "AFN":"78.21",
1866
- # "ALL":"110.42",
1867
- # "AMD":"474.18",
1868
- # "ANG":"1.75",
1869
- # ...
1870
- # },
1871
- # }
1872
- # }
1849
+ cryptoResponse = self.safe_dict(promisesResult, 1, {})
1873
1850
  #
1851
+ # [
1852
+ # "data": [
1853
+ # {
1854
+ # asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
1855
+ # code: 'AERO',
1856
+ # name: 'Aerodrome Finance',
1857
+ # color: '#0433FF',
1858
+ # sort_index: '340',
1859
+ # exponent: '8',
1860
+ # type: 'crypto',
1861
+ # address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
1862
+ # },
1863
+ # ...
1864
+ #
1865
+ ratesResponse = self.safe_dict(promisesResult, 2, {})
1866
+ fiatData = self.safe_list(fiatResponse, 'data', [])
1867
+ cryptoData = self.safe_list(cryptoResponse, 'data', [])
1868
+ ratesData = self.safe_dict(ratesResponse, 'data', {})
1869
+ rates = self.safe_dict(ratesData, 'rates', {})
1870
+ ratesIds = list(rates.keys())
1871
+ currencies = self.array_concat(fiatData, cryptoData)
1874
1872
  result: dict = {}
1875
1873
  networks: dict = {}
1876
1874
  networksById: dict = {}
@@ -1882,18 +1880,19 @@ class coinbase(Exchange, ImplicitAPI):
1882
1880
  name = self.safe_string(currency, 'name')
1883
1881
  self.options['networks'][code] = name.lower()
1884
1882
  self.options['networksById'][code] = name.lower()
1885
- result[code] = {
1886
- 'info': currency, # the original payload
1883
+ type = 'crypto' if (assetId is not None) else 'fiat'
1884
+ result[code] = self.safe_currency_structure({
1885
+ 'info': currency,
1887
1886
  'id': id,
1888
1887
  'code': code,
1889
- 'type': 'crypto' if (assetId is not None) else 'fiat',
1890
- 'name': self.safe_string(currency, 'name'),
1888
+ 'type': type,
1889
+ 'name': name,
1891
1890
  'active': True,
1892
1891
  'deposit': None,
1893
1892
  'withdraw': None,
1894
1893
  'fee': None,
1895
1894
  'precision': None,
1896
- 'networks': {},
1895
+ 'networks': {}, # todo
1897
1896
  'limits': {
1898
1897
  'amount': {
1899
1898
  'min': self.safe_number(currency, 'min_size'),
@@ -1904,11 +1903,23 @@ class coinbase(Exchange, ImplicitAPI):
1904
1903
  'max': None,
1905
1904
  },
1906
1905
  },
1907
- }
1906
+ })
1908
1907
  if assetId is not None:
1909
1908
  lowerCaseName = name.lower()
1910
1909
  networks[code] = lowerCaseName
1911
1910
  networksById[lowerCaseName] = code
1911
+ # we have to add other currencies here( https://discord.com/channels/1220414409550336183/1220464770239430761/1372215891940479098 )
1912
+ for i in range(0, len(ratesIds)):
1913
+ currencyId = ratesIds[i]
1914
+ code = self.safe_currency_code(currencyId)
1915
+ if not (code in result):
1916
+ result[code] = self.safe_currency_structure({
1917
+ 'info': {},
1918
+ 'id': currencyId,
1919
+ 'code': code,
1920
+ 'type': 'crypto',
1921
+ 'networks': {}, # todo
1922
+ })
1912
1923
  self.options['networks'] = self.extend(networks, self.options['networks'])
1913
1924
  self.options['networksById'] = self.extend(networksById, self.options['networksById'])
1914
1925
  return result
ccxt/coinbaseexchange.py CHANGED
@@ -307,6 +307,78 @@ class coinbaseexchange(Exchange, ImplicitAPI):
307
307
  'inverse': None,
308
308
  },
309
309
  },
310
+ 'options': {
311
+ 'networks': {
312
+ 'BTC': 'bitcoin',
313
+ # LIGHTNING unsupported
314
+ 'ETH': 'ethereum',
315
+ # TRON unsupported
316
+ 'SOL': 'solana',
317
+ # BSC unsupported
318
+ 'ARBONE': 'arbitrum',
319
+ 'AVAXC': 'avacchain',
320
+ 'MATIC': 'polygon',
321
+ 'BASE': 'base',
322
+ 'SUI': 'sui',
323
+ 'OP': 'optimism',
324
+ 'NEAR': 'near',
325
+ # CRONOS unsupported
326
+ # GNO unsupported
327
+ 'APT': 'aptos',
328
+ # SCROLL unsupported
329
+ 'KAVA': 'kava',
330
+ # TAIKO unsupported
331
+ # BOB unsupported
332
+ # LINEA unsupported
333
+ 'BLAST': 'blast',
334
+ 'XLM': 'stellar',
335
+ # RSK unsupported
336
+ 'SEI': 'sei',
337
+ # TON unsupported
338
+ # MANTLE unsupported
339
+ 'ADA': 'cardano',
340
+ # HYPE unsupported
341
+ 'CORE': 'coredao',
342
+ 'ALGO': 'algorand',
343
+ # RUNE unsupported
344
+ 'OSMO': 'osmosis',
345
+ # XIN unsupported
346
+ 'CELO': 'celo',
347
+ 'HBAR': 'hedera',
348
+ # FTM unsupported
349
+ # WEMIX unsupported
350
+ 'ZKSYNC': 'zksync',
351
+ # KLAY unsupported
352
+ # HT unsupported
353
+ # FSN unsupported
354
+ # EOS unsupported, eosio?
355
+ # ACA unsupported
356
+ 'STX': 'stacks',
357
+ 'XTZ': 'tezos',
358
+ # NEO unsupported
359
+ # METIS unsupported
360
+ # TLOS unsupported
361
+ 'EGLD': 'elrond',
362
+ # ASTR unsupported
363
+ # CFX unsupported
364
+ # GLMR unsupported
365
+ # CANTO unsupported
366
+ # SCRT unsupported
367
+ 'LTC': 'litecoin',
368
+ # AURORA unsupported
369
+ # ONG unsupported
370
+ 'ATOM': 'cosmos',
371
+ # CHZ unsupported
372
+ 'FIL': 'filecoin',
373
+ 'DOT': 'polkadot',
374
+ 'DOGE': 'dogecoin',
375
+ # BRC20 unsupported
376
+ 'XRP': 'ripple',
377
+ # XMR unsupported
378
+ 'DASH': 'dash',
379
+ # akash, aleo, axelar, bitcoincash, berachain, deso, ethereumclassic, unichain, flow, flare, dfinity, story,kusama, mina, ronin, oasis, bittensor, celestia, noble, vara, vechain, zcash, horizen, zetachain
380
+ },
381
+ },
310
382
  'exceptions': {
311
383
  'exact': {
312
384
  'Insufficient funds': InsufficientFunds,
@@ -342,30 +414,45 @@ class coinbaseexchange(Exchange, ImplicitAPI):
342
414
  """
343
415
  response = self.publicGetCurrencies(params)
344
416
  #
345
- # [
346
- # {
347
- # "id": "XTZ",
348
- # "name": "Tezos",
349
- # "min_size": "0.000001",
350
- # "status": "online",
351
- # "message": '',
352
- # "max_precision": "0.000001",
353
- # "convertible_to": [],
354
- # "details": {
355
- # "type": "crypto",
356
- # "symbol": "Τ",
357
- # "network_confirmations": 60,
358
- # "sort_order": 53,
359
- # "crypto_address_link": "https://tzstats.com/{{address}}",
360
- # "crypto_transaction_link": "https://tzstats.com/{{txId}}",
361
- # "push_payment_methods": ["crypto"],
362
- # "group_types": [],
363
- # "display_name": '',
364
- # "processing_time_seconds": 0,
365
- # "min_withdrawal_amount": 1
366
- # }
367
- # }
368
- # ]
417
+ # {
418
+ # "id": "USDT",
419
+ # "name": "Tether",
420
+ # "min_size": "0.000001",
421
+ # "status": "online",
422
+ # "message": "",
423
+ # "max_precision": "0.000001",
424
+ # "convertible_to": [],
425
+ # "details": {
426
+ # "type": "crypto",
427
+ # "symbol": null,
428
+ # "network_confirmations": 14,
429
+ # "sort_order": 0,
430
+ # "crypto_address_link": "https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7?a={{address}}",
431
+ # "crypto_transaction_link": "https://etherscan.io/tx/0x{{txId}}",
432
+ # "push_payment_methods": [],
433
+ # "group_types": [],
434
+ # "display_name": null,
435
+ # "processing_time_seconds": null,
436
+ # "min_withdrawal_amount": 0.000001,
437
+ # "max_withdrawal_amount": 20000000
438
+ # },
439
+ # "default_network": "ethereum",
440
+ # "supported_networks": [
441
+ # {
442
+ # "id": "ethereum",
443
+ # "name": "Ethereum",
444
+ # "status": "online",
445
+ # "contract_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
446
+ # "crypto_address_link": "https://etherscan.io/token/0xdac17f958d2ee523a2206206994597c13d831ec7?a={{address}}",
447
+ # "crypto_transaction_link": "https://etherscan.io/tx/0x{{txId}}",
448
+ # "min_withdrawal_amount": 0.000001,
449
+ # "max_withdrawal_amount": 20000000,
450
+ # "network_confirmations": 14,
451
+ # "processing_time_seconds": null
452
+ # }
453
+ # ],
454
+ # "display_name": "USDT"
455
+ # }
369
456
  #
370
457
  result: dict = {}
371
458
  for i in range(0, len(response)):
@@ -373,16 +460,38 @@ class coinbaseexchange(Exchange, ImplicitAPI):
373
460
  id = self.safe_string(currency, 'id')
374
461
  name = self.safe_string(currency, 'name')
375
462
  code = self.safe_currency_code(id)
376
- details = self.safe_value(currency, 'details', {})
377
- status = self.safe_string(currency, 'status')
378
- active = (status == 'online')
379
- result[code] = {
463
+ details = self.safe_dict(currency, 'details', {})
464
+ networks: dict = {}
465
+ supportedNetworks = self.safe_list(currency, 'supported_networks', [])
466
+ for j in range(0, len(supportedNetworks)):
467
+ network = supportedNetworks[j]
468
+ networkId = self.safe_string(network, 'id')
469
+ networkCode = self.network_id_to_code(networkId)
470
+ networks[networkCode] = {
471
+ 'id': networkId,
472
+ 'name': self.safe_string(network, 'name'),
473
+ 'network': networkCode,
474
+ 'active': self.safe_string(network, 'status') == 'online',
475
+ 'withdraw': None,
476
+ 'deposit': None,
477
+ 'fee': None,
478
+ 'precision': None,
479
+ 'limits': {
480
+ 'withdraw': {
481
+ 'min': self.safe_number(network, 'min_withdrawal_amount'),
482
+ 'max': self.safe_number(network, 'max_withdrawal_amount'),
483
+ },
484
+ },
485
+ 'contract': self.safe_string(network, 'contract_address'),
486
+ 'info': network,
487
+ }
488
+ result[code] = self.safe_currency_structure({
380
489
  'id': id,
381
490
  'code': code,
382
491
  'info': currency,
383
492
  'type': self.safe_string(details, 'type'),
384
493
  'name': name,
385
- 'active': active,
494
+ 'active': self.safe_string(currency, 'status') == 'online',
386
495
  'deposit': None,
387
496
  'withdraw': None,
388
497
  'fee': None,
@@ -394,11 +503,11 @@ class coinbaseexchange(Exchange, ImplicitAPI):
394
503
  },
395
504
  'withdraw': {
396
505
  'min': self.safe_number(details, 'min_withdrawal_amount'),
397
- 'max': None,
506
+ 'max': self.safe_number(details, 'max_withdrawal_amount'),
398
507
  },
399
508
  },
400
- 'networks': {},
401
- }
509
+ 'networks': networks,
510
+ })
402
511
  return result
403
512
 
404
513
  def fetch_markets(self, params={}) -> List[Market]: