ccxt 4.4.61__py2.py3-none-any.whl → 4.4.63__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 CHANGED
@@ -22,7 +22,7 @@
22
22
 
23
23
  # ----------------------------------------------------------------------------
24
24
 
25
- __version__ = '4.4.61'
25
+ __version__ = '4.4.63'
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
ccxt/abstract/bitmart.py CHANGED
@@ -28,6 +28,7 @@ class ImplicitAPI:
28
28
  public_get_contract_public_funding_rate_history = publicGetContractPublicFundingRateHistory = Entry('contract/public/funding-rate-history', 'public', 'GET', {'cost': 30})
29
29
  public_get_contract_public_kline = publicGetContractPublicKline = Entry('contract/public/kline', 'public', 'GET', {'cost': 6})
30
30
  public_get_account_v1_currencies = publicGetAccountV1Currencies = Entry('account/v1/currencies', 'public', 'GET', {'cost': 30})
31
+ public_get_contract_public_markprice_kline = publicGetContractPublicMarkpriceKline = Entry('contract/public/markprice-kline', 'public', 'GET', {'cost': 5})
31
32
  private_get_account_sub_account_v1_transfer_list = privateGetAccountSubAccountV1TransferList = Entry('account/sub-account/v1/transfer-list', 'private', 'GET', {'cost': 7.5})
32
33
  private_get_account_sub_account_v1_transfer_history = privateGetAccountSubAccountV1TransferHistory = Entry('account/sub-account/v1/transfer-history', 'private', 'GET', {'cost': 7.5})
33
34
  private_get_account_sub_account_main_v1_wallet = privateGetAccountSubAccountMainV1Wallet = Entry('account/sub-account/main/v1/wallet', 'private', 'GET', {'cost': 5})
@@ -42,6 +43,7 @@ class ImplicitAPI:
42
43
  private_get_account_v1_withdraw_charge = privateGetAccountV1WithdrawCharge = Entry('account/v1/withdraw/charge', 'private', 'GET', {'cost': 32})
43
44
  private_get_account_v2_deposit_withdraw_history = privateGetAccountV2DepositWithdrawHistory = Entry('account/v2/deposit-withdraw/history', 'private', 'GET', {'cost': 7.5})
44
45
  private_get_account_v1_deposit_withdraw_detail = privateGetAccountV1DepositWithdrawDetail = Entry('account/v1/deposit-withdraw/detail', 'private', 'GET', {'cost': 7.5})
46
+ private_get_account_v1_withdraw_address_list = privateGetAccountV1WithdrawAddressList = Entry('account/v1/withdraw/address/list', 'private', 'GET', {'cost': 30})
45
47
  private_get_spot_v1_order_detail = privateGetSpotV1OrderDetail = Entry('spot/v1/order_detail', 'private', 'GET', {'cost': 1})
46
48
  private_get_spot_v2_orders = privateGetSpotV2Orders = Entry('spot/v2/orders', 'private', 'GET', {'cost': 5})
47
49
  private_get_spot_v1_trades = privateGetSpotV1Trades = Entry('spot/v1/trades', 'private', 'GET', {'cost': 5})
@@ -91,7 +93,7 @@ class ImplicitAPI:
91
93
  private_post_spot_v3_cancel_order = privatePostSpotV3CancelOrder = Entry('spot/v3/cancel_order', 'private', 'POST', {'cost': 1})
92
94
  private_post_spot_v2_batch_orders = privatePostSpotV2BatchOrders = Entry('spot/v2/batch_orders', 'private', 'POST', {'cost': 1})
93
95
  private_post_spot_v2_submit_order = privatePostSpotV2SubmitOrder = Entry('spot/v2/submit_order', 'private', 'POST', {'cost': 1})
94
- private_post_spot_v1_margin_submit_order = privatePostSpotV1MarginSubmitOrder = Entry('spot/v1/margin/submit_order', 'private', 'POST', {'cost': 1})
96
+ private_post_spot_v1_margin_submit_order = privatePostSpotV1MarginSubmitOrder = Entry('spot/v1/margin/submit_order', 'private', 'POST', {'cost': 1.5})
95
97
  private_post_spot_v1_margin_isolated_borrow = privatePostSpotV1MarginIsolatedBorrow = Entry('spot/v1/margin/isolated/borrow', 'private', 'POST', {'cost': 30})
96
98
  private_post_spot_v1_margin_isolated_repay = privatePostSpotV1MarginIsolatedRepay = Entry('spot/v1/margin/isolated/repay', 'private', 'POST', {'cost': 30})
97
99
  private_post_spot_v1_margin_isolated_transfer = privatePostSpotV1MarginIsolatedTransfer = Entry('spot/v1/margin/isolated/transfer', 'private', 'POST', {'cost': 30})
@@ -107,3 +109,5 @@ class ImplicitAPI:
107
109
  private_post_contract_private_modify_plan_order = privatePostContractPrivateModifyPlanOrder = Entry('contract/private/modify-plan-order', 'private', 'POST', {'cost': 2.5})
108
110
  private_post_contract_private_modify_preset_plan_order = privatePostContractPrivateModifyPresetPlanOrder = Entry('contract/private/modify-preset-plan-order', 'private', 'POST', {'cost': 2.5})
