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.
- ccxt/__init__.py +1 -1
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bigone.py +1 -1
- ccxt/async_support/binance.py +290 -329
- ccxt/async_support/binancecoinm.py +1 -0
- ccxt/async_support/binanceusdm.py +2 -0
- ccxt/async_support/bybit.py +32 -0
- ccxt/async_support/exmo.py +1 -1
- ccxt/base/exchange.py +1 -1
- ccxt/bigone.py +1 -1
- ccxt/binance.py +290 -329
- ccxt/binancecoinm.py +1 -0
- ccxt/binanceusdm.py +2 -0
- ccxt/bybit.py +32 -0
- ccxt/exmo.py +1 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +36 -36
- ccxt/pro/binancecoinm.py +1 -0
- ccxt/pro/binanceusdm.py +2 -0
- {ccxt-4.3.50.dist-info → ccxt-4.3.51.dist-info}/METADATA +6 -6
- {ccxt-4.3.50.dist-info → ccxt-4.3.51.dist-info}/RECORD +24 -24
- {ccxt-4.3.50.dist-info → ccxt-4.3.51.dist-info}/WHEEL +0 -0
- {ccxt-4.3.50.dist-info → ccxt-4.3.51.dist-info}/top_level.txt +0 -0
@@ -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."}
|
ccxt/async_support/bybit.py
CHANGED
@@ -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
|
ccxt/async_support/exmo.py
CHANGED
@@ -30,7 +30,7 @@ class exmo(Exchange, ImplicitAPI):
|
|
30
30
|
'id': 'exmo',
|
31
31
|
'name': 'EXMO',
|
32
32
|
'countries': ['LT'], # Lithuania
|
33
|
-
'rateLimit':
|
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
ccxt/bigone.py
CHANGED