ccxt 4.3.19__py2.py3-none-any.whl → 4.3.21__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (49) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bitget.py +3 -0
  7. ccxt/abstract/coinex.py +1 -1
  8. ccxt/abstract/okx.py +3 -0
  9. ccxt/ascendex.py +1 -1
  10. ccxt/async_support/__init__.py +1 -1
  11. ccxt/async_support/ascendex.py +1 -1
  12. ccxt/async_support/base/exchange.py +3 -1
  13. ccxt/async_support/binance.py +8 -2
  14. ccxt/async_support/bingx.py +1 -1
  15. ccxt/async_support/bitget.py +4 -1
  16. ccxt/async_support/bitmex.py +1 -0
  17. ccxt/async_support/bybit.py +35 -9
  18. ccxt/async_support/coinex.py +177 -200
  19. ccxt/async_support/delta.py +1 -1
  20. ccxt/async_support/digifinex.py +1 -1
  21. ccxt/async_support/exmo.py +1 -1
  22. ccxt/async_support/gate.py +1 -1
  23. ccxt/async_support/hitbtc.py +1 -1
  24. ccxt/async_support/hyperliquid.py +25 -3
  25. ccxt/async_support/okx.py +4 -1
  26. ccxt/async_support/phemex.py +15 -7
  27. ccxt/base/exchange.py +4 -2
  28. ccxt/binance.py +8 -2
  29. ccxt/bingx.py +1 -1
  30. ccxt/bitget.py +4 -1
  31. ccxt/bitmex.py +1 -0
  32. ccxt/bybit.py +35 -9
  33. ccxt/coinex.py +177 -200
  34. ccxt/delta.py +1 -1
  35. ccxt/digifinex.py +1 -1
  36. ccxt/exmo.py +1 -1
  37. ccxt/gate.py +1 -1
  38. ccxt/hitbtc.py +1 -1
  39. ccxt/hyperliquid.py +25 -3
  40. ccxt/okx.py +4 -1
  41. ccxt/phemex.py +15 -7
  42. ccxt/pro/__init__.py +1 -1
  43. ccxt/pro/htx.py +12 -6
  44. ccxt/pro/kucoinfutures.py +89 -1
  45. ccxt/pro/woo.py +46 -22
  46. {ccxt-4.3.19.dist-info → ccxt-4.3.21.dist-info}/METADATA +4 -4
  47. {ccxt-4.3.19.dist-info → ccxt-4.3.21.dist-info}/RECORD +49 -49
  48. {ccxt-4.3.19.dist-info → ccxt-4.3.21.dist-info}/WHEEL +0 -0
  49. {ccxt-4.3.19.dist-info → ccxt-4.3.21.dist-info}/top_level.txt +0 -0
