ccxt 4.3.50__py2.py3-none-any.whl → 4.3.52__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.
@@ -18,6 +18,7 @@ class binancecoinm(binance, ImplicitAPI):
18
18
  'doc': [
19
19
  'https://binance-docs.github.io/apidocs/delivery/en/',
20
20
  'https://binance-docs.github.io/apidocs/spot/en',
21
+ 'https://developers.binance.com/en',
21
22
  ],
22
23
  },
23
24
  'has': {
@@ -19,6 +19,7 @@ class binanceusdm(binance, ImplicitAPI):
19
19
  'doc': [
20
20
  'https://binance-docs.github.io/apidocs/futures/en/',
21
21
  'https://binance-docs.github.io/apidocs/spot/en',
22
+ 'https://developers.binance.com/en',
22
23
  ],
23
24
  },
24
25
  'has': {
@@ -40,6 +41,7 @@ class binanceusdm(binance, ImplicitAPI):
40
41
  'marginModes': {},
41
42
  },
42
43
  # https://binance-docs.github.io/apidocs/futures/en/#error-codes
44
+ # https://developers.binance.com/docs/derivatives/usds-margined-futures/error-code
43
45
  'exceptions': {
44
46
  'exact': {
45
47
  '-5021': InvalidOrder, # {"code":-5021,"msg":"Due to the order could not be filled immediately, the FOK order has been rejected."}
@@ -49,6 +49,7 @@ class bybit(Exchange, ImplicitAPI):
49
49
  'option': True,
50
50
  'borrowCrossMargin': True,
51
51
  'cancelAllOrders': True,
52
+ 'cancelAllOrdersAfter': True,
52
53
  'cancelOrder': True,
53
54
  'cancelOrders': True,
54
55
  'cancelOrdersForSymbols': True,
@@ -4109,6 +4110,37 @@ class bybit(Exchange, ImplicitAPI):
4109
4110
  row = self.safe_list(result, 'list', [])
4110
4111
  return self.parse_orders(row, market)
4111
4112
 
4113
+ async def cancel_all_orders_after(self, timeout: Int, params={}):
4114
+ """
4115
+ dead man's switch, cancel all orders after the given timeout
4116
+ :see: https://bybit-exchange.github.io/docs/v5/order/dcp
4117
+ :param number timeout: time in milliseconds
4118
+ :param dict [params]: extra parameters specific to the exchange API endpoint
4119
+ :param str [params.product]: OPTIONS, DERIVATIVES, SPOT, default is 'DERIVATIVES'
4120
+ :returns dict: the api result
4121
+ """
4122
+ await self.load_markets()
4123
+ request: dict = {
4124
+ 'timeWindow': self.parse_to_int(timeout / 1000),
4125
+ }
4126
+ type: Str = None
4127
+ type, params = self.handle_market_type_and_params('cancelAllOrdersAfter', None, params, 'swap')
4128
+ productMap = {
4129
+ 'spot': 'SPOT',
4130
+ 'swap': 'DERIVATIVES',
4131
+ 'option': 'OPTIONS',
4132
+ }
4133
+ product = self.safe_string(productMap, type, type)
4134
+ request['product'] = product
4135
+ response = await self.privatePostV5OrderDisconnectedCancelAll(self.extend(request, params))
4136
+ #
4137
+ # {
4138
+ # "retCode": 0,
4139
+ # "retMsg": "success"
4140
+ # }
4141
+ #
4142
+ return response
4143
+
4112
4144
  async def cancel_orders_for_symbols(self, orders: List[CancellationRequest], params={}):
4113
4145
  """
4114
4146
  cancel multiple orders for multiple symbols
@@ -4807,9 +4839,14 @@ class bybit(Exchange, ImplicitAPI):
4807
4839
  :param str [params.baseCoin]: Base coin. Supports linear, inverse & option
4808
4840
  :param str [params.settleCoin]: Settle coin. Supports linear, inverse & option
4809
4841
  :param str [params.orderFilter]: 'Order' or 'StopOrder' or 'tpslOrder'
4842
+ :param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
4810
4843
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
4811
4844
  """
4812
4845
  await self.load_markets()
4846
+ paginate = False
4847
+ paginate, params = self.handle_option_and_params(params, 'fetchOpenOrders', 'paginate')
4848
+ if paginate:
4849
+ return await self.fetch_paginated_call_cursor('fetchOpenOrders', symbol, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
4813
4850
  enableUnifiedMargin, enableUnifiedAccount = await self.is_unified_enabled()
4814
4851
  isUnifiedAccount = (enableUnifiedMargin or enableUnifiedAccount)
4815
4852
  request: dict = {}
@@ -30,7 +30,7 @@ class exmo(Exchange, ImplicitAPI):
30
30
  'id': 'exmo',
31
31
  'name': 'EXMO',
32
32
  'countries': ['LT'], # Lithuania
33
- 'rateLimit': 350, # once every 350 ms ≈ 180 requests per minute ≈ 3 requests per second
33
+ 'rateLimit': 100, # 10 requests per 1 second
34
34
  'version': 'v1.1',
35
35
  'has': {
36
36
  'CORS': None,
@@ -96,6 +96,7 @@ class krakenfutures(Exchange, ImplicitAPI):
96
96
  'public': 'https://demo-futures.kraken.com/derivatives/api/',
97
97
  'private': 'https://demo-futures.kraken.com/derivatives/api/',
98
98
  'charts': 'https://demo-futures.kraken.com/api/charts/',
99
+ 'history': 'https://demo-futures.kraken.com/api/history/',
99
100
  'www': 'https://demo-futures.kraken.com',
100
101
  },
101
102
  'logo': 'https://user-images.githubusercontent.com/24300605/81436764-b22fd580-9172-11ea-9703-742783e6376d.jpg',
ccxt/async_support/okx.py CHANGED
@@ -456,6 +456,7 @@ class okx(Exchange, ImplicitAPI):
456
456
  'sprd/cancel-order': 1,
457
457
  'sprd/mass-cancel': 1,
458
458
  'sprd/amend-order': 1,
459
+ 'sprd/cancel-all-after': 10,
459
460
  # trade
460
461
  'trade/order': 1 / 3,
461
462
  'trade/batch-orders': 1 / 15,
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.50'
7
+ __version__ = '4.3.52'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/bigone.py CHANGED
@@ -29,7 +29,7 @@ class bigone(Exchange, ImplicitAPI):
29
29
  'name': 'BigONE',
30
30
  'countries': ['CN'],
31
31
  'version': 'v3',
32
- 'rateLimit': 1200, # 500 request per 10 minutes
32
+ 'rateLimit': 20, # 500 requests per 10 seconds
33
33
  'has': {
34
34
  'CORS': None,
35
35
  'spot': True,