ccxt 4.4.82__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 +2 -1
- ccxt/async_support/__init__.py +1 -5
- ccxt/async_support/apex.py +2 -1
- ccxt/async_support/base/exchange.py +26 -3
- ccxt/async_support/base/ws/cache.py +6 -1
- ccxt/async_support/bitget.py +1 -2
- 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 +16 -37
- 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/hyperliquid.py +2 -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/paradex.py +120 -4
- ccxt/base/exchange.py +21 -2
- ccxt/base/types.py +3 -0
- ccxt/bitget.py +1 -2
- 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 +16 -37
- 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/hyperliquid.py +2 -2
- ccxt/kraken.py +27 -23
- ccxt/kucoinfutures.py +5 -0
- ccxt/lbank.py +1 -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/kraken.py +249 -79
- ccxt/pro/mexc.py +252 -7
- ccxt/pro/poloniex.py +6 -2
- {ccxt-4.4.82.dist-info → ccxt-4.4.85.dist-info}/METADATA +7 -9
- {ccxt-4.4.82.dist-info → ccxt-4.4.85.dist-info}/RECORD +79 -87
- 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.82.dist-info → ccxt-4.4.85.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.85.dist-info}/WHEEL +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.85.dist-info}/top_level.txt +0 -0
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]:
|
ccxt/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/coinex.py
CHANGED
@@ -733,33 +733,7 @@ class coinex(Exchange, ImplicitAPI):
|
|
733
733
|
canWithdraw = self.safe_bool(asset, 'withdraw_enabled')
|
734
734
|
firstChain = self.safe_dict(chains, 0, {})
|
735
735
|
firstPrecisionString = self.parse_precision(self.safe_string(firstChain, 'withdrawal_precision'))
|
736
|
-
|
737
|
-
'id': currencyId,
|
738
|
-
'code': code,
|
739
|
-
'name': None,
|
740
|
-
'active': canDeposit and canWithdraw,
|
741
|
-
'deposit': canDeposit,
|
742
|
-
'withdraw': canWithdraw,
|
743
|
-
'fee': None,
|
744
|
-
'precision': self.parse_number(firstPrecisionString),
|
745
|
-
'limits': {
|
746
|
-
'amount': {
|
747
|
-
'min': None,
|
748
|
-
'max': None,
|
749
|
-
},
|
750
|
-
'deposit': {
|
751
|
-
'min': None,
|
752
|
-
'max': None,
|
753
|
-
},
|
754
|
-
'withdraw': {
|
755
|
-
'min': None,
|
756
|
-
'max': None,
|
757
|
-
},
|
758
|
-
},
|
759
|
-
'networks': {},
|
760
|
-
'type': 'crypto',
|
761
|
-
'info': coin,
|
762
|
-
}
|
736
|
+
networks: dict = {}
|
763
737
|
for j in range(0, len(chains)):
|
764
738
|
chain = chains[j]
|
765
739
|
networkId = self.safe_string(chain, 'chain')
|
@@ -796,9 +770,34 @@ class coinex(Exchange, ImplicitAPI):
|
|
796
770
|
},
|
797
771
|
'info': chain,
|
798
772
|
}
|
799
|
-
networks = self.safe_dict(result[code], 'networks', {})
|
800
773
|
networks[networkId] = network
|
801
|
-
|
774
|
+
result[code] = self.safe_currency_structure({
|
775
|
+
'id': currencyId,
|
776
|
+
'code': code,
|
777
|
+
'name': None,
|
778
|
+
'active': canDeposit and canWithdraw,
|
779
|
+
'deposit': canDeposit,
|
780
|
+
'withdraw': canWithdraw,
|
781
|
+
'fee': None,
|
782
|
+
'precision': self.parse_number(firstPrecisionString),
|
783
|
+
'limits': {
|
784
|
+
'amount': {
|
785
|
+
'min': None,
|
786
|
+
'max': None,
|
787
|
+
},
|
788
|
+
'deposit': {
|
789
|
+
'min': None,
|
790
|
+
'max': None,
|
791
|
+
},
|
792
|
+
'withdraw': {
|
793
|
+
'min': None,
|
794
|
+
'max': None,
|
795
|
+
},
|
796
|
+
},
|
797
|
+
'networks': {},
|
798
|
+
'type': 'crypto',
|
799
|
+
'info': coin,
|
800
|
+
})
|
802
801
|
return result
|
803
802
|
|
804
803
|
def fetch_markets(self, params={}) -> List[Market]:
|
ccxt/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
|
def fetch_markets(self, params={}) -> List[Market]:
|
ccxt/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
|
})
|
ccxt/coinone.py
CHANGED
@@ -303,18 +303,16 @@ class coinone(Exchange, ImplicitAPI):
|
|
303
303
|
for i in range(0, len(currencies)):
|
304
304
|
entry = currencies[i]
|
305
305
|
id = self.safe_string(entry, 'symbol')
|
306
|
-
name = self.safe_string(entry, 'name')
|
307
306
|
code = self.safe_currency_code(id)
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
result[code] = {
|
307
|
+
isWithdrawEnabled = self.safe_string(entry, 'withdraw_status', '') == 'normal'
|
308
|
+
isDepositEnabled = self.safe_string(entry, 'deposit_status', '') == 'normal'
|
309
|
+
type = 'crypto' if (code != 'KRW') else 'fiat'
|
310
|
+
result[code] = self.safe_currency_structure({
|
313
311
|
'id': id,
|
314
312
|
'code': code,
|
315
313
|
'info': entry,
|
316
|
-
'name': name,
|
317
|
-
'active':
|
314
|
+
'name': self.safe_string(entry, 'name'),
|
315
|
+
'active': None,
|
318
316
|
'deposit': isDepositEnabled,
|
319
317
|
'withdraw': isWithdrawEnabled,
|
320
318
|
'fee': self.safe_number(entry, 'withdrawal_fee'),
|
@@ -330,8 +328,8 @@ class coinone(Exchange, ImplicitAPI):
|
|
330
328
|
},
|
331
329
|
},
|
332
330
|
'networks': {},
|
333
|
-
'type':
|
334
|
-
}
|
331
|
+
'type': type,
|
332
|
+
})
|
335
333
|
return result
|
336
334
|
|
337
335
|
def fetch_markets(self, params={}) -> List[Market]:
|