ccxt 4.3.50__py2.py3-none-any.whl → 4.3.51__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
@@ -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,
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.50'
7
+ __version__ = '4.3.51'
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,