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.
- ccxt/__init__.py +1 -1
- ccxt/abstract/okx.py +1 -0
- 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 +292 -331
- ccxt/async_support/binancecoinm.py +1 -0
- ccxt/async_support/binanceusdm.py +2 -0
- ccxt/async_support/bybit.py +37 -0
- ccxt/async_support/exmo.py +1 -1
- ccxt/async_support/krakenfutures.py +1 -0
- ccxt/async_support/okx.py +1 -0
- ccxt/base/exchange.py +1 -1
- ccxt/bigone.py +1 -1
- ccxt/binance.py +292 -331
- ccxt/binancecoinm.py +1 -0
- ccxt/binanceusdm.py +2 -0
- ccxt/bybit.py +37 -0
- ccxt/exmo.py +1 -1
- ccxt/krakenfutures.py +1 -0
- ccxt/okx.py +1 -0
- 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/pro/okx.py +1 -1
- ccxt-4.3.52.dist-info/LICENSE.txt +21 -0
- {ccxt-4.3.50.dist-info → ccxt-4.3.52.dist-info}/METADATA +18 -17
- {ccxt-4.3.50.dist-info → ccxt-4.3.52.dist-info}/RECORD +31 -30
- {ccxt-4.3.50.dist-info → ccxt-4.3.52.dist-info}/WHEEL +1 -1
- {ccxt-4.3.50.dist-info → ccxt-4.3.52.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
|
@@ -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 = {}
|
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,
|
@@ -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
ccxt/base/exchange.py
CHANGED
ccxt/bigone.py
CHANGED