109
111
  private_post_contract_private_modify_tp_sl_order = privatePostContractPrivateModifyTpSlOrder = Entry('contract/private/modify-tp-sl-order', 'private', 'POST', {'cost': 2.5})
112
+ private_post_contract_private_submit_trail_order = privatePostContractPrivateSubmitTrailOrder = Entry('contract/private/submit-trail-order', 'private', 'POST', {'cost': 2.5})
113
+ private_post_contract_private_cancel_trail_order = privatePostContractPrivateCancelTrailOrder = Entry('contract/private/cancel-trail-order', 'private', 'POST', {'cost': 1.5})
ccxt/abstract/bybit.py CHANGED
@@ -48,6 +48,7 @@ class ImplicitAPI:
48
48
  public_get_v5_spot_lever_token_info = publicGetV5SpotLeverTokenInfo = Entry('v5/spot-lever-token/info', 'public', 'GET', {'cost': 5})
49
49
  public_get_v5_spot_lever_token_reference = publicGetV5SpotLeverTokenReference = Entry('v5/spot-lever-token/reference', 'public', 'GET', {'cost': 5})
50
50
  public_get_v5_spot_margin_trade_data = publicGetV5SpotMarginTradeData = Entry('v5/spot-margin-trade/data', 'public', 'GET', {'cost': 5})
51
+ public_get_v5_spot_margin_trade_collateral = publicGetV5SpotMarginTradeCollateral = Entry('v5/spot-margin-trade/collateral', 'public', 'GET', {'cost': 5})
51
52
  public_get_v5_spot_cross_margin_trade_data = publicGetV5SpotCrossMarginTradeData = Entry('v5/spot-cross-margin-trade/data', 'public', 'GET', {'cost': 5})
52
53
  public_get_v5_spot_cross_margin_trade_pledge_token = publicGetV5SpotCrossMarginTradePledgeToken = Entry('v5/spot-cross-margin-trade/pledge-token', 'public', 'GET', {'cost': 5})
53
54
  public_get_v5_spot_cross_margin_trade_borrow_token = publicGetV5SpotCrossMarginTradeBorrowToken = Entry('v5/spot-cross-margin-trade/borrow-token', 'public', 'GET', {'cost': 5})
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.61'
7
+ __version__ = '4.4.63'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.61'
5
+ __version__ = '4.4.63'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -74,18 +74,20 @@ class Exchange(BaseExchange):
74
74
  self.verify = config.get('verify', self.verify)
75
75
  self.own_session = 'session' not in config
76
76
  self.cafile = config.get('cafile', certifi.where())
77
+ self.throttler = None
77
78
  super(Exchange, self).__init__(config)
78
- self.throttle = None
79
- self.init_rest_rate_limiter()
80
79
  self.markets_loading = None
81
80
  self.reloading_markets = False
82
81
 
83
- def init_rest_rate_limiter(self):
84
- self.throttle = Throttler(self.tokenBucket, self.asyncio_loop)
85
-
86
82
  def get_event_loop(self):
87
83
  return self.asyncio_loop
88
84
 
85
+ def init_throttler(self, cost=None):
86
+ self.throttler = Throttler(self.tokenBucket, self.asyncio_loop)
87
+
88
+ async def throttle(self, cost=None):
89
+ return await self.throttler(cost)
90
+
89
91
  def get_session(self):
90
92
  return self.session
91
93
 
@@ -107,7 +109,7 @@ class Exchange(BaseExchange):
107
109
  self.asyncio_loop = asyncio.get_running_loop()
108
110
  else:
109
111
  self.asyncio_loop = asyncio.get_event_loop()
110
- self.throttle.loop = self.asyncio_loop
112
+ self.throttler.loop = self.asyncio_loop
111
113
 
112
114
  if self.ssl_context is None:
113
115
  # Create our SSL context object with our CA cert file
@@ -4455,13 +4455,12 @@ class bingx(Exchange, ImplicitAPI):
4455
4455
  :param boolean [params.twap]: if fetching twap orders
4456
4456
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
4457
4457
  """
4458
- if symbol is None:
4459
- raise ArgumentsRequired(self.id + ' fetchClosedOrders() requires a symbol argument')
4460
4458
  await self.load_markets()
4461
- market = self.market(symbol)
4462
- request: dict = {
4463
- 'symbol': market['id'],
4464
- }
4459
+ market = None
4460
+ request: dict = {}
4461
+ if symbol is not None:
4462
+ market = self.market(symbol)
4463
+ request['symbol'] = market['id']
4465
4464
  type = None
4466
4465
  subType = None
4467
4466
  standard = None
@@ -4473,7 +4472,7 @@ class bingx(Exchange, ImplicitAPI):
4473
4472
  response = await self.contractV1PrivateGetAllOrders(self.extend(request, params))
4474
4473
  elif type == 'spot':
4475
4474
  if limit is not None:
4476
- request['limit'] = limit
4475
+ request['pageSize'] = limit
4477
4476
  response = await self.spotV1PrivateGetTradeHistoryOrders(self.extend(request, params))
4478
4477
  #
4479
4478
  # {