ccxt 4.4.80__py2.py3-none-any.whl → 4.4.85__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 +1 -5
- ccxt/abstract/blofin.py +8 -0
- ccxt/abstract/btcbox.py +1 -0
- ccxt/apex.py +21 -30
- ccxt/ascendex.py +1 -1
- ccxt/async_support/__init__.py +1 -5
- ccxt/async_support/apex.py +21 -30
- ccxt/async_support/ascendex.py +1 -1
- ccxt/async_support/base/exchange.py +26 -3
- ccxt/async_support/base/ws/cache.py +6 -1
- ccxt/async_support/bigone.py +17 -14
- ccxt/async_support/bingx.py +13 -32
- ccxt/async_support/bitfinex.py +61 -48
- ccxt/async_support/bitget.py +7 -4
- ccxt/async_support/bitrue.py +14 -32
- ccxt/async_support/bitso.py +33 -0
- ccxt/async_support/bitstamp.py +33 -0
- ccxt/async_support/blofin.py +145 -14
- ccxt/async_support/btcbox.py +25 -5
- ccxt/async_support/bybit.py +20 -39
- ccxt/async_support/cex.py +2 -4
- ccxt/async_support/coinbase.py +56 -42
- 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/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/htx.py +2 -2
- ccxt/async_support/hyperliquid.py +15 -2
- ccxt/async_support/kraken.py +27 -23
- ccxt/async_support/kucoinfutures.py +5 -0
- ccxt/async_support/lbank.py +1 -1
- ccxt/async_support/okx.py +1 -2
- ccxt/async_support/oxfun.py +21 -1
- ccxt/async_support/paradex.py +120 -4
- ccxt/base/errors.py +6 -0
- ccxt/base/exchange.py +40 -3
- ccxt/base/types.py +3 -0
- ccxt/bigone.py +17 -14
- ccxt/bingx.py +13 -32
- ccxt/bitfinex.py +61 -48
- ccxt/bitget.py +7 -4
- ccxt/bitrue.py +14 -32
- ccxt/bitso.py +33 -0
- ccxt/bitstamp.py +33 -0
- ccxt/blofin.py +145 -14
- ccxt/btcbox.py +24 -5
- ccxt/bybit.py +20 -39
- ccxt/cex.py +2 -4
- ccxt/coinbase.py +56 -42
- 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/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/htx.py +2 -2
- ccxt/hyperliquid.py +15 -2
- ccxt/kraken.py +27 -23
- ccxt/kucoinfutures.py +5 -0
- ccxt/lbank.py +1 -1
- ccxt/okx.py +1 -2
- ccxt/oxfun.py +21 -1
- ccxt/paradex.py +120 -4
- ccxt/pro/__init__.py +69 -3
- ccxt/pro/binance.py +31 -33
- ccxt/pro/bithumb.py +5 -3
- ccxt/pro/coinbase.py +1 -1
- ccxt/pro/hyperliquid.py +10 -2
- ccxt/pro/kraken.py +249 -79
- ccxt/pro/mexc.py +252 -7
- ccxt/pro/poloniex.py +6 -2
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/METADATA +7 -11
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/RECORD +96 -104
- ccxt/abstract/bl3p.py +0 -19
- ccxt/abstract/idex.py +0 -26
- 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/bl3p.py +0 -543
- ccxt/idex.py +0 -1889
- ccxt/pro/idex.py +0 -687
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/WHEEL +0 -0
- {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/top_level.txt +0 -0
ccxt/async_support/coinbase.py
CHANGED
@@ -1833,45 +1833,46 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1833
1833
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1834
1834
|
:returns dict: an associative dictionary of currencies
|
1835
1835
|
"""
|
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
|
-
# }
|
1836
|
+
promises = [
|
1837
|
+
self.v2PublicGetCurrencies(params),
|
1838
|
+
self.v2PublicGetCurrenciesCrypto(params),
|
1839
|
+
self.v2PublicGetExchangeRates(params),
|
1840
|
+
]
|
1841
|
+
promisesResult = await asyncio.gather(*promises)
|
1842
|
+
fiatResponse = self.safe_dict(promisesResult, 0, {})
|
1859
1843
|
#
|
1844
|
+
# [
|
1845
|
+
# "data": [
|
1846
|
+
# {
|
1847
|
+
# id: 'IMP',
|
1848
|
+
# name: 'Isle of Man Pound',
|
1849
|
+
# min_size: '0.01'
|
1850
|
+
# },
|
1851
|
+
# ...
|
1860
1852
|
#
|
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
|
-
# }
|
1853
|
+
cryptoResponse = self.safe_dict(promisesResult, 1, {})
|
1874
1854
|
#
|
1855
|
+
# [
|
1856
|
+
# "data": [
|
1857
|
+
# {
|
1858
|
+
# asset_id: '9476e3be-b731-47fa-82be-347fabc573d9',
|
1859
|
+
# code: 'AERO',
|
1860
|
+
# name: 'Aerodrome Finance',
|
1861
|
+
# color: '#0433FF',
|
1862
|
+
# sort_index: '340',
|
1863
|
+
# exponent: '8',
|
1864
|
+
# type: 'crypto',
|
1865
|
+
# address_regex: '^(?:0x)?[0-9a-fA-F]{40}$'
|
1866
|
+
# },
|
1867
|
+
# ...
|
1868
|
+
#
|
1869
|
+
ratesResponse = self.safe_dict(promisesResult, 2, {})
|
1870
|
+
fiatData = self.safe_list(fiatResponse, 'data', [])
|
1871
|
+
cryptoData = self.safe_list(cryptoResponse, 'data', [])
|
1872
|
+
ratesData = self.safe_dict(ratesResponse, 'data', {})
|
1873
|
+
rates = self.safe_dict(ratesData, 'rates', {})
|
1874
|
+
ratesIds = list(rates.keys())
|
1875
|
+
currencies = self.array_concat(fiatData, cryptoData)
|
1875
1876
|
result: dict = {}
|
1876
1877
|
networks: dict = {}
|
1877
1878
|
networksById: dict = {}
|
@@ -1883,18 +1884,19 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1883
1884
|
name = self.safe_string(currency, 'name')
|
1884
1885
|
self.options['networks'][code] = name.lower()
|
1885
1886
|
self.options['networksById'][code] = name.lower()
|
1886
|
-
|
1887
|
-
|
1887
|
+
type = 'crypto' if (assetId is not None) else 'fiat'
|
1888
|
+
result[code] = self.safe_currency_structure({
|
1889
|
+
'info': currency,
|
1888
1890
|
'id': id,
|
1889
1891
|
'code': code,
|
1890
|
-
'type':
|
1891
|
-
'name':
|
1892
|
+
'type': type,
|
1893
|
+
'name': name,
|
1892
1894
|
'active': True,
|
1893
1895
|
'deposit': None,
|
1894
1896
|
'withdraw': None,
|
1895
1897
|
'fee': None,
|
1896
1898
|
'precision': None,
|
1897
|
-
'networks': {},
|
1899
|
+
'networks': {}, # todo
|
1898
1900
|
'limits': {
|
1899
1901
|
'amount': {
|
1900
1902
|
'min': self.safe_number(currency, 'min_size'),
|
@@ -1905,11 +1907,23 @@ class coinbase(Exchange, ImplicitAPI):
|
|
1905
1907
|
'max': None,
|
1906
1908
|
},
|
1907
1909
|
},
|
1908
|
-
}
|
1910
|
+
})
|
1909
1911
|
if assetId is not None:
|
1910
1912
|
lowerCaseName = name.lower()
|
1911
1913
|
networks[code] = lowerCaseName
|
1912
1914
|
networksById[lowerCaseName] = code
|
1915
|
+
# we have to add other currencies here( https://discord.com/channels/1220414409550336183/1220464770239430761/1372215891940479098 )
|
1916
|
+
for i in range(0, len(ratesIds)):
|
1917
|
+
currencyId = ratesIds[i]
|
1918
|
+
code = self.safe_currency_code(currencyId)
|
1919
|
+
if not (code in result):
|
1920
|
+
result[code] = self.safe_currency_structure({
|
1921
|
+
'info': {},
|
1922
|
+
'id': currencyId,
|
1923
|
+
'code': code,
|
1924
|
+
'type': 'crypto',
|
1925
|
+
'networks': {}, # todo
|
1926
|
+
})
|
1913
1927
|
self.options['networks'] = self.extend(networks, self.options['networks'])
|
1914
1928
|
self.options['networksById'] = self.extend(networksById, self.options['networksById'])
|
1915
1929
|
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]:
|
ccxt/async_support/coinmetro.py
CHANGED
@@ -387,24 +387,33 @@ class coinmetro(Exchange, ImplicitAPI):
|
|
387
387
|
currency = response[i]
|
388
388
|
id = self.safe_string(currency, 'symbol')
|
389
389
|
code = self.safe_currency_code(id)
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
390
|
+
typeRaw = self.safe_string(currency, 'type')
|
391
|
+
type = None
|
392
|
+
if typeRaw == 'coin' or typeRaw == 'token' or typeRaw == 'erc20':
|
393
|
+
type = 'crypto'
|
394
|
+
elif typeRaw == 'fiat':
|
395
|
+
type = 'fiat'
|
396
|
+
precisionDigits = self.safe_string_2(currency, 'digits', 'notabeneDecimals')
|
395
397
|
result[code] = self.safe_currency_structure({
|
396
398
|
'id': id,
|
397
399
|
'code': code,
|
398
400
|
'name': code,
|
401
|
+
'type': type,
|
399
402
|
'info': currency,
|
400
|
-
'active':
|
401
|
-
'deposit':
|
402
|
-
'withdraw':
|
403
|
+
'active': self.safe_bool(currency, 'canTrade'),
|
404
|
+
'deposit': self.safe_bool(currency, 'canDeposit'),
|
405
|
+
'withdraw': self.safe_bool(currency, 'canWithdraw'),
|
403
406
|
'fee': None,
|
404
|
-
'precision': self.parse_number(self.parse_precision(
|
407
|
+
'precision': self.parse_number(self.parse_precision(precisionDigits)),
|
405
408
|
'limits': {
|
406
|
-
'amount': {
|
407
|
-
|
409
|
+
'amount': {
|
410
|
+
'min': self.safe_number(currency, 'minQty'),
|
411
|
+
'max': None,
|
412
|
+
},
|
413
|
+
'withdraw': {
|
414
|
+
'min': None,
|
415
|
+
'max': None,
|
416
|
+
},
|
408
417
|
},
|
409
418
|
'networks': {},
|
410
419
|
})
|