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/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
|
async def fetch_markets(self, params={}) -> List[Market]:
|
ccxt/async_support/coinsph.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.coinsph import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Any, Balances, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Any, Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -75,7 +75,7 @@ class coinsph(Exchange, ImplicitAPI):
|
|
75
75
|
'fetchClosedOrders': True,
|
76
76
|
'fetchCrossBorrowRate': False,
|
77
77
|
'fetchCrossBorrowRates': False,
|
78
|
-
'fetchCurrencies':
|
78
|
+
'fetchCurrencies': True,
|
79
79
|
'fetchDeposit': None,
|
80
80
|
'fetchDepositAddress': True,
|
81
81
|
'fetchDepositAddresses': False,
|
@@ -501,6 +501,128 @@ class coinsph(Exchange, ImplicitAPI):
|
|
501
501
|
},
|
502
502
|
})
|
503
503
|
|
504
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
505
|
+
"""
|
506
|
+
fetches all available currencies on an exchange
|
507
|
+
|
508
|
+
https://docs.coins.ph/rest-api/#all-coins-information-user_data
|
509
|
+
|
510
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
511
|
+
:returns dict: an associative dictionary of currencies
|
512
|
+
"""
|
513
|
+
if not self.check_required_credentials(False):
|
514
|
+
return None
|
515
|
+
response = await self.privateGetOpenapiWalletV1ConfigGetall(params)
|
516
|
+
#
|
517
|
+
# [
|
518
|
+
# {
|
519
|
+
# "coin": "PHP",
|
520
|
+
# "name": "PHP",
|
521
|
+
# "depositAllEnable": False,
|
522
|
+
# "withdrawAllEnable": False,
|
523
|
+
# "free": "0",
|
524
|
+
# "locked": "0",
|
525
|
+
# "transferPrecision": "2",
|
526
|
+
# "transferMinQuantity": "0",
|
527
|
+
# "networkList": [],
|
528
|
+
# "legalMoney": True
|
529
|
+
# },
|
530
|
+
# {
|
531
|
+
# "coin": "USDT",
|
532
|
+
# "name": "USDT",
|
533
|
+
# "depositAllEnable": True,
|
534
|
+
# "withdrawAllEnable": True,
|
535
|
+
# "free": "0",
|
536
|
+
# "locked": "0",
|
537
|
+
# "transferPrecision": "8",
|
538
|
+
# "transferMinQuantity": "0",
|
539
|
+
# "networkList": [
|
540
|
+
# {
|
541
|
+
# "addressRegex": "^0x[0-9a-fA-F]{40}$",
|
542
|
+
# "memoRegex": " ",
|
543
|
+
# "network": "ETH",
|
544
|
+
# "name": "Ethereum(ERC20)",
|
545
|
+
# "depositEnable": True,
|
546
|
+
# "minConfirm": "12",
|
547
|
+
# "unLockConfirm": "-1",
|
548
|
+
# "withdrawDesc": "",
|
549
|
+
# "withdrawEnable": True,
|
550
|
+
# "withdrawFee": "6",
|
551
|
+
# "withdrawIntegerMultiple": "0.000001",
|
552
|
+
# "withdrawMax": "500000",
|
553
|
+
# "withdrawMin": "10",
|
554
|
+
# "sameAddress": False
|
555
|
+
# },
|
556
|
+
# {
|
557
|
+
# "addressRegex": "^T[0-9a-zA-Z]{33}$",
|
558
|
+
# "memoRegex": "",
|
559
|
+
# "network": "TRX",
|
560
|
+
# "name": "TRON",
|
561
|
+
# "depositEnable": True,
|
562
|
+
# "minConfirm": "19",
|
563
|
+
# "unLockConfirm": "-1",
|
564
|
+
# "withdrawDesc": "",
|
565
|
+
# "withdrawEnable": True,
|
566
|
+
# "withdrawFee": "3",
|
567
|
+
# "withdrawIntegerMultiple": "0.000001",
|
568
|
+
# "withdrawMax": "1000000",
|
569
|
+
# "withdrawMin": "20",
|
570
|
+
# "sameAddress": False
|
571
|
+
# }
|
572
|
+
# ],
|
573
|
+
# "legalMoney": False
|
574
|
+
# }
|
575
|
+
# ]
|
576
|
+
#
|
577
|
+
result: dict = {}
|
578
|
+
for i in range(0, len(response)):
|
579
|
+
entry = response[i]
|
580
|
+
id = self.safe_string(entry, 'coin')
|
581
|
+
code = self.safe_currency_code(id)
|
582
|
+
isFiat = self.safe_bool(entry, 'isLegalMoney')
|
583
|
+
networkList = self.safe_list(entry, 'networkList', [])
|
584
|
+
networks: dict = {}
|
585
|
+
for j in range(0, len(networkList)):
|
586
|
+
networkItem = networkList[j]
|
587
|
+
network = self.safe_string(networkItem, 'network')
|
588
|
+
networkCode = self.network_id_to_code(network)
|
589
|
+
networks[networkCode] = {
|
590
|
+
'info': networkItem,
|
591
|
+
'id': network,
|
592
|
+
'network': networkCode,
|
593
|
+
'active': None,
|
594
|
+
'deposit': self.safe_bool(networkItem, 'depositEnable'),
|
595
|
+
'withdraw': self.safe_bool(networkItem, 'withdrawEnable'),
|
596
|
+
'fee': self.safe_number(networkItem, 'withdrawFee'),
|
597
|
+
'precision': self.safe_number(networkItem, 'withdrawIntegerMultiple'),
|
598
|
+
'limits': {
|
599
|
+
'withdraw': {
|
600
|
+
'min': self.safe_number(networkItem, 'withdrawMin'),
|
601
|
+
'max': self.safe_number(networkItem, 'withdrawMax'),
|
602
|
+
},
|
603
|
+
'deposit': {
|
604
|
+
'min': None,
|
605
|
+
'max': None,
|
606
|
+
},
|
607
|
+
},
|
608
|
+
}
|
609
|
+
result[code] = self.safe_currency_structure({
|
610
|
+
'id': id,
|
611
|
+
'name': self.safe_string(entry, 'name'),
|
612
|
+
'code': code,
|
613
|
+
'type': 'fiat' if isFiat else 'crypto',
|
614
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(entry, 'transferPrecision'))),
|
615
|
+
'info': entry,
|
616
|
+
'active': None,
|
617
|
+
'deposit': self.safe_bool(entry, 'depositAllEnable'),
|
618
|
+
'withdraw': self.safe_bool(entry, 'withdrawAllEnable'),
|
619
|
+
'networks': networks,
|
620
|
+
'fee': None,
|
621
|
+
'fees': None,
|
622
|
+
'limits': {},
|
623
|
+
})
|
624
|
+
return result
|
625
|
+
|
504
626
|
def calculate_rate_limiter_cost(self, api, method, path, params, config={}):
|
505
627
|
if ('noSymbol' in config) and not ('symbol' in params):
|
506
628
|
return config['noSymbol']
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
from ccxt.async_support.base.exchange import Exchange
|
7
7
|
from ccxt.abstract.cryptocom import ImplicitAPI
|
8
8
|
import hashlib
|
9
|
-
from ccxt.base.types import Account, Any, Balances, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
|
9
|
+
from ccxt.base.types import Account, Any, Balances, Currencies, Currency, DepositAddress, Int, LedgerEntry, Market, Num, Order, OrderBook, OrderRequest, CancellationRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction
|
10
10
|
from typing import List
|
11
11
|
from ccxt.base.errors import ExchangeError
|
12
12
|
from ccxt.base.errors import AuthenticationError
|
@@ -69,7 +69,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
69
69
|
'fetchClosedOrders': 'emulated',
|
70
70
|
'fetchCrossBorrowRate': False,
|
71
71
|
'fetchCrossBorrowRates': False,
|
72
|
-
'fetchCurrencies':
|
72
|
+
'fetchCurrencies': True,
|
73
73
|
'fetchDepositAddress': True,
|
74
74
|
'fetchDepositAddresses': False,
|
75
75
|
'fetchDepositAddressesByNetwork': True,
|
@@ -526,6 +526,113 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
526
526
|
},
|
527
527
|
})
|
528
528
|
|
529
|
+
async def fetch_currencies(self, params={}) -> Currencies:
|
530
|
+
"""
|
531
|
+
fetches all available currencies on an exchange
|
532
|
+
|
533
|
+
https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#private-get-currency-networks
|
534
|
+
|
535
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
536
|
+
:returns dict: an associative dictionary of currencies
|
537
|
+
"""
|
538
|
+
# self endpoint requires authentication
|
539
|
+
if not self.check_required_credentials(False):
|
540
|
+
return None
|
541
|
+
response = await self.v1PrivatePostPrivateGetCurrencyNetworks(params)
|
542
|
+
#
|
543
|
+
# {
|
544
|
+
# "id": "1747502328559",
|
545
|
+
# "method": "private/get-currency-networks",
|
546
|
+
# "code": "0",
|
547
|
+
# "result": {
|
548
|
+
# "update_time": "1747502281000",
|
549
|
+
# "currency_map": {
|
550
|
+
# "USDT": {
|
551
|
+
# "full_name": "Tether USD",
|
552
|
+
# "default_network": "ETH",
|
553
|
+
# "network_list": [
|
554
|
+
# {
|
555
|
+
# "network_id": "ETH",
|
556
|
+
# "withdrawal_fee": "10.00000000",
|
557
|
+
# "withdraw_enabled": True,
|
558
|
+
# "min_withdrawal_amount": "20.0",
|
559
|
+
# "deposit_enabled": True,
|
560
|
+
# "confirmation_required": "32"
|
561
|
+
# },
|
562
|
+
# {
|
563
|
+
# "network_id": "CRONOS",
|
564
|
+
# "withdrawal_fee": "0.18000000",
|
565
|
+
# "withdraw_enabled": True,
|
566
|
+
# "min_withdrawal_amount": "0.36",
|
567
|
+
# "deposit_enabled": True,
|
568
|
+
# "confirmation_required": "15"
|
569
|
+
# },
|
570
|
+
# {
|
571
|
+
# "network_id": "SOL",
|
572
|
+
# "withdrawal_fee": "5.31000000",
|
573
|
+
# "withdraw_enabled": True,
|
574
|
+
# "min_withdrawal_amount": "10.62",
|
575
|
+
# "deposit_enabled": True,
|
576
|
+
# "confirmation_required": "1"
|
577
|
+
# }
|
578
|
+
# ]
|
579
|
+
# }
|
580
|
+
# }
|
581
|
+
# }
|
582
|
+
# }
|
583
|
+
#
|
584
|
+
resultData = self.safe_dict(response, 'result', {})
|
585
|
+
currencyMap = self.safe_dict(resultData, 'currency_map', {})
|
586
|
+
keys = list(currencyMap.keys())
|
587
|
+
result: dict = {}
|
588
|
+
for i in range(0, len(keys)):
|
589
|
+
key = keys[i]
|
590
|
+
currency = currencyMap[key]
|
591
|
+
id = key
|
592
|
+
code = self.safe_currency_code(id)
|
593
|
+
networks: dict = {}
|
594
|
+
chains = self.safe_list(currency, 'network_list', [])
|
595
|
+
for j in range(0, len(chains)):
|
596
|
+
chain = chains[j]
|
597
|
+
networkId = self.safe_string(chain, 'network_id')
|
598
|
+
network = self.network_id_to_code(networkId)
|
599
|
+
networks[network] = {
|
600
|
+
'info': chain,
|
601
|
+
'id': networkId,
|
602
|
+
'network': network,
|
603
|
+
'active': None,
|
604
|
+
'deposit': self.safe_bool(chain, 'deposit_enabled', False),
|
605
|
+
'withdraw': self.safe_bool(chain, 'withdraw_enabled', False),
|
606
|
+
'fee': self.safe_number(chain, 'withdrawal_fee'),
|
607
|
+
'precision': None,
|
608
|
+
'limits': {
|
609
|
+
'withdraw': {
|
610
|
+
'min': self.safe_number(chain, 'min_withdrawal_amount'),
|
611
|
+
'max': None,
|
612
|
+
},
|
613
|
+
},
|
614
|
+
}
|
615
|
+
result[code] = self.safe_currency_structure({
|
616
|
+
'info': currency,
|
617
|
+
'id': id,
|
618
|
+
'code': code,
|
619
|
+
'name': self.safe_string(currency, 'full_name'),
|
620
|
+
'active': None,
|
621
|
+
'deposit': None,
|
622
|
+
'withdraw': None,
|
623
|
+
'fee': None,
|
624
|
+
'precision': None,
|
625
|
+
'limits': {
|
626
|
+
'amount': {
|
627
|
+
'min': None,
|
628
|
+
'max': None,
|
629
|
+
},
|
630
|
+
},
|
631
|
+
'type': 'crypto', # only crypto now
|
632
|
+
'networks': networks,
|
633
|
+
})
|
634
|
+
return result
|
635
|
+
|
529
636
|
async def fetch_markets(self, params={}) -> List[Market]:
|
530
637
|
"""
|
531
638
|
|
ccxt/async_support/cryptomus.py
CHANGED
@@ -369,41 +369,9 @@ class cryptomus(Exchange, ImplicitAPI):
|
|
369
369
|
coins = self.safe_list(response, 'result')
|
370
370
|
result: dict = {}
|
371
371
|
for i in range(0, len(coins)):
|
372
|
-
|
373
|
-
currencyId = self.safe_string(
|
372
|
+
networkEntry = coins[i]
|
373
|
+
currencyId = self.safe_string(networkEntry, 'currency_code')
|
374
374
|
code = self.safe_currency_code(currencyId)
|
375
|
-
allowWithdraw = self.safe_bool(currency, 'can_withdraw')
|
376
|
-
allowDeposit = self.safe_bool(currency, 'can_deposit')
|
377
|
-
isActive = allowWithdraw and allowDeposit
|
378
|
-
networkId = self.safe_string(currency, 'network_code')
|
379
|
-
networksById = self.safe_dict(self.options, 'networksById')
|
380
|
-
networkName = self.safe_string(networksById, networkId, networkId)
|
381
|
-
minWithdraw = self.safe_number(currency, 'min_withdraw')
|
382
|
-
maxWithdraw = self.safe_number(currency, 'max_withdraw')
|
383
|
-
minDeposit = self.safe_number(currency, 'min_deposit')
|
384
|
-
maxDeposit = self.safe_number(currency, 'max_deposit')
|
385
|
-
network = {
|
386
|
-
'id': networkId,
|
387
|
-
'network': networkName,
|
388
|
-
'limits': {
|
389
|
-
'withdraw': {
|
390
|
-
'min': minWithdraw,
|
391
|
-
'max': maxWithdraw,
|
392
|
-
},
|
393
|
-
'deposit': {
|
394
|
-
'min': minDeposit,
|
395
|
-
'max': maxDeposit,
|
396
|
-
},
|
397
|
-
},
|
398
|
-
'active': isActive,
|
399
|
-
'deposit': allowDeposit,
|
400
|
-
'withdraw': allowWithdraw,
|
401
|
-
'fee': None,
|
402
|
-
'precision': None,
|
403
|
-
'info': currency,
|
404
|
-
}
|
405
|
-
networks = {}
|
406
|
-
networks[networkName] = network
|
407
375
|
if not (code in result):
|
408
376
|
result[code] = {
|
409
377
|
'id': currencyId,
|
@@ -411,60 +379,54 @@ class cryptomus(Exchange, ImplicitAPI):
|
|
411
379
|
'precision': None,
|
412
380
|
'type': None,
|
413
381
|
'name': None,
|
414
|
-
'active':
|
415
|
-
'deposit':
|
416
|
-
'withdraw':
|
382
|
+
'active': None,
|
383
|
+
'deposit': None,
|
384
|
+
'withdraw': None,
|
417
385
|
'fee': None,
|
418
386
|
'limits': {
|
419
387
|
'withdraw': {
|
420
|
-
'min':
|
421
|
-
'max':
|
388
|
+
'min': None,
|
389
|
+
'max': None,
|
422
390
|
},
|
423
391
|
'deposit': {
|
424
|
-
'min':
|
425
|
-
'max':
|
392
|
+
'min': None,
|
393
|
+
'max': None,
|
426
394
|
},
|
427
395
|
},
|
428
|
-
'networks':
|
429
|
-
'info':
|
430
|
-
}
|
431
|
-
else:
|
432
|
-
parsed = result[code]
|
433
|
-
parsedNetworks = self.safe_dict(parsed, 'networks')
|
434
|
-
parsed['networks'] = self.extend(parsedNetworks, networks)
|
435
|
-
if isActive:
|
436
|
-
parsed['active'] = True
|
437
|
-
parsed['deposit'] = True
|
438
|
-
parsed['withdraw'] = True
|
439
|
-
else:
|
440
|
-
if allowWithdraw:
|
441
|
-
parsed['withdraw'] = True
|
442
|
-
if allowDeposit:
|
443
|
-
parsed['deposit'] = True
|
444
|
-
parsedLimits = self.safe_dict(parsed, 'limits')
|
445
|
-
withdrawLimits = {
|
446
|
-
'min': None,
|
447
|
-
'max': None,
|
396
|
+
'networks': {},
|
397
|
+
'info': {},
|
448
398
|
}
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
399
|
+
networkId = self.safe_string(networkEntry, 'network_code')
|
400
|
+
networkCode = self.network_id_to_code(networkId)
|
401
|
+
result[code]['networks'][networkCode] = {
|
402
|
+
'id': networkId,
|
403
|
+
'network': networkCode,
|
404
|
+
'limits': {
|
405
|
+
'withdraw': {
|
406
|
+
'min': self.safe_number(networkEntry, 'min_withdraw'),
|
407
|
+
'max': self.safe_number(networkEntry, 'max_withdraw'),
|
408
|
+
},
|
409
|
+
'deposit': {
|
410
|
+
'min': self.safe_number(networkEntry, 'min_deposit'),
|
411
|
+
'max': self.safe_number(networkEntry, 'max_deposit'),
|
412
|
+
},
|
413
|
+
},
|
414
|
+
'active': None,
|
415
|
+
'deposit': self.safe_bool(networkEntry, 'can_withdraw'),
|
416
|
+
'withdraw': self.safe_bool(networkEntry, 'can_deposit'),
|
417
|
+
'fee': None,
|
418
|
+
'precision': None,
|
419
|
+
'info': networkEntry,
|
420
|
+
}
|
421
|
+
# add entry in info
|
422
|
+
info = self.safe_list(result[code], 'info', [])
|
423
|
+
info.append(networkEntry)
|
424
|
+
result[code]['info'] = info
|
425
|
+
# only after all entries are formed in currencies, restructure each entry
|
426
|
+
allKeys = list(result.keys())
|
427
|
+
for i in range(0, len(allKeys)):
|
428
|
+
code = allKeys[i]
|
429
|
+
result[code] = self.safe_currency_structure(result[code]) # self is needed after adding network entry
|
468
430
|
return result
|
469
431
|
|
470
432
|
async def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
ccxt/async_support/delta.py
CHANGED
@@ -509,31 +509,49 @@ class delta(Exchange, ImplicitAPI):
|
|
509
509
|
"""
|
510
510
|
response = await self.publicGetAssets(params)
|
511
511
|
#
|
512
|
-
#
|
513
|
-
#
|
514
|
-
#
|
515
|
-
#
|
516
|
-
#
|
517
|
-
#
|
518
|
-
#
|
519
|
-
#
|
520
|
-
#
|
521
|
-
#
|
522
|
-
#
|
523
|
-
#
|
524
|
-
#
|
525
|
-
#
|
526
|
-
#
|
527
|
-
#
|
528
|
-
#
|
529
|
-
#
|
530
|
-
#
|
531
|
-
#
|
532
|
-
#
|
533
|
-
#
|
534
|
-
#
|
535
|
-
#
|
536
|
-
#
|
512
|
+
# {
|
513
|
+
# "result": [
|
514
|
+
# {
|
515
|
+
# "base_withdrawal_fee": "0.005000000000000000",
|
516
|
+
# "id": "1",
|
517
|
+
# "interest_credit": False,
|
518
|
+
# "interest_slabs": null,
|
519
|
+
# "kyc_deposit_limit": "0.000000000000000000",
|
520
|
+
# "kyc_withdrawal_limit": "0.000000000000000000",
|
521
|
+
# "min_withdrawal_amount": "0.010000000000000000",
|
522
|
+
# "minimum_precision": "4",
|
523
|
+
# "name": "Ethereum",
|
524
|
+
# "networks": [
|
525
|
+
# {
|
526
|
+
# "allowed_deposit_groups": null,
|
527
|
+
# "base_withdrawal_fee": "0.0025",
|
528
|
+
# "deposit_status": "enabled",
|
529
|
+
# "memo_required": False,
|
530
|
+
# "min_deposit_amount": "0.000050000000000000",
|
531
|
+
# "min_withdrawal_amount": "0.010000000000000000",
|
532
|
+
# "minimum_deposit_confirmations": "12",
|
533
|
+
# "network": "ERC20",
|
534
|
+
# "variable_withdrawal_fee": "0",
|
535
|
+
# "withdrawal_status": "enabled"
|
536
|
+
# },
|
537
|
+
# {
|
538
|
+
# "allowed_deposit_groups": null,
|
539
|
+
# "base_withdrawal_fee": "0.0001",
|
540
|
+
# "deposit_status": "enabled",
|
541
|
+
# "memo_required": False,
|
542
|
+
# "min_deposit_amount": "0.000050000000000000",
|
543
|
+
# "min_withdrawal_amount": "0.000300000000000000",
|
544
|
+
# "minimum_deposit_confirmations": "15",
|
545
|
+
# "network": "BEP20(BSC)",
|
546
|
+
# "variable_withdrawal_fee": "0",
|
547
|
+
# "withdrawal_status": "enabled"
|
548
|
+
# }
|
549
|
+
# ],
|
550
|
+
# "precision": "18",
|
551
|
+
# "sort_priority": "3",
|
552
|
+
# "symbol": "ETH",
|
553
|
+
# "variable_withdrawal_fee": "0.000000000000000000"
|
554
|
+
# },
|
537
555
|
# ],
|
538
556
|
# "success":true
|
539
557
|
# }
|
@@ -545,20 +563,41 @@ class delta(Exchange, ImplicitAPI):
|
|
545
563
|
id = self.safe_string(currency, 'symbol')
|
546
564
|
numericId = self.safe_integer(currency, 'id')
|
547
565
|
code = self.safe_currency_code(id)
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
566
|
+
chains = self.safe_list(currency, 'networks', [])
|
567
|
+
networks = {}
|
568
|
+
for j in range(0, len(chains)):
|
569
|
+
chain = chains[j]
|
570
|
+
networkId = self.safe_string(chain, 'network')
|
571
|
+
networkCode = self.network_id_to_code(networkId)
|
572
|
+
networks[networkCode] = {
|
573
|
+
'id': networkId,
|
574
|
+
'network': networkCode,
|
575
|
+
'name': self.safe_string(chain, 'name'),
|
576
|
+
'info': chain,
|
577
|
+
'active': self.safe_string(chain, 'status') == 'enabled',
|
578
|
+
'deposit': self.safe_string(chain, 'deposit_status') == 'enabled',
|
579
|
+
'withdraw': self.safe_string(chain, 'withdrawal_status') == 'enabled',
|
580
|
+
'fee': self.safe_number(chain, 'base_withdrawal_fee'),
|
581
|
+
'limits': {
|
582
|
+
'deposit': {
|
583
|
+
'min': self.safe_number(chain, 'min_deposit_amount'),
|
584
|
+
'max': None,
|
585
|
+
},
|
586
|
+
'withdraw': {
|
587
|
+
'min': self.safe_number(chain, 'min_withdrawal_amount'),
|
588
|
+
'max': None,
|
589
|
+
},
|
590
|
+
},
|
591
|
+
}
|
592
|
+
result[code] = self.safe_currency_structure({
|
554
593
|
'id': id,
|
555
594
|
'numericId': numericId,
|
556
595
|
'code': code,
|
557
596
|
'name': self.safe_string(currency, 'name'),
|
558
597
|
'info': currency, # the original payload
|
559
|
-
'active':
|
560
|
-
'deposit':
|
561
|
-
'withdraw':
|
598
|
+
'active': None,
|
599
|
+
'deposit': self.safe_string(currency, 'deposit_status') == 'enabled',
|
600
|
+
'withdraw': self.safe_string(currency, 'withdrawal_status') == 'enabled',
|
562
601
|
'fee': self.safe_number(currency, 'base_withdrawal_fee'),
|
563
602
|
'precision': self.parse_number(self.parse_precision(self.safe_string(currency, 'precision'))),
|
564
603
|
'limits': {
|
@@ -568,9 +607,9 @@ class delta(Exchange, ImplicitAPI):
|
|
568
607
|
'max': None,
|
569
608
|
},
|
570
609
|
},
|
571
|
-
'networks':
|
610
|
+
'networks': networks,
|
572
611
|
'type': 'crypto',
|
573
|
-
}
|
612
|
+
})
|
574
613
|
return result
|
575
614
|
|
576
615
|
async def load_markets(self, reload=False, params={}):
|