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/async_support/coinbase.py
CHANGED
@@ -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,
|
1444
|
-
perpetualFees = self.safe_dict(contractPromises,
|
1440
|
+
expiringFees = self.safe_dict(contractPromises, 0, {})
|
1441
|
+
perpetualFees = self.safe_dict(contractPromises, 1, {})
|
1445
1442
|
#
|
1446
1443
|
# {
|
1447
1444
|
# "total_volume": 0,
|
@@ -1833,45 +1830,46 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1833
1830
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1834
1831
|
:returns dict: an associative dictionary of currencies
|
1835
1832
|
"""
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
# name: 'Isle of Man Pound',
|
1844
|
-
# min_size: '0.01'
|
1845
|
-
# },
|
1846
|
-
#
|
1847
|
-
# crypto
|
1848
|
-
#
|
1849
|
-
# {
|
1850
|
-
# asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
|
1851
|
-
# code: 'AERO',
|
1852
|
-
# name: 'Aerodrome Finance',
|
1853
|
-
# color: '#0433FF',
|
1854
|
-
# sort_index: '340',
|
1855
|
-
# exponent: '8',
|
1856
|
-
# type: 'crypto',
|
1857
|
-
# address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
|
1858
|
-
# }
|
1833
|
+
promises = [
|
1834
|
+
self.v2PublicGetCurrencies(params),
|
1835
|
+
self.v2PublicGetCurrenciesCrypto(params),
|
1836
|
+
self.v2PublicGetExchangeRates(params),
|
1837
|
+
]
|
1838
|
+
promisesResult = await asyncio.gather(*promises)
|
1839
|
+
fiatResponse = self.safe_dict(promisesResult, 0, {})
|
1859
1840
|
#
|
1841
|
+
# [
|
1842
|
+
# "data": [
|
1843
|
+
# {
|
1844
|
+
# id: 'IMP',
|
1845
|
+
# name: 'Isle of Man Pound',
|
1846
|
+
# min_size: '0.01'
|
1847
|
+
# },
|
1848
|
+
# ...
|
1860
1849
|
#
|
1861
|
-
|
1862
|
-
# "data":{
|
1863
|
-
# "currency":"USD",
|
1864
|
-
# "rates":{
|
1865
|
-
# "AED":"3.67",
|
1866
|
-
# "AFN":"78.21",
|
1867
|
-
# "ALL":"110.42",
|
1868
|
-
# "AMD":"474.18",
|
1869
|
-
# "ANG":"1.75",
|
1870
|
-
# ...
|
1871
|
-
# },
|
1872
|
-
# }
|
1873
|
-
# }
|
1850
|
+
cryptoResponse = self.safe_dict(promisesResult, 1, {})
|
1874
1851
|
#
|
1852
|
+
# [
|
1853
|
+
# "data": [
|
1854
|
+
# {
|
1855
|
+
# asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
|
1856
|
+
# code: 'AERO',
|
1857
|
+
# name: 'Aerodrome Finance',
|
1858
|
+
# color: '#0433FF',
|
1859
|
+
# sort_index: '340',
|
1860
|
+
# exponent: '8',
|
1861
|
+
# type: 'crypto',
|
1862
|
+
# address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
|
1863
|
+
# },
|
1864
|
+
# ...
|
1865
|
+
#
|
1866
|
+
ratesResponse = self.safe_dict(promisesResult, 2, {})
|
1867
|
+
fiatData = self.safe_list(fiatResponse, 'data', [])
|
1868
|
+
cryptoData = self.safe_list(cryptoResponse, 'data', [])
|
1869
|
+
ratesData = self.safe_dict(ratesResponse, 'data', {})
|
1870
|
+
rates = self.safe_dict(ratesData, 'rates', {})
|
1871
|
+
ratesIds = list(rates.keys())
|
1872
|
+
currencies = self.array_concat(fiatData, cryptoData)
|
1875
1873
|
result: dict = {}
|
1876
1874
|
networks: dict = {}
|
1877
1875
|
networksById: dict = {}
|
@@ -1883,18 +1881,19 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1883
1881
|
name = self.safe_string(currency, 'name')
|
1884
1882
|
self.options['networks'][code] = name.lower()
|
1885
1883
|
self.options['networksById'][code] = name.lower()
|
1886
|
-
|
1887
|
-
|
1884
|
+
type = 'crypto' if (assetId is not None) else 'fiat'
|
1885
|
+
result[code] = self.safe_currency_structure({
|
1886
|
+
'info': currency,
|
1888
1887
|
'id': id,
|
1889
1888
|
'code': code,
|
1890
|
-
'type':
|
1891
|
-
'name':
|
1889
|
+
'type': type,
|
1890
|
+
'name': name,
|
1892
1891
|
'active': True,
|
1893
1892
|
'deposit': None,
|
1894
1893
|
'withdraw': None,
|
1895
1894
|
'fee': None,
|
1896
1895
|
'precision': None,
|
1897
|
-
'networks': {},
|
1896
|
+
'networks': {}, # todo
|
1898
1897
|
'limits': {
|
1899
1898
|
'amount': {
|
1900
1899
|
'min': self.safe_number(currency, 'min_size'),
|
@@ -1905,11 +1904,23 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1905
1904
|
'max': None,
|
1906
1905
|
},
|
1907
1906
|
},
|
1908
|
-
}
|
1907
|
+
})
|
1909
1908
|
if assetId is not None:
|
1910
1909
|
lowerCaseName = name.lower()
|
1911
1910
|
networks[code] = lowerCaseName
|
1912
1911
|
networksById[lowerCaseName] = code
|
1912
|
+
# we have to add other currencies here( https://discord.com/channels/1220414409550336183/1220464770239430761/1372215891940479098 )
|
1913
|
+
for i in range(0, len(ratesIds)):
|
1914
|
+
currencyId = ratesIds[i]
|
1915
|
+
code = self.safe_currency_code(currencyId)
|
1916
|
+
if not (code in result):
|
1917
|
+
result[code] = self.safe_currency_structure({
|
1918
|
+
'info': {},
|
1919
|
+
'id': currencyId,
|
1920
|
+
'code': code,
|
1921
|
+
'type': 'crypto',
|
1922
|
+
'networks': {}, # todo
|
1923
|
+
})
|
1913
1924
|
self.options['networks'] = self.extend(networks, self.options['networks'])
|
1914
1925
|
self.options['networksById'] = self.extend(networksById, self.options['networksById'])
|
1915
1926
|
return result
|
@@ -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 = await 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
|
async def fetch_markets(self, params={}) -> List[Market]:
|
ccxt/async_support/coincatch.py
CHANGED
@@ -375,56 +375,18 @@ class coincatch(Exchange, ImplicitAPI):
|
|
375
375
|
'CRO': 'CronosChain',
|
376
376
|
},
|
377
377
|
'networksById': {
|
378
|
-
'BITCOIN': 'BTC',
|
379
|
-
'ERC20': 'ERC20',
|
380
378
|
'TRC20': 'TRC20',
|
381
379
|
'TRX(TRC20)': 'TRC20',
|
382
|
-
'BEP20': 'BEP20',
|
383
380
|
'ArbitrumOne': 'ARB', # todo check
|
384
|
-
'Optimism': 'OPTIMISM',
|
385
|
-
'LTC': 'LTC',
|
386
|
-
'BCH': 'BCH',
|
387
|
-
'ETC': 'ETC',
|
388
|
-
'SOL': 'SOL',
|
389
|
-
'NEO3': 'NEO3',
|
390
|
-
'stacks': 'STX',
|
391
|
-
'Elrond': 'EGLD',
|
392
|
-
'NEARProtocol': 'NEAR',
|
393
|
-
'AcalaToken': 'ACA',
|
394
|
-
'Klaytn': 'KLAY',
|
395
|
-
'Fantom': 'FTM',
|
396
|
-
'Terra': 'TERRA',
|
397
|
-
'WAVES': 'WAVES',
|
398
|
-
'TAO': 'TAO',
|
399
|
-
'SUI': 'SUI',
|
400
|
-
'SEI': 'SEI',
|
401
381
|
'THORChain': 'RUNE', # todo check
|
402
|
-
'ZIL': 'ZIL',
|
403
382
|
'Solar': 'SXP', # todo check
|
404
|
-
'FET': 'FET',
|
405
383
|
'C-Chain': 'AVAX', # todo check
|
406
|
-
'XRP': 'XRP',
|
407
|
-
'EOS': 'EOS',
|
408
|
-
'DOGECOIN': 'DOGE',
|
409
384
|
'CAP20': 'CAP20', # todo check
|
410
|
-
'Polygon': 'MATIC',
|
411
|
-
'CSPR': 'CSPR',
|
412
|
-
'Moonbeam': 'GLMR',
|
413
|
-
'MINA': 'MINA',
|
414
385
|
'CFXeSpace': 'CFX', # todo check
|
415
386
|
'CFX': 'CFX',
|
416
387
|
'StratisEVM': 'STRAT', # todo check
|
417
|
-
'Celestia': 'TIA',
|
418
388
|
'ChilizChain': 'ChilizChain', # todo check
|
419
|
-
'Aptos': 'APT',
|
420
|
-
'Ontology': 'ONT',
|
421
|
-
'ICP': 'ICP',
|
422
|
-
'Cardano': 'ADA',
|
423
|
-
'FIL': 'FIL',
|
424
|
-
'CELO': 'CELO',
|
425
|
-
'DOT': 'DOT',
|
426
389
|
'StellarLumens': 'XLM', # todo check
|
427
|
-
'ATOM': 'ATOM',
|
428
390
|
'CronosChain': 'CRO', # todo check
|
429
391
|
},
|
430
392
|
},
|
@@ -656,71 +618,56 @@ class coincatch(Exchange, ImplicitAPI):
|
|
656
618
|
currencyId = self.safe_string(currecy, 'coinName')
|
657
619
|
currenciesIds.append(currencyId)
|
658
620
|
code = self.safe_currency_code(currencyId)
|
659
|
-
allowDeposit = False
|
660
|
-
allowWithdraw = False
|
661
|
-
minDeposit: Str = None
|
662
|
-
minWithdraw: Str = None
|
663
621
|
networks = self.safe_list(currecy, 'chains')
|
664
|
-
networksById = self.safe_dict(self.options, 'networksById')
|
665
622
|
parsedNetworks: dict = {}
|
666
623
|
for j in range(0, len(networks)):
|
667
624
|
network = networks[j]
|
668
625
|
networkId = self.safe_string(network, 'chain')
|
669
|
-
|
670
|
-
networkDepositString = self.safe_string(network, 'rechargeable')
|
671
|
-
networkDeposit = networkDepositString == 'true'
|
672
|
-
networkWithdrawString = self.safe_string(network, 'withdrawable')
|
673
|
-
networkWithdraw = networkWithdrawString == 'true'
|
674
|
-
networkMinDeposit = self.safe_string(network, 'minDepositAmount')
|
675
|
-
networkMinWithdraw = self.safe_string(network, 'minWithdrawAmount')
|
626
|
+
networkCode = self.network_code_to_id(networkId)
|
676
627
|
parsedNetworks[networkId] = {
|
677
628
|
'id': networkId,
|
678
|
-
'network':
|
629
|
+
'network': networkCode,
|
679
630
|
'limits': {
|
680
631
|
'deposit': {
|
681
|
-
'min': self.
|
632
|
+
'min': self.safe_number(network, 'minDepositAmount'),
|
682
633
|
'max': None,
|
683
634
|
},
|
684
635
|
'withdraw': {
|
685
|
-
'min': self.
|
636
|
+
'min': self.safe_number(network, 'minWithdrawAmount'),
|
686
637
|
'max': None,
|
687
638
|
},
|
688
639
|
},
|
689
|
-
'active':
|
690
|
-
'deposit':
|
691
|
-
'withdraw':
|
640
|
+
'active': None,
|
641
|
+
'deposit': self.safe_string(network, 'rechargeable') == 'true',
|
642
|
+
'withdraw': self.safe_string(network, 'withdrawable') == 'true',
|
692
643
|
'fee': self.safe_number(network, 'withdrawFee'),
|
693
644
|
'precision': None,
|
694
645
|
'info': network,
|
695
646
|
}
|
696
|
-
|
697
|
-
allowWithdraw = allowWithdraw if allowWithdraw else networkWithdraw
|
698
|
-
minDeposit = Precise.string_min(networkMinDeposit, minDeposit) if minDeposit else networkMinDeposit
|
699
|
-
minWithdraw = Precise.string_min(networkMinWithdraw, minWithdraw) if minWithdraw else networkMinWithdraw
|
700
|
-
result[code] = {
|
647
|
+
result[code] = self.safe_currency_structure({
|
701
648
|
'id': currencyId,
|
702
649
|
'numericId': self.safe_integer(currecy, 'coinId'),
|
703
650
|
'code': code,
|
704
651
|
'precision': None,
|
705
652
|
'type': None,
|
706
653
|
'name': None,
|
707
|
-
'active':
|
708
|
-
'deposit':
|
709
|
-
'withdraw':
|
654
|
+
'active': None,
|
655
|
+
'deposit': None,
|
656
|
+
'withdraw': None,
|
710
657
|
'fee': None,
|
711
658
|
'limits': {
|
712
659
|
'deposit': {
|
713
|
-
'min':
|
660
|
+
'min': None,
|
714
661
|
'max': None,
|
715
662
|
},
|
716
663
|
'withdraw': {
|
717
|
-
'min':
|
664
|
+
'min': None,
|
718
665
|
'max': None,
|
719
666
|
},
|
720
667
|
},
|
721
668
|
'networks': parsedNetworks,
|
722
669
|
'info': currecy,
|
723
|
-
}
|
670
|
+
})
|
724
671
|
if self.safe_list(self.options, 'currencyIdsListForParseMarket') is None:
|
725
672
|
self.options['currencyIdsListForParseMarket'] = currenciesIds
|
726
673
|
return result
|
ccxt/async_support/coinex.py
CHANGED
@@ -734,33 +734,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
734
734
|
canWithdraw = self.safe_bool(asset, 'withdraw_enabled')
|
735
735
|
firstChain = self.safe_dict(chains, 0, {})
|
736
736
|
firstPrecisionString = self.parse_precision(self.safe_string(firstChain, 'withdrawal_precision'))
|
737
|
-
|
738
|
-
'id': currencyId,
|
739
|
-
'code': code,
|
740
|
-
'name': None,
|
741
|
-
'active': canDeposit and canWithdraw,
|
742
|
-
'deposit': canDeposit,
|
743
|
-
'withdraw': canWithdraw,
|
744
|
-
'fee': None,
|
745
|
-
'precision': self.parse_number(firstPrecisionString),
|
746
|
-
'limits': {
|
747
|
-
'amount': {
|
748
|
-
'min': None,
|
749
|
-
'max': None,
|
750
|
-
},
|
751
|
-
'deposit': {
|
752
|
-
'min': None,
|
753
|
-
'max': None,
|
754
|
-
},
|
755
|
-
'withdraw': {
|
756
|
-
'min': None,
|
757
|
-
'max': None,
|
758
|
-
},
|
759
|
-
},
|
760
|
-
'networks': {},
|
761
|
-
'type': 'crypto',
|
762
|
-
'info': coin,
|
763
|
-
}
|
737
|
+
networks: dict = {}
|
764
738
|
for j in range(0, len(chains)):
|
765
739
|
chain = chains[j]
|
766
740
|
networkId = self.safe_string(chain, 'chain')
|
@@ -797,9 +771,34 @@ class coinex(Exchange, ImplicitAPI):
|
|
797
771
|
},
|
798
772
|
'info': chain,
|
799
773
|
}
|
800
|
-
networks = self.safe_dict(result[code], 'networks', {})
|
801
774
|
networks[networkId] = network
|
802
|
-
|
775
|
+
result[code] = self.safe_currency_structure({
|
776
|
+
'id': currencyId,
|
777
|
+
'code': code,
|
778
|
+
'name': None,
|
779
|
+
'active': canDeposit and canWithdraw,
|
780
|
+
'deposit': canDeposit,
|
781
|
+
'withdraw': canWithdraw,
|
782
|
+
'fee': None,
|
783
|
+
'precision': self.parse_number(firstPrecisionString),
|
784
|
+
'limits': {
|
785
|
+
'amount': {
|
786
|
+
'min': None,
|
787
|
+
'max': None,
|
788
|
+
},
|
789
|
+
'deposit': {
|
790
|
+
'min': None,
|
791
|
+
'max': None,
|
792
|
+
},
|
793
|
+
'withdraw': {
|
794
|
+
'min': None,
|
795
|
+
'max': None,
|
796
|
+
},
|
797
|
+
},
|
798
|
+
'networks': {},
|
799
|
+
'type': 'crypto',
|
800
|
+
'info': coin,
|
801
|
+
})
|
803
802
|
return result
|
804
803
|
|
805
804
|
async def fetch_markets(self, params={}) -> List[Market]:
|
ccxt/async_support/coinlist.py
CHANGED
@@ -467,30 +467,31 @@ class coinlist(Exchange, ImplicitAPI):
|
|
467
467
|
currency = currencies[i]
|
468
468
|
id = self.safe_string(currency, 'asset')
|
469
469
|
code = self.safe_currency_code(id)
|
470
|
+
isFiat = code == 'USD'
|
470
471
|
isTransferable = self.safe_bool(currency, 'is_transferable', False)
|
471
|
-
|
472
|
-
depositEnabled = isTransferable
|
473
|
-
active = isTransferable
|
474
|
-
decimalPlaces = self.safe_string(currency, 'decimal_places')
|
475
|
-
precision = self.parse_number(self.parse_precision(decimalPlaces))
|
476
|
-
minWithdrawal = self.safe_string(currency, 'min_withdrawal')
|
477
|
-
result[code] = {
|
472
|
+
result[code] = self.safe_currency_structure({
|
478
473
|
'id': id,
|
479
474
|
'code': code,
|
480
475
|
'name': code,
|
481
476
|
'info': currency,
|
482
|
-
'active':
|
483
|
-
'deposit':
|
484
|
-
'withdraw':
|
477
|
+
'active': None,
|
478
|
+
'deposit': isTransferable,
|
479
|
+
'withdraw': isTransferable,
|
485
480
|
'fee': None,
|
486
|
-
'precision':
|
481
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(currency, 'decimal_places'))),
|
487
482
|
'limits': {
|
488
|
-
'amount': {
|
489
|
-
|
483
|
+
'amount': {
|
484
|
+
'min': None,
|
485
|
+
'max': None,
|
486
|
+
},
|
487
|
+
'withdraw': {
|
488
|
+
'min': self.safe_number(currency, 'min_withdrawal'),
|
489
|
+
'max': None,
|
490
|
+
},
|
490
491
|
},
|
491
|
-
'networks': {},
|
492
|
-
'type': 'crypto',
|
493
|
-
}
|
492
|
+
'networks': {}, # todo
|
493
|
+
'type': 'fiat' if isFiat else 'crypto',
|
494
|
+
})
|
494
495
|
return result
|
495
496
|
|
496
497
|
async def fetch_markets(self, params={}) -> List[Market]:
|