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.
- ccxt/__init__.py +3 -9
- ccxt/abstract/blofin.py +8 -0
- ccxt/abstract/btcbox.py +1 -0
- ccxt/abstract/myokx.py +2 -0
- ccxt/abstract/okx.py +2 -0
- ccxt/apex.py +2 -1
- ccxt/ascendex.py +187 -151
- ccxt/async_support/__init__.py +3 -9
- ccxt/async_support/apex.py +2 -1
- ccxt/async_support/ascendex.py +187 -151
- ccxt/async_support/base/exchange.py +51 -24
- ccxt/async_support/base/ws/cache.py +6 -1
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/bitget.py +5 -6
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitrue.py +14 -32
- ccxt/async_support/bitso.py +33 -0
- ccxt/async_support/bitstamp.py +33 -0
- ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
- ccxt/async_support/blofin.py +145 -14
- ccxt/async_support/btcbox.py +25 -5
- ccxt/async_support/bybit.py +16 -37
- ccxt/async_support/cex.py +2 -4
- ccxt/async_support/coinbase.py +58 -47
- ccxt/async_support/coinbaseexchange.py +141 -32
- ccxt/async_support/coincatch.py +14 -67
- ccxt/async_support/coinex.py +28 -29
- ccxt/async_support/coinlist.py +17 -16
- ccxt/async_support/coinmetro.py +20 -11
- ccxt/async_support/coinone.py +8 -10
- ccxt/async_support/coinsph.py +124 -2
- ccxt/async_support/cryptocom.py +109 -2
- ccxt/async_support/cryptomus.py +42 -80
- ccxt/async_support/delta.py +75 -36
- ccxt/async_support/deribit.py +4 -5
- ccxt/async_support/derive.py +46 -10
- ccxt/async_support/ellipx.py +175 -77
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/gemini.py +3 -4
- ccxt/async_support/hitbtc.py +56 -65
- ccxt/async_support/hollaex.py +106 -49
- ccxt/async_support/htx.py +20 -43
- ccxt/async_support/hyperliquid.py +6 -6
- ccxt/async_support/kraken.py +27 -23
- ccxt/async_support/kucoinfutures.py +5 -0
- ccxt/async_support/lbank.py +1 -1
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/ndax.py +25 -24
- ccxt/async_support/okcoin.py +12 -29
- ccxt/async_support/okx.py +9 -0
- ccxt/async_support/onetrading.py +10 -7
- ccxt/async_support/oxfun.py +40 -110
- ccxt/async_support/paradex.py +123 -4
- ccxt/base/exchange.py +21 -2
- ccxt/base/types.py +3 -0
- ccxt/bequant.py +1 -1
- ccxt/bitget.py +5 -6
- ccxt/bitmart.py +1 -1
- ccxt/bitrue.py +14 -32
- ccxt/bitso.py +33 -0
- ccxt/bitstamp.py +33 -0
- ccxt/{huobijp.py → bittrade.py} +11 -11
- ccxt/blofin.py +145 -14
- ccxt/btcbox.py +24 -5
- ccxt/bybit.py +16 -37
- ccxt/cex.py +2 -4
- ccxt/coinbase.py +58 -47
- ccxt/coinbaseexchange.py +141 -32
- ccxt/coincatch.py +14 -67
- ccxt/coinex.py +28 -29
- ccxt/coinlist.py +17 -16
- ccxt/coinmetro.py +20 -11
- ccxt/coinone.py +8 -10
- ccxt/coinsph.py +124 -2
- ccxt/cryptocom.py +109 -2
- ccxt/cryptomus.py +42 -80
- ccxt/delta.py +75 -36
- ccxt/deribit.py +4 -5
- ccxt/derive.py +46 -10
- ccxt/ellipx.py +175 -77
- ccxt/gate.py +1 -1
- ccxt/gemini.py +3 -4
- ccxt/hitbtc.py +56 -65
- ccxt/hollaex.py +106 -49
- ccxt/htx.py +20 -43
- ccxt/hyperliquid.py +6 -6
- ccxt/kraken.py +27 -23
- ccxt/kucoinfutures.py +5 -0
- ccxt/lbank.py +1 -1
- ccxt/mexc.py +2 -2
- ccxt/ndax.py +25 -24
- ccxt/okcoin.py +12 -29
- ccxt/okx.py +9 -0
- ccxt/onetrading.py +10 -7
- ccxt/oxfun.py +40 -110
- ccxt/paradex.py +123 -4
- ccxt/pro/__init__.py +109 -5
- ccxt/pro/binance.py +32 -33
- ccxt/pro/bithumb.py +5 -3
- ccxt/pro/{huobijp.py → bittrade.py} +3 -3
- ccxt/pro/kraken.py +249 -79
- ccxt/pro/luno.py +6 -5
- ccxt/pro/mexc.py +254 -7
- ccxt/pro/poloniex.py +6 -2
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/METADATA +8 -11
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/RECORD +110 -121
- ccxt/abstract/bl3p.py +0 -19
- ccxt/abstract/idex.py +0 -26
- ccxt/abstract/kuna.py +0 -182
- ccxt/async_support/base/ws/fast_client.py +0 -97
- ccxt/async_support/bl3p.py +0 -543
- ccxt/async_support/idex.py +0 -1889
- ccxt/async_support/kuna.py +0 -1935
- ccxt/bl3p.py +0 -543
- ccxt/idex.py +0 -1889
- ccxt/kuna.py +0 -1935
- ccxt/pro/idex.py +0 -687
- /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/WHEEL +0 -0
- {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
|
-
|
213
|
+
promise1 = self.publicGetTickers()
|
214
|
+
promise2 = self.fetch_web_endpoint('fetchMarkets', 'webApiGetAjaxCoinCoinInfo', True)
|
215
|
+
response1, response2 = [promise1, promise2]
|
202
216
|
#
|
203
|
-
|
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 =
|
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':
|
277
|
+
'price': self.parse_number(self.parse_precision(self.safe_string(tradeDetails, 'pricedecimal'))),
|
261
278
|
'amount': None,
|
262
279
|
},
|
263
|
-
'active':
|
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':
|
1667
|
-
'deposit':
|
1668
|
-
'withdraw':
|
1669
|
-
'fee': self.
|
1670
|
-
'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.
|
1652
|
+
'min': self.safe_number(chain, 'withdrawMin'),
|
1674
1653
|
'max': None,
|
1675
1654
|
},
|
1676
1655
|
'deposit': {
|
1677
|
-
'min': self.
|
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':
|
1688
|
-
'deposit':
|
1689
|
-
'withdraw':
|
1690
|
-
'fee':
|
1691
|
-
'precision':
|
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':
|
1677
|
+
'min': None,
|
1699
1678
|
'max': None,
|
1700
1679
|
},
|
1701
1680
|
'deposit': {
|
1702
|
-
'min':
|
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':
|
353
|
-
'withdraw':
|
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,
|
1443
|
-
perpetualFees = self.safe_dict(contractPromises,
|
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
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
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
|
-
|
1886
|
-
|
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':
|
1890
|
-
'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
|
-
#
|
348
|
-
#
|
349
|
-
#
|
350
|
-
#
|
351
|
-
#
|
352
|
-
#
|
353
|
-
#
|
354
|
-
#
|
355
|
-
#
|
356
|
-
#
|
357
|
-
#
|
358
|
-
#
|
359
|
-
#
|
360
|
-
#
|
361
|
-
#
|
362
|
-
#
|
363
|
-
#
|
364
|
-
#
|
365
|
-
#
|
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.
|
377
|
-
|
378
|
-
|
379
|
-
|
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':
|
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':
|
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]:
|