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.
Files changed (104) hide show
  1. ccxt/__init__.py +1 -5
  2. ccxt/abstract/blofin.py +8 -0
  3. ccxt/abstract/btcbox.py +1 -0
  4. ccxt/apex.py +21 -30
  5. ccxt/ascendex.py +1 -1
  6. ccxt/async_support/__init__.py +1 -5
  7. ccxt/async_support/apex.py +21 -30
  8. ccxt/async_support/ascendex.py +1 -1
  9. ccxt/async_support/base/exchange.py +26 -3
  10. ccxt/async_support/base/ws/cache.py +6 -1
  11. ccxt/async_support/bigone.py +17 -14
  12. ccxt/async_support/bingx.py +13 -32
  13. ccxt/async_support/bitfinex.py +61 -48
  14. ccxt/async_support/bitget.py +7 -4
  15. ccxt/async_support/bitrue.py +14 -32
  16. ccxt/async_support/bitso.py +33 -0
  17. ccxt/async_support/bitstamp.py +33 -0
  18. ccxt/async_support/blofin.py +145 -14
  19. ccxt/async_support/btcbox.py +25 -5
  20. ccxt/async_support/bybit.py +20 -39
  21. ccxt/async_support/cex.py +2 -4
  22. ccxt/async_support/coinbase.py +56 -42
  23. ccxt/async_support/coinbaseexchange.py +141 -32
  24. ccxt/async_support/coincatch.py +14 -67
  25. ccxt/async_support/coinex.py +28 -29
  26. ccxt/async_support/coinlist.py +17 -16
  27. ccxt/async_support/coinmetro.py +20 -11
  28. ccxt/async_support/coinone.py +8 -10
  29. ccxt/async_support/coinsph.py +124 -2
  30. ccxt/async_support/cryptocom.py +109 -2
  31. ccxt/async_support/cryptomus.py +42 -80
  32. ccxt/async_support/delta.py +75 -36
  33. ccxt/async_support/derive.py +46 -10
  34. ccxt/async_support/ellipx.py +175 -77
  35. ccxt/async_support/gate.py +1 -1
  36. ccxt/async_support/gemini.py +3 -4
  37. ccxt/async_support/hitbtc.py +56 -65
  38. ccxt/async_support/htx.py +2 -2
  39. ccxt/async_support/hyperliquid.py +15 -2
  40. ccxt/async_support/kraken.py +27 -23
  41. ccxt/async_support/kucoinfutures.py +5 -0
  42. ccxt/async_support/lbank.py +1 -1
  43. ccxt/async_support/okx.py +1 -2
  44. ccxt/async_support/oxfun.py +21 -1
  45. ccxt/async_support/paradex.py +120 -4
  46. ccxt/base/errors.py +6 -0
  47. ccxt/base/exchange.py +40 -3
  48. ccxt/base/types.py +3 -0
  49. ccxt/bigone.py +17 -14
  50. ccxt/bingx.py +13 -32
  51. ccxt/bitfinex.py +61 -48
  52. ccxt/bitget.py +7 -4
  53. ccxt/bitrue.py +14 -32
  54. ccxt/bitso.py +33 -0
  55. ccxt/bitstamp.py +33 -0
  56. ccxt/blofin.py +145 -14
  57. ccxt/btcbox.py +24 -5
  58. ccxt/bybit.py +20 -39
  59. ccxt/cex.py +2 -4
  60. ccxt/coinbase.py +56 -42
  61. ccxt/coinbaseexchange.py +141 -32
  62. ccxt/coincatch.py +14 -67
  63. ccxt/coinex.py +28 -29
  64. ccxt/coinlist.py +17 -16
  65. ccxt/coinmetro.py +20 -11
  66. ccxt/coinone.py +8 -10
  67. ccxt/coinsph.py +124 -2
  68. ccxt/cryptocom.py +109 -2
  69. ccxt/cryptomus.py +42 -80
  70. ccxt/delta.py +75 -36
  71. ccxt/derive.py +46 -10
  72. ccxt/ellipx.py +175 -77
  73. ccxt/gate.py +1 -1
  74. ccxt/gemini.py +3 -4
  75. ccxt/hitbtc.py +56 -65
  76. ccxt/htx.py +2 -2
  77. ccxt/hyperliquid.py +15 -2
  78. ccxt/kraken.py +27 -23
  79. ccxt/kucoinfutures.py +5 -0
  80. ccxt/lbank.py +1 -1
  81. ccxt/okx.py +1 -2
  82. ccxt/oxfun.py +21 -1
  83. ccxt/paradex.py +120 -4
  84. ccxt/pro/__init__.py +69 -3
  85. ccxt/pro/binance.py +31 -33
  86. ccxt/pro/bithumb.py +5 -3
  87. ccxt/pro/coinbase.py +1 -1
  88. ccxt/pro/hyperliquid.py +10 -2
  89. ccxt/pro/kraken.py +249 -79
  90. ccxt/pro/mexc.py +252 -7
  91. ccxt/pro/poloniex.py +6 -2
  92. {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/METADATA +7 -11
  93. {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/RECORD +96 -104
  94. ccxt/abstract/bl3p.py +0 -19
  95. ccxt/abstract/idex.py +0 -26
  96. ccxt/async_support/base/ws/fast_client.py +0 -97
  97. ccxt/async_support/bl3p.py +0 -543
  98. ccxt/async_support/idex.py +0 -1889
  99. ccxt/bl3p.py +0 -543
  100. ccxt/idex.py +0 -1889
  101. ccxt/pro/idex.py +0 -687
  102. {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/LICENSE.txt +0 -0
  103. {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/WHEEL +0 -0
  104. {ccxt-4.4.80.dist-info → ccxt-4.4.85.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.4.80'
25
+ __version__ = '4.4.85'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
@@ -108,7 +108,6 @@ from ccxt.bitso import bitso # noqa: F4
108
108
  from ccxt.bitstamp import bitstamp # noqa: F401
109
109
  from ccxt.bitteam import bitteam # noqa: F401
110
110
  from ccxt.bitvavo import bitvavo # noqa: F401
111
- from ccxt.bl3p import bl3p # noqa: F401
112
111
  from ccxt.blockchaincom import blockchaincom # noqa: F401
113
112
  from ccxt.blofin import blofin # noqa: F401
114
113
  from ccxt.btcalpha import btcalpha # noqa: F401
@@ -150,7 +149,6 @@ from ccxt.htx import htx # noqa: F4
150
149
  from ccxt.huobi import huobi # noqa: F401
151
150
  from ccxt.huobijp import huobijp # noqa: F401
152
151
  from ccxt.hyperliquid import hyperliquid # noqa: F401
153
- from ccxt.idex import idex # noqa: F401
154
152
  from ccxt.independentreserve import independentreserve # noqa: F401
155
153
  from ccxt.indodax import indodax # noqa: F401
156
154
  from ccxt.kraken import kraken # noqa: F401
@@ -217,7 +215,6 @@ exchanges = [
217
215
  'bitstamp',
218
216
  'bitteam',
219
217
  'bitvavo',
220
- 'bl3p',
221
218
  'blockchaincom',
222
219
  'blofin',
223
220
  'btcalpha',
@@ -259,7 +256,6 @@ exchanges = [
259
256
  'huobi',
260
257
  'huobijp',
261
258
  'hyperliquid',
262
- 'idex',
263
259
  'independentreserve',
264
260
  'indodax',
265
261
  'kraken',
ccxt/abstract/blofin.py CHANGED
@@ -20,10 +20,14 @@ class ImplicitAPI:
20
20
  private_get_account_positions = privateGetAccountPositions = Entry('account/positions', 'private', 'GET', {'cost': 1})
21
21
  private_get_account_leverage_info = privateGetAccountLeverageInfo = Entry('account/leverage-info', 'private', 'GET', {'cost': 1})
22
22
  private_get_account_margin_mode = privateGetAccountMarginMode = Entry('account/margin-mode', 'private', 'GET', {'cost': 1})
23
+ private_get_account_position_mode = privateGetAccountPositionMode = Entry('account/position-mode', 'private', 'GET', {'cost': 1})
23
24
  private_get_account_batch_leverage_info = privateGetAccountBatchLeverageInfo = Entry('account/batch-leverage-info', 'private', 'GET', {'cost': 1})
24
25
  private_get_trade_orders_tpsl_pending = privateGetTradeOrdersTpslPending = Entry('trade/orders-tpsl-pending', 'private', 'GET', {'cost': 1})
26
+ private_get_trade_orders_algo_pending = privateGetTradeOrdersAlgoPending = Entry('trade/orders-algo-pending', 'private', 'GET', {'cost': 1})
25
27
  private_get_trade_orders_history = privateGetTradeOrdersHistory = Entry('trade/orders-history', 'private', 'GET', {'cost': 1})
26
28
  private_get_trade_orders_tpsl_history = privateGetTradeOrdersTpslHistory = Entry('trade/orders-tpsl-history', 'private', 'GET', {'cost': 1})
29
+ private_get_trade_orders_algo_history = privateGetTradeOrdersAlgoHistory = Entry('trade/orders-algo-history', 'private', 'GET', {'cost': 1})
30
+ private_get_trade_order_price_range = privateGetTradeOrderPriceRange = Entry('trade/order/price-range', 'private', 'GET', {'cost': 1})
27
31
  private_get_user_query_apikey = privateGetUserQueryApikey = Entry('user/query-apikey', 'private', 'GET', {'cost': 1})
28
32
  private_get_affiliate_basic = privateGetAffiliateBasic = Entry('affiliate/basic', 'private', 'GET', {'cost': 1})
29
33
  private_get_copytrading_instruments = privateGetCopytradingInstruments = Entry('copytrading/instruments', 'private', 'GET', {'cost': 1})
@@ -38,8 +42,12 @@ class ImplicitAPI:
38
42
  private_get_copytrading_trade_position_history_by_order = privateGetCopytradingTradePositionHistoryByOrder = Entry('copytrading/trade/position-history-by-order', 'private', 'GET', {'cost': 1})
39
43
  private_get_copytrading_trade_orders_history = privateGetCopytradingTradeOrdersHistory = Entry('copytrading/trade/orders-history', 'private', 'GET', {'cost': 1})
40
44
  private_get_copytrading_trade_pending_tpsl_by_order = privateGetCopytradingTradePendingTpslByOrder = Entry('copytrading/trade/pending-tpsl-by-order', 'private', 'GET', {'cost': 1})
45
+ private_post_account_set_margin_mode = privatePostAccountSetMarginMode = Entry('account/set-margin-mode', 'private', 'POST', {'cost': 1})
46
+ private_post_account_set_position_mode = privatePostAccountSetPositionMode = Entry('account/set-position-mode', 'private', 'POST', {'cost': 1})
41
47
  private_post_trade_order = privatePostTradeOrder = Entry('trade/order', 'private', 'POST', {'cost': 1})
48
+ private_post_trade_order_algo = privatePostTradeOrderAlgo = Entry('trade/order-algo', 'private', 'POST', {'cost': 1})
42
49
  private_post_trade_cancel_order = privatePostTradeCancelOrder = Entry('trade/cancel-order', 'private', 'POST', {'cost': 1})
50
+ private_post_trade_cancel_algo = privatePostTradeCancelAlgo = Entry('trade/cancel-algo', 'private', 'POST', {'cost': 1})
43
51
  private_post_account_set_leverage = privatePostAccountSetLeverage = Entry('account/set-leverage', 'private', 'POST', {'cost': 1})
44
52
  private_post_trade_batch_orders = privatePostTradeBatchOrders = Entry('trade/batch-orders', 'private', 'POST', {'cost': 1})
45
53
  private_post_trade_order_tpsl = privatePostTradeOrderTpsl = Entry('trade/order-tpsl', 'private', 'POST', {'cost': 1})
ccxt/abstract/btcbox.py CHANGED
@@ -12,3 +12,4 @@ class ImplicitAPI:
12
12
  private_post_trade_list = privatePostTradeList = Entry('trade_list', 'private', 'POST', {})
13
13
  private_post_trade_view = privatePostTradeView = Entry('trade_view', 'private', 'POST', {})
14
14
  private_post_wallet = privatePostWallet = Entry('wallet', 'private', 'POST', {})
15
+ webapi_get_ajax_coin_coininfo = webApiGetAjaxCoinCoinInfo = Entry('ajax/coin/coinInfo', 'webApi', 'GET', {})
ccxt/apex.py CHANGED
@@ -498,11 +498,6 @@ class apex(Exchange, ImplicitAPI):
498
498
  code = self.safe_currency_code(currencyId)
499
499
  name = self.safe_string(currency, 'displayName')
500
500
  networks: dict = {}
501
- minPrecision = None
502
- minWithdrawFeeString = None
503
- minWithdrawString = None
504
- deposit = False
505
- withdraw = False
506
501
  for j in range(0, len(chains)):
507
502
  chain = chains[j]
508
503
  tokens = self.safe_list(chain, 'tokens', [])
@@ -512,53 +507,48 @@ class apex(Exchange, ImplicitAPI):
512
507
  if tokenName == currencyId:
513
508
  networkId = self.safe_string(chain, 'chainId')
514
509
  networkCode = self.network_id_to_code(networkId)
515
- precision = self.parse_number(self.parse_precision(self.safe_string(currency, 'decimals')))
516
- minPrecision = precision if (minPrecision is None) else min(minPrecision, precision)
517
- depositAllowed = not self.safe_bool(chain, 'stopDeposit')
518
- deposit = depositAllowed if (depositAllowed) else deposit
519
- withdrawAllowed = self.safe_bool(token, 'withdrawEnable')
520
- withdraw = withdrawAllowed if (withdrawAllowed) else withdraw
521
- minWithdrawFeeString = self.safe_string(token, 'minFee')
522
- minWithdrawString = self.safe_string(token, 'minWithdraw')
523
- minNetworkDepositString = self.safe_string(chain, 'depositMin')
524
510
  networks[networkCode] = {
525
511
  'info': chain,
526
512
  'id': networkId,
527
513
  'network': networkCode,
528
- 'active': depositAllowed and withdrawAllowed,
529
- 'deposit': depositAllowed,
530
- 'withdraw': withdrawAllowed,
531
- 'fee': self.parse_number(minWithdrawFeeString),
532
- 'precision': precision,
514
+ 'active': None,
515
+ 'deposit': not self.safe_bool(chain, 'depositDisable'),
516
+ 'withdraw': self.safe_bool(token, 'withdrawEnable'),
517
+ 'fee': self.safe_number(token, 'minFee'),
518
+ 'precision': self.parse_number(self.parse_precision(self.safe_string(token, 'decimals'))),
533
519
  'limits': {
534
520
  'withdraw': {
535
- 'min': self.parse_number(minWithdrawString),
521
+ 'min': self.safe_number(token, 'minWithdraw'),
536
522
  'max': None,
537
523
  },
538
524
  'deposit': {
539
- 'min': self.parse_number(minNetworkDepositString),
525
+ 'min': self.safe_number(chain, 'minDeposit'),
540
526
  'max': None,
541
527
  },
542
528
  },
543
529
  }
544
- result[code] = {
530
+ networkKeys = list(networks.keys())
531
+ networksLength = len(networkKeys)
532
+ emptyChains = networksLength == 0 # non-functional coins
533
+ valueForEmpty = False if emptyChains else None
534
+ result[code] = self.safe_currency_structure({
545
535
  'info': currency,
546
536
  'code': code,
547
537
  'id': currencyId,
548
538
  'type': 'crypto',
549
539
  'name': name,
550
- 'active': deposit and withdraw,
551
- 'deposit': deposit,
552
- 'withdraw': withdraw,
553
- 'fee': self.parse_number(minWithdrawFeeString),
554
- 'precision': minPrecision,
540
+ 'active': None,
541
+ 'deposit': valueForEmpty,
542
+ 'withdraw': valueForEmpty,
543
+ 'fee': None,
544
+ 'precision': None,
555
545
  'limits': {
556
546
  'amount': {
557
547
  'min': None,
558
548
  'max': None,
559
549
  },
560
550
  'withdraw': {
561
- 'min': self.parse_number(minWithdrawString),
551
+ 'min': None,
562
552
  'max': None,
563
553
  },
564
554
  'deposit': {
@@ -567,7 +557,7 @@ class apex(Exchange, ImplicitAPI):
567
557
  },
568
558
  },
569
559
  'networks': networks,
570
- }
560
+ })
571
561
  return result
572
562
 
573
563
  def fetch_markets(self, params={}) -> List[Market]:
@@ -1087,9 +1077,10 @@ class apex(Exchange, ImplicitAPI):
1087
1077
  for i in range(0, len(resultList)):
1088
1078
  entry = resultList[i]
1089
1079
  timestamp = self.safe_integer(entry, 'fundingTimestamp')
1080
+ marketId = self.safe_string(entry, 'symbol')
1090
1081
  rates.append({
1091
1082
  'info': entry,
1092
- 'symbol': self.safe_string(entry, 'symbol'),
1083
+ 'symbol': self.safe_symbol(marketId, market),
1093
1084
  'fundingRate': self.safe_number(entry, 'rate'),
1094
1085
  'timestamp': timestamp,
1095
1086
  'datetime': self.iso8601(timestamp),
ccxt/ascendex.py CHANGED
@@ -610,7 +610,7 @@ class ascendex(Exchange, ImplicitAPI):
610
610
  'max': None,
611
611
  },
612
612
  },
613
- 'networks': {},
613
+ 'networks': {}, # todo
614
614
  }
615
615
  return result
616
616
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.80'
7
+ __version__ = '4.4.85'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -88,7 +88,6 @@ from ccxt.async_support.bitso import bitso
88
88
  from ccxt.async_support.bitstamp import bitstamp # noqa: F401
89
89
  from ccxt.async_support.bitteam import bitteam # noqa: F401
90
90
  from ccxt.async_support.bitvavo import bitvavo # noqa: F401
91
- from ccxt.async_support.bl3p import bl3p # noqa: F401
92
91
  from ccxt.async_support.blockchaincom import blockchaincom # noqa: F401
93
92
  from ccxt.async_support.blofin import blofin # noqa: F401
94
93
  from ccxt.async_support.btcalpha import btcalpha # noqa: F401
@@ -130,7 +129,6 @@ from ccxt.async_support.htx import htx
130
129
  from ccxt.async_support.huobi import huobi # noqa: F401
131
130
  from ccxt.async_support.huobijp import huobijp # noqa: F401
132
131
  from ccxt.async_support.hyperliquid import hyperliquid # noqa: F401
133
- from ccxt.async_support.idex import idex # noqa: F401
134
132
  from ccxt.async_support.independentreserve import independentreserve # noqa: F401
135
133
  from ccxt.async_support.indodax import indodax # noqa: F401
136
134
  from ccxt.async_support.kraken import kraken # noqa: F401
@@ -197,7 +195,6 @@ exchanges = [
197
195
  'bitstamp',
198
196
  'bitteam',
199
197
  'bitvavo',
200
- 'bl3p',
201
198
  'blockchaincom',
202
199
  'blofin',
203
200
  'btcalpha',
@@ -239,7 +236,6 @@ exchanges = [
239
236
  'huobi',
240
237
  'huobijp',
241
238
  'hyperliquid',
242
- 'idex',
243
239
  'independentreserve',
244
240
  'indodax',
245
241
  'kraken',
@@ -498,11 +498,6 @@ class apex(Exchange, ImplicitAPI):
498
498
  code = self.safe_currency_code(currencyId)
499
499
  name = self.safe_string(currency, 'displayName')
500
500
  networks: dict = {}
501
- minPrecision = None
502
- minWithdrawFeeString = None
503
- minWithdrawString = None
504
- deposit = False
505
- withdraw = False
506
501
  for j in range(0, len(chains)):
507
502
  chain = chains[j]
508
503
  tokens = self.safe_list(chain, 'tokens', [])
@@ -512,53 +507,48 @@ class apex(Exchange, ImplicitAPI):
512
507
  if tokenName == currencyId:
513
508
  networkId = self.safe_string(chain, 'chainId')
514
509
  networkCode = self.network_id_to_code(networkId)
515
- precision = self.parse_number(self.parse_precision(self.safe_string(currency, 'decimals')))
516
- minPrecision = precision if (minPrecision is None) else min(minPrecision, precision)
517
- depositAllowed = not self.safe_bool(chain, 'stopDeposit')
518
- deposit = depositAllowed if (depositAllowed) else deposit
519
- withdrawAllowed = self.safe_bool(token, 'withdrawEnable')
520
- withdraw = withdrawAllowed if (withdrawAllowed) else withdraw
521
- minWithdrawFeeString = self.safe_string(token, 'minFee')
522
- minWithdrawString = self.safe_string(token, 'minWithdraw')
523
- minNetworkDepositString = self.safe_string(chain, 'depositMin')
524
510
  networks[networkCode] = {
525
511
  'info': chain,
526
512
  'id': networkId,
527
513
  'network': networkCode,
528
- 'active': depositAllowed and withdrawAllowed,
529
- 'deposit': depositAllowed,
530
- 'withdraw': withdrawAllowed,
531
- 'fee': self.parse_number(minWithdrawFeeString),
532
- 'precision': precision,
514
+ 'active': None,
515
+ 'deposit': not self.safe_bool(chain, 'depositDisable'),
516
+ 'withdraw': self.safe_bool(token, 'withdrawEnable'),
517
+ 'fee': self.safe_number(token, 'minFee'),
518
+ 'precision': self.parse_number(self.parse_precision(self.safe_string(token, 'decimals'))),
533
519
  'limits': {
534
520
  'withdraw': {
535
- 'min': self.parse_number(minWithdrawString),
521
+ 'min': self.safe_number(token, 'minWithdraw'),
536
522
  'max': None,
537
523
  },
538
524
  'deposit': {
539
- 'min': self.parse_number(minNetworkDepositString),
525
+ 'min': self.safe_number(chain, 'minDeposit'),
540
526
  'max': None,
541
527
  },
542
528
  },
543
529
  }
544
- result[code] = {
530
+ networkKeys = list(networks.keys())
531
+ networksLength = len(networkKeys)
532
+ emptyChains = networksLength == 0 # non-functional coins
533
+ valueForEmpty = False if emptyChains else None
534
+ result[code] = self.safe_currency_structure({
545
535
  'info': currency,
546
536
  'code': code,
547
537
  'id': currencyId,
548
538
  'type': 'crypto',
549
539
  'name': name,
550
- 'active': deposit and withdraw,
551
- 'deposit': deposit,
552
- 'withdraw': withdraw,
553
- 'fee': self.parse_number(minWithdrawFeeString),
554
- 'precision': minPrecision,
540
+ 'active': None,
541
+ 'deposit': valueForEmpty,
542
+ 'withdraw': valueForEmpty,
543
+ 'fee': None,
544
+ 'precision': None,
555
545
  'limits': {
556
546
  'amount': {
557
547
  'min': None,
558
548
  'max': None,
559
549
  },
560
550
  'withdraw': {
561
- 'min': self.parse_number(minWithdrawString),
551
+ 'min': None,
562
552
  'max': None,
563
553
  },
564
554
  'deposit': {
@@ -567,7 +557,7 @@ class apex(Exchange, ImplicitAPI):
567
557
  },
568
558
  },
569
559
  'networks': networks,
570
- }
560
+ })
571
561
  return result
572
562
 
573
563
  async def fetch_markets(self, params={}) -> List[Market]:
@@ -1087,9 +1077,10 @@ class apex(Exchange, ImplicitAPI):
1087
1077
  for i in range(0, len(resultList)):
1088
1078
  entry = resultList[i]
1089
1079
  timestamp = self.safe_integer(entry, 'fundingTimestamp')
1080
+ marketId = self.safe_string(entry, 'symbol')
1090
1081
  rates.append({
1091
1082
  'info': entry,
1092
- 'symbol': self.safe_string(entry, 'symbol'),
1083
+ 'symbol': self.safe_symbol(marketId, market),
1093
1084
  'fundingRate': self.safe_number(entry, 'rate'),
1094
1085
  'timestamp': timestamp,
1095
1086
  'datetime': self.iso8601(timestamp),
@@ -611,7 +611,7 @@ class ascendex(Exchange, ImplicitAPI):
611
611
  'max': None,
612
612
  },
613
613
  },
614
- 'networks': {},
614
+ 'networks': {}, # todo
615
615
  }
616
616
  return result
617
617
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.80'
5
+ __version__ = '4.4.85'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -34,7 +34,7 @@ from ccxt.base.exchange import Exchange as BaseExchange, ArgumentsRequired
34
34
  # -----------------------------------------------------------------------------
35
35
 
36
36
  from ccxt.async_support.base.ws.functions import inflate, inflate64, gunzip
37
- from ccxt.async_support.base.ws.fast_client import FastClient
37
+ from ccxt.async_support.base.ws.aiohttp_client import AiohttpClient
38
38
  from ccxt.async_support.base.ws.future import Future
39
39
  from ccxt.async_support.base.ws.order_book import OrderBook, IndexedOrderBook, CountedOrderBook
40
40
 
@@ -279,7 +279,28 @@ class Exchange(BaseExchange):
279
279
  markets = await self.fetch_markets(params)
280
280
  return self.set_markets(markets, currencies)
281
281
 
282
+
282
283
  async def load_markets(self, reload=False, params={}):
284
+ """
285
+ Loads and prepares the markets for trading.
286
+
287
+ Args:
288
+ reload (bool): If True, the markets will be reloaded from the exchange.
289
+ params (dict): Additional exchange-specific parameters for the request.
290
+
291
+ Returns:
292
+ dict: A dictionary of markets.
293
+
294
+ Raises:
295
+ Exception: If the markets cannot be loaded or prepared.
296
+
297
+ Notes:
298
+ This method is asynchronous.
299
+ It ensures that the markets are only loaded once, even if called multiple times.
300
+ If the markets are already loaded and `reload` is False or not provided, it returns the existing markets.
301
+ If a reload is in progress, it waits for completion before returning.
302
+ If an error occurs during loading or preparation, an exception is raised.
303
+ """
283
304
  if (reload and not self.reloading_markets) or not self.markets_loading:
284
305
  self.reloading_markets = True
285
306
  coroutine = self.load_markets_helper(reload, params)
@@ -387,7 +408,9 @@ class Exchange(BaseExchange):
387
408
  'throttle': Throttler(self.tokenBucket, self.asyncio_loop),
388
409
  'asyncio_loop': self.asyncio_loop,
389
410
  }, ws_options)
390
- self.clients[url] = FastClient(url, on_message, on_error, on_close, on_connected, options)
411
+ # we use aiohttp instead of fastClient now because of this
412
+ # https://github.com/ccxt/ccxt/pull/25995
413
+ self.clients[url] = AiohttpClient(url, on_message, on_error, on_close, on_connected, options)
391
414
  self.clients[url].proxy = self.get_ws_proxy()
392
415
  return self.clients[url]
393
416
 
@@ -1,5 +1,7 @@
1
1
  import collections
2
+ import logging
2
3
 
4
+ logger = logging.getLogger(__name__)
3
5
 
4
6
  class Delegate:
5
7
  def __init__(self, name, delegated):
@@ -151,7 +153,10 @@ class ArrayCacheBySymbolById(ArrayCache):
151
153
  if len(self._deque) == self._deque.maxlen:
152
154
  delete_item = self._deque.popleft()
153
155
  self._index.popleft()
154
- del self.hashmap[delete_item['symbol']][delete_item['id']]
156
+ try:
157
+ del self.hashmap[delete_item['symbol']][delete_item['id']]
158
+ except Exception as e:
159
+ logger.error(f"Error deleting item from hashmap: {delete_item}. Error:{e}")
155
160
  self._deque.append(item)
156
161
  self._index.append(item['id'])
157
162
  if self._clear_all_updates:
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.bigone import ImplicitAPI
8
8
  import asyncio
9
- from ccxt.base.types import Any, Balances, Bool, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
9
+ from ccxt.base.types import Any, Balances, Currencies, Currency, DepositAddress, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, TransferEntry
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -510,19 +510,15 @@ class bigone(Exchange, ImplicitAPI):
510
510
  id = self.safe_string(currency, 'symbol')
511
511
  code = self.safe_currency_code(id)
512
512
  name = self.safe_string(currency, 'name')
513
- type = 'fiat' if self.safe_bool(currency, 'is_fiat') else 'crypto'
514
513
  networks: dict = {}
515
514
  chains = self.safe_list(currency, 'binding_gateways', [])
516
515
  currencyMaxPrecision = self.parse_precision(self.safe_string_2(currency, 'withdrawal_scale', 'scale'))
517
- currencyDepositEnabled: Bool = None
518
- currencyWithdrawEnabled: Bool = None
519
516
  for j in range(0, len(chains)):
520
517
  chain = chains[j]
521
518
  networkId = self.safe_string(chain, 'gateway_name')
522
519
  networkCode = self.network_id_to_code(networkId)
523
520
  deposit = self.safe_bool(chain, 'is_deposit_enabled')
524
521
  withdraw = self.safe_bool(chain, 'is_withdrawal_enabled')
525
- isActive = (deposit and withdraw)
526
522
  minDepositAmount = self.safe_string(chain, 'min_deposit_amount')
527
523
  minWithdrawalAmount = self.safe_string(chain, 'min_withdrawal_amount')
528
524
  withdrawalFee = self.safe_string(chain, 'withdrawal_fee')
@@ -533,7 +529,7 @@ class bigone(Exchange, ImplicitAPI):
533
529
  'margin': None,
534
530
  'deposit': deposit,
535
531
  'withdraw': withdraw,
536
- 'active': isActive,
532
+ 'active': None,
537
533
  'fee': self.parse_number(withdrawalFee),
538
534
  'precision': self.parse_number(precision),
539
535
  'limits': {
@@ -548,19 +544,26 @@ class bigone(Exchange, ImplicitAPI):
548
544
  },
549
545
  'info': chain,
550
546
  }
551
- # fill global values
552
- currencyDepositEnabled = (currencyDepositEnabled is None) or deposit if deposit else currencyDepositEnabled
553
- currencyWithdrawEnabled = (currencyWithdrawEnabled is None) or withdraw if withdraw else currencyWithdrawEnabled
554
- currencyMaxPrecision = (currencyMaxPrecision is None) or precision if Precise.string_gt(currencyMaxPrecision, precision) else currencyMaxPrecision
555
- result[code] = {
547
+ chainLength = len(chains)
548
+ type: Str = None
549
+ if self.safe_bool(currency, 'is_fiat'):
550
+ type = 'fiat'
551
+ elif chainLength == 0:
552
+ if self.is_leveraged_currency(id):
553
+ type = 'leveraged'
554
+ else:
555
+ type = 'other'
556
+ else:
557
+ type = 'crypto'
558
+ result[code] = self.safe_currency_structure({
556
559
  'id': id,
557
560
  'code': code,
558
561
  'info': currency,
559
562
  'name': name,
560
563
  'type': type,
561
564
  'active': None,
562
- 'deposit': currencyDepositEnabled,
563
- 'withdraw': currencyWithdrawEnabled,
565
+ 'deposit': None,
566
+ 'withdraw': None,
564
567
  'fee': None,
565
568
  'precision': self.parse_number(currencyMaxPrecision),
566
569
  'limits': {
@@ -574,7 +577,7 @@ class bigone(Exchange, ImplicitAPI):
574
577
  },
575
578
  },
576
579
  'networks': networks,
577
- }
580
+ })
578
581
  return result
579
582
 
580
583
  async def fetch_markets(self, params={}) -> List[Market]:
@@ -767,56 +767,41 @@ class bingx(Exchange, ImplicitAPI):
767
767
  name = self.safe_string(entry, 'name')
768
768
  networkList = self.safe_list(entry, 'networkList')
769
769
  networks: dict = {}
770
- fee = None
771
- depositEnabled = False
772
- withdrawEnabled = False
773
- defaultLimits: dict = {}
774
770
  for j in range(0, len(networkList)):
775
771
  rawNetwork = networkList[j]
776
772
  network = self.safe_string(rawNetwork, 'network')
777
773
  networkCode = self.network_id_to_code(network)
778
- isDefault = self.safe_bool(rawNetwork, 'isDefault')
779
- networkDepositEnabled = self.safe_bool(rawNetwork, 'depositEnable')
780
- if networkDepositEnabled:
781
- depositEnabled = True
782
- networkWithdrawEnabled = self.safe_bool(rawNetwork, 'withdrawEnable')
783
- if networkWithdrawEnabled:
784
- withdrawEnabled = True
785
774
  limits: dict = {
786
775
  'withdraw': {
787
776
  'min': self.safe_number(rawNetwork, 'withdrawMin'),
788
777
  'max': self.safe_number(rawNetwork, 'withdrawMax'),
789
778
  },
790
779
  }
791
- fee = self.safe_number(rawNetwork, 'withdrawFee')
792
- if isDefault:
793
- defaultLimits = limits
794
- precision = self.safe_number(rawNetwork, 'withdrawPrecision')
795
- networkActive = networkDepositEnabled or networkWithdrawEnabled
780
+ precision = self.parse_number(self.parse_precision(self.safe_string(rawNetwork, 'withdrawPrecision')))
796
781
  networks[networkCode] = {
797
782
  'info': rawNetwork,
798
783
  'id': network,
799
784
  'network': networkCode,
800
- 'fee': fee,
801
- 'active': networkActive,
802
- 'deposit': networkDepositEnabled,
803
- 'withdraw': networkWithdrawEnabled,
785
+ 'fee': self.safe_number(rawNetwork, 'withdrawFee'),
786
+ 'active': None,
787
+ 'deposit': self.safe_bool(rawNetwork, 'depositEnable'),
788
+ 'withdraw': self.safe_bool(rawNetwork, 'withdrawEnable'),
804
789
  'precision': precision,
805
790
  'limits': limits,
806
791
  }
807
- active = depositEnabled or withdrawEnabled
808
792
  result[code] = self.safe_currency_structure({
809
793
  'info': entry,
810
794
  'code': code,
811
795
  'id': currencyId,
812
796
  'precision': None,
813
797
  'name': name,
814
- 'active': active,
815
- 'deposit': depositEnabled,
816
- 'withdraw': withdrawEnabled,
798
+ 'active': None,
799
+ 'deposit': None,
800
+ 'withdraw': None,
817
801
  'networks': networks,
818
- 'fee': fee,
819
- 'limits': defaultLimits,
802
+ 'fee': None,
803
+ 'limits': None,
804
+ 'type': 'crypto', # only cryptos now
820
805
  })
821
806
  return result
822
807
 
@@ -5536,18 +5521,14 @@ class bingx(Exchange, ImplicitAPI):
5536
5521
  :param str address: the address to withdraw to
5537
5522
  :param str [tag]:
5538
5523
  :param dict [params]: extra parameters specific to the exchange API endpoint
5539
- :param int [params.walletType]: 1 fund account, 2 standard account, 3 perpetual account
5524
+ :param int [params.walletType]: 1 fund account, 2 standard account, 3 perpetual account, 15 spot account
5540
5525
  :returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
5541
5526
  """
5542
5527
  tag, params = self.handle_withdraw_tag_and_params(tag, params)
5543
5528
  self.check_address(address)
5544
5529
  await self.load_markets()
5545
5530
  currency = self.currency(code)
5546
- walletType = self.safe_integer(params, 'walletType')
5547
- if walletType is None:
5548
- walletType = 1
5549
- if not self.in_array(walletType, [1, 2, 3]):
5550
- raise BadRequest(self.id + ' withdraw() requires either 1 fund account, 2 standard futures account, 3 perpetual account for walletType')
5531
+ walletType = self.safe_integer(params, 'walletType', 1)
5551
5532
  request: dict = {
5552
5533
  'coin': currency['id'],
5553
5534
  'address': address,