ccxt/__init__.py CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.3.19'
25
+ __version__ = '4.3.21'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/binance.py CHANGED
@@ -465,6 +465,7 @@ class ImplicitAPI:
465
465
  fapipublic_get_continuousklines = fapiPublicGetContinuousKlines = Entry('continuousKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
466
466
  fapipublic_get_markpriceklines = fapiPublicGetMarkPriceKlines = Entry('markPriceKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
467
467
  fapipublic_get_indexpriceklines = fapiPublicGetIndexPriceKlines = Entry('indexPriceKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
468
+ fapipublic_get_premiumindexklines = fapiPublicGetPremiumIndexKlines = Entry('premiumIndexKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
468
469
  fapipublic_get_fundingrate = fapiPublicGetFundingRate = Entry('fundingRate', 'fapiPublic', 'GET', {'cost': 1})
469
470
  fapipublic_get_fundinginfo = fapiPublicGetFundingInfo = Entry('fundingInfo', 'fapiPublic', 'GET', {'cost': 1})
470
471
  fapipublic_get_premiumindex = fapiPublicGetPremiumIndex = Entry('premiumIndex', 'fapiPublic', 'GET', {'cost': 1})
@@ -465,6 +465,7 @@ class ImplicitAPI:
465
465
  fapipublic_get_continuousklines = fapiPublicGetContinuousKlines = Entry('continuousKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
466
466
  fapipublic_get_markpriceklines = fapiPublicGetMarkPriceKlines = Entry('markPriceKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
467
467
  fapipublic_get_indexpriceklines = fapiPublicGetIndexPriceKlines = Entry('indexPriceKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
468
+ fapipublic_get_premiumindexklines = fapiPublicGetPremiumIndexKlines = Entry('premiumIndexKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
468
469
  fapipublic_get_fundingrate = fapiPublicGetFundingRate = Entry('fundingRate', 'fapiPublic', 'GET', {'cost': 1})
469
470
  fapipublic_get_fundinginfo = fapiPublicGetFundingInfo = Entry('fundingInfo', 'fapiPublic', 'GET', {'cost': 1})
470
471
  fapipublic_get_premiumindex = fapiPublicGetPremiumIndex = Entry('premiumIndex', 'fapiPublic', 'GET', {'cost': 1})
@@ -517,6 +517,7 @@ class ImplicitAPI:
517
517
  fapipublic_get_continuousklines = fapiPublicGetContinuousKlines = Entry('continuousKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
518
518
  fapipublic_get_markpriceklines = fapiPublicGetMarkPriceKlines = Entry('markPriceKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
519
519
  fapipublic_get_indexpriceklines = fapiPublicGetIndexPriceKlines = Entry('indexPriceKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
520
+ fapipublic_get_premiumindexklines = fapiPublicGetPremiumIndexKlines = Entry('premiumIndexKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
520
521
  fapipublic_get_fundingrate = fapiPublicGetFundingRate = Entry('fundingRate', 'fapiPublic', 'GET', {'cost': 1})
521
522
  fapipublic_get_fundinginfo = fapiPublicGetFundingInfo = Entry('fundingInfo', 'fapiPublic', 'GET', {'cost': 1})
522
523
  fapipublic_get_premiumindex = fapiPublicGetPremiumIndex = Entry('premiumIndex', 'fapiPublic', 'GET', {'cost': 1})
@@ -465,6 +465,7 @@ class ImplicitAPI:
465
465
  fapipublic_get_continuousklines = fapiPublicGetContinuousKlines = Entry('continuousKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
466
466
  fapipublic_get_markpriceklines = fapiPublicGetMarkPriceKlines = Entry('markPriceKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
467
467
  fapipublic_get_indexpriceklines = fapiPublicGetIndexPriceKlines = Entry('indexPriceKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
468
+ fapipublic_get_premiumindexklines = fapiPublicGetPremiumIndexKlines = Entry('premiumIndexKlines', 'fapiPublic', 'GET', {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]})
468
469
  fapipublic_get_fundingrate = fapiPublicGetFundingRate = Entry('fundingRate', 'fapiPublic', 'GET', {'cost': 1})
469
470
  fapipublic_get_fundinginfo = fapiPublicGetFundingInfo = Entry('fundingInfo', 'fapiPublic', 'GET', {'cost': 1})
470
471
  fapipublic_get_premiumindex = fapiPublicGetPremiumIndex = Entry('premiumIndex', 'fapiPublic', 'GET', {'cost': 1})
ccxt/abstract/bitget.py CHANGED
@@ -101,6 +101,9 @@ class ImplicitAPI:
101
101
  private_spot_get_v2_spot_account_subaccount_assets = privateSpotGetV2SpotAccountSubaccountAssets = Entry('v2/spot/account/subaccount-assets', ['private', 'spot'], 'GET', {'cost': 2})
102
102
  private_spot_get_v2_spot_account_bills = privateSpotGetV2SpotAccountBills = Entry('v2/spot/account/bills', ['private', 'spot'], 'GET', {'cost': 2})
103
103
  private_spot_get_v2_spot_account_transferrecords = privateSpotGetV2SpotAccountTransferRecords = Entry('v2/spot/account/transferRecords', ['private', 'spot'], 'GET', {'cost': 1})
104
+ private_spot_get_v2_account_funding_assets = privateSpotGetV2AccountFundingAssets = Entry('v2/account/funding-assets', ['private', 'spot'], 'GET', {'cost': 2})
105
+ private_spot_get_v2_account_bot_assets = privateSpotGetV2AccountBotAssets = Entry('v2/account/bot-assets', ['private', 'spot'], 'GET', {'cost': 2})
106
+ private_spot_get_v2_account_all_account_balance = privateSpotGetV2AccountAllAccountBalance = Entry('v2/account/all-account-balance', ['private', 'spot'], 'GET', {'cost': 20})
104
107
  private_spot_get_v2_spot_wallet_deposit_address = privateSpotGetV2SpotWalletDepositAddress = Entry('v2/spot/wallet/deposit-address', ['private', 'spot'], 'GET', {'cost': 2})
105
108
  private_spot_get_v2_spot_wallet_deposit_records = privateSpotGetV2SpotWalletDepositRecords = Entry('v2/spot/wallet/deposit-records', ['private', 'spot'], 'GET', {'cost': 2})
106
109
  private_spot_get_v2_spot_wallet_withdrawal_records = privateSpotGetV2SpotWalletWithdrawalRecords = Entry('v2/spot/wallet/withdrawal-records', ['private', 'spot'], 'GET', {'cost': 2})
ccxt/abstract/coinex.py CHANGED
@@ -125,7 +125,7 @@ class ImplicitAPI:
125
125
  v1_perpetualprivate_post_order_cancel_by_client_id = v1PerpetualPrivatePostOrderCancelByClientId = Entry('order/cancel/by_client_id', ['v1', 'perpetualPrivate'], 'POST', {'cost': 20})
126
126
  v1_perpetualprivate_post_order_cancel_stop_by_client_id = v1PerpetualPrivatePostOrderCancelStopByClientId = Entry('order/cancel_stop/by_client_id', ['v1', 'perpetualPrivate'], 'POST', {'cost': 20})
127
127
  v1_perpetualprivate_post_market_preference = v1PerpetualPrivatePostMarketPreference = Entry('market/preference', ['v1', 'perpetualPrivate'], 'POST', {'cost': 20})
128
- v2_public_get_maintain_info = v2PublicGetMaintainInfo = Entry('maintain-info', ['v2', 'public'], 'GET', {'cost': 1})
128
+ v2_public_get_maintain_info = v2PublicGetMaintainInfo = Entry('maintain/info', ['v2', 'public'], 'GET', {'cost': 1})
129
129
  v2_public_get_ping = v2PublicGetPing = Entry('ping', ['v2', 'public'], 'GET', {'cost': 1})
130
130
  v2_public_get_time = v2PublicGetTime = Entry('time', ['v2', 'public'], 'GET', {'cost': 1})
131
131
  v2_public_get_spot_market = v2PublicGetSpotMarket = Entry('spot/market', ['v2', 'public'], 'GET', {'cost': 1})
ccxt/abstract/okx.py CHANGED
@@ -59,6 +59,9 @@ class ImplicitAPI:
59
59
  public_get_sprd_books = publicGetSprdBooks = Entry('sprd/books', 'public', 'GET', {'cost': 0.5})
60
60
  public_get_sprd_ticker = publicGetSprdTicker = Entry('sprd/ticker', 'public', 'GET', {'cost': 1})
61
61
  public_get_sprd_public_trades = publicGetSprdPublicTrades = Entry('sprd/public-trades', 'public', 'GET', {'cost': 0.2})
62
+ public_get_market_sprd_ticker = publicGetMarketSprdTicker = Entry('market/sprd-ticker', 'public', 'GET', {'cost': 2})
63
+ public_get_market_sprd_candles = publicGetMarketSprdCandles = Entry('market/sprd-candles', 'public', 'GET', {'cost': 2})
64
+ public_get_market_sprd_history_candles = publicGetMarketSprdHistoryCandles = Entry('market/sprd-history-candles', 'public', 'GET', {'cost': 2})
62
65
  public_get_tradingbot_grid_ai_param = publicGetTradingBotGridAiParam = Entry('tradingBot/grid/ai-param', 'public', 'GET', {'cost': 1})
63
66
  public_get_tradingbot_grid_min_investment = publicGetTradingBotGridMinInvestment = Entry('tradingBot/grid/min-investment', 'public', 'GET', {'cost': 1})
64
67
  public_get_tradingbot_public_rsi_back_testing = publicGetTradingBotPublicRsiBackTesting = Entry('tradingBot/public/rsi-back-testing', 'public', 'GET', {'cost': 1})
ccxt/ascendex.py CHANGED
@@ -2732,7 +2732,7 @@ class ascendex(Exchange, ImplicitAPI):
2732
2732
  'type': type,
2733
2733
  })
2734
2734
 
2735
- def parse_margin_modification(self, data, market: Market = None) -> MarginModification:
2735
+ def parse_margin_modification(self, data: dict, market: Market = None) -> MarginModification:
2736
2736
  #
2737
2737
  # addMargin/reduceMargin
2738
2738
  #
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.19'
7
+ __version__ = '4.3.21'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2732,7 +2732,7 @@ class ascendex(Exchange, ImplicitAPI):
2732
2732
  'type': type,
2733
2733
  })
2734
2734
 
2735
- def parse_margin_modification(self, data, market: Market = None) -> MarginModification:
2735
+ def parse_margin_modification(self, data: dict, market: Market = None) -> MarginModification:
2736
2736
  #
2737
2737
  # addMargin/reduceMargin
2738
2738
  #
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.3.19'
5
+ __version__ = '4.3.21'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -1841,6 +1841,8 @@ class Exchange(BaseExchange):
1841
1841
  response = None
1842
1842
  if method == 'fetchAccounts':
1843
1843
  response = await getattr(self, method)(params)
1844
+ elif method == 'getLeverageTiersPaginated':
1845
+ response = await getattr(self, method)(symbol, params)
1844
1846
  else:
1845
1847
  response = await getattr(self, method)(symbol, since, maxEntriesPerRequest, params)
1846
1848
  errors = 0
@@ -154,7 +154,7 @@ class binance(Exchange, ImplicitAPI):
154
154
  'fetchPositions': True,
155
155
  'fetchPositionsHistory': False,
156
156
  'fetchPositionsRisk': True,
157
- 'fetchPremiumIndexOHLCV': False,
157
+ 'fetchPremiumIndexOHLCV': True,
158
158
  'fetchSettlementHistory': True,
159
159
  'fetchStatus': True,
160
160
  'fetchTicker': True,
@@ -803,6 +803,7 @@ class binance(Exchange, ImplicitAPI):
803
803
  'continuousKlines': {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]},
804
804
  'markPriceKlines': {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]},
805
805
  'indexPriceKlines': {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]},
806
+ 'premiumIndexKlines': {'cost': 1, 'byLimit': [[99, 1], [499, 2], [1000, 5], [10000, 10]]},
806
807
  'fundingRate': 1,
807
808
  'fundingInfo': 1,
808
809
  'premiumIndex': 1,
@@ -4156,6 +4157,11 @@ class binance(Exchange, ImplicitAPI):
4156
4157
  response = await self.dapiPublicGetIndexPriceKlines(self.extend(request, params))
4157
4158
  else:
4158
4159
  response = await self.fapiPublicGetIndexPriceKlines(self.extend(request, params))
4160
+ elif price == 'premiumIndex':
4161
+ if market['inverse']:
4162
+ response = await self.dapiPublicGetPremiumIndexKlines(self.extend(request, params))
4163
+ else:
4164
+ response = await self.fapiPublicGetPremiumIndexKlines(self.extend(request, params))
4159
4165
  elif market['linear']:
4160
4166
  response = await self.fapiPublicGetKlines(self.extend(request, params))
4161
4167
  elif market['inverse']:
@@ -10357,7 +10363,7 @@ class binance(Exchange, ImplicitAPI):
10357
10363
  'code': code,
10358
10364
  })
10359
10365
 
10360
- def parse_margin_modification(self, data, market: Market = None) -> MarginModification:
10366
+ def parse_margin_modification(self, data: dict, market: Market = None) -> MarginModification:
10361
10367
  #
10362
10368
  # add/reduce margin
10363
10369
  #
@@ -3437,7 +3437,7 @@ class bingx(Exchange, ImplicitAPI):
3437
3437
  #
3438
3438
  return self.parse_margin_modification(response, market)
3439
3439
 
3440
- def parse_margin_modification(self, data, market: Market = None) -> MarginModification:
3440
+ def parse_margin_modification(self, data: dict, market: Market = None) -> MarginModification:
3441
3441
  #
3442
3442
  # {
3443
3443
  # "code": 0,
@@ -332,6 +332,9 @@ class bitget(Exchange, ImplicitAPI):
332
332
  'v2/spot/account/subaccount-assets': 2,
333
333
  'v2/spot/account/bills': 2,
334
334
  'v2/spot/account/transferRecords': 1,
335
+ 'v2/account/funding-assets': 2,
336
+ 'v2/account/bot-assets': 2,
337
+ 'v2/account/all-account-balance': 20,
335
338
  'v2/spot/wallet/deposit-address': 2,
336
339
  'v2/spot/wallet/deposit-records': 2,
337
340
  'v2/spot/wallet/withdrawal-records': 2,
@@ -6476,7 +6479,7 @@ class bitget(Exchange, ImplicitAPI):
6476
6479
  'type': type,
6477
6480
  })
6478
6481
 
6479
- def parse_margin_modification(self, data, market: Market = None) -> MarginModification:
6482
+ def parse_margin_modification(self, data: dict, market: Market = None) -> MarginModification:
6480
6483
  #
6481
6484
  # addMargin/reduceMargin
6482
6485
  #
@@ -253,6 +253,7 @@ class bitmex(Exchange, ImplicitAPI):
253
253
  'orderQty is invalid': InvalidOrder,
254
254
  'Invalid price': InvalidOrder,
255
255
  'Invalid stopPx for ordType': InvalidOrder,
256
+ 'Account is restricted': PermissionDenied, # {"error":{"message":"Account is restricted","name":"HTTPError"}}
256
257
  },
257
258
  'broad': {
258
259
  'Signature not valid': AuthenticationError,
@@ -7582,6 +7582,33 @@ class bybit(Exchange, ImplicitAPI):
7582
7582
  'datetime': self.iso8601(timestamp),
7583
7583
  })
7584
7584
 
7585
+ async def get_leverage_tiers_paginated(self, symbol: Str = None, params={}):
7586
+ await self.load_markets()
7587
+ market = None
7588
+ if symbol is not None:
7589
+ market = self.market(symbol)
7590
+ paginate = False
7591
+ paginate, params = self.handle_option_and_params(params, 'getLeverageTiersPaginated', 'paginate')
7592
+ if paginate:
7593
+ return await self.fetch_paginated_call_cursor('getLeverageTiersPaginated', symbol, None, None, params, 'nextPageCursor', 'cursor', None, 100)
7594
+ subType = None
7595
+ subType, params = self.handle_sub_type_and_params('getLeverageTiersPaginated', market, params, 'linear')
7596
+ request = {
7597
+ 'category': subType,
7598
+ }
7599
+ response = await self.publicGetV5MarketRiskLimit(self.extend(request, params))
7600
+ result = self.add_pagination_cursor_to_result(response)
7601
+ first = self.safe_dict(result, 0)
7602
+ total = len(result)
7603
+ lastIndex = total - 1
7604
+ last = self.safe_dict(result, lastIndex)
7605
+ cursorValue = self.safe_string(first, 'nextPageCursor')
7606
+ last['info'] = {
7607
+ 'nextPageCursor': cursorValue,
7608
+ }
7609
+ result[lastIndex] = last
7610
+ return result
7611
+
7585
7612
  async def fetch_leverage_tiers(self, symbols: Strings = None, params={}):
7586
7613
  """
7587
7614
  :see: https://bybit-exchange.github.io/docs/v5/market/risk-limit
@@ -7589,22 +7616,18 @@ class bybit(Exchange, ImplicitAPI):
7589
7616
  :param str[] [symbols]: a list of unified market symbols
7590
7617
  :param dict [params]: extra parameters specific to the exchange API endpoint
7591
7618
  :param str [params.subType]: market subType, ['linear', 'inverse'], default is 'linear'
7619
+ :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [available parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
7592
7620
  :returns dict: a dictionary of `leverage tiers structures <https://docs.ccxt.com/#/?id=leverage-tiers-structure>`, indexed by market symbols
7593
7621
  """
7594
7622
  await self.load_markets()
7595
7623
  market = None
7624
+ symbol = None
7596
7625
  if symbols is not None:
7597
7626
  market = self.market(symbols[0])
7598
7627
  if market['spot']:
7599
7628
  raise NotSupported(self.id + ' fetchLeverageTiers() is not supported for spot market')
7600
- subType = None
7601
- subType, params = self.handle_sub_type_and_params('fetchTickers', market, params, 'linear')
7602
- request = {
7603
- 'category': subType,
7604
- }
7605
- response = await self.publicGetV5MarketRiskLimit(self.extend(request, params))
7606
- result = self.safe_dict(response, 'result', {})
7607
- data = self.safe_list(result, 'list', [])
7629
+ symbol = market['symbol']
7630
+ data = await self.get_leverage_tiers_paginated(symbol, self.extend({'paginate': True, 'paginationCalls': 20}, params))
7608
7631
  symbols = self.market_symbols(symbols)
7609
7632
  return self.parse_leverage_tiers(data, symbols, 'symbol')
7610
7633
 
@@ -7630,9 +7653,12 @@ class bybit(Exchange, ImplicitAPI):
7630
7653
  for i in range(0, len(keys)):
7631
7654
  marketId = keys[i]
7632
7655
  entry = grouped[marketId]
7656
+ for j in range(0, len(entry)):
7657
+ id = self.safe_integer(entry[j], 'id')
7658
+ entry[j]['id'] = id
7633
7659
  market = self.safe_market(marketId, None, None, 'contract')
7634
7660
  symbol = market['symbol']
7635
- tiers[symbol] = self.parse_market_leverage_tiers(entry, market)
7661
+ tiers[symbol] = self.parse_market_leverage_tiers(self.sort_by(entry, 'id'), market)
7636
7662
  return tiers
7637
7663
 
7638
7664
  def parse_market_leverage_tiers(self, info, market: Market = None):