ccxt 4.4.35__py2.py3-none-any.whl → 4.4.36__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 +3 -1
- ccxt/abstract/bitopro.py +1 -0
- ccxt/abstract/bybit.py +15 -0
- ccxt/abstract/defx.py +69 -0
- ccxt/abstract/deribit.py +1 -0
- ccxt/abstract/gate.py +14 -0
- ccxt/abstract/gateio.py +14 -0
- ccxt/async_support/__init__.py +3 -1
- ccxt/async_support/base/exchange.py +1 -1
- ccxt/async_support/bitfinex2.py +18 -13
- ccxt/async_support/bitmex.py +103 -1
- ccxt/async_support/bitopro.py +21 -4
- ccxt/async_support/bitso.py +2 -1
- ccxt/async_support/bybit.py +21 -1
- ccxt/async_support/defx.py +1981 -0
- ccxt/async_support/deribit.py +27 -12
- ccxt/async_support/gate.py +14 -0
- ccxt/async_support/htx.py +11 -2
- ccxt/async_support/kraken.py +39 -41
- ccxt/base/exchange.py +1 -1
- ccxt/bitfinex2.py +18 -13
- ccxt/bitmex.py +103 -1
- ccxt/bitopro.py +21 -4
- ccxt/bitso.py +2 -1
- ccxt/bybit.py +21 -1
- ccxt/defx.py +1980 -0
- ccxt/deribit.py +27 -12
- ccxt/gate.py +14 -0
- ccxt/htx.py +11 -2
- ccxt/kraken.py +39 -41
- ccxt/pro/__init__.py +3 -1
- ccxt/pro/defx.py +832 -0
- ccxt/test/tests_async.py +15 -1
- ccxt/test/tests_sync.py +15 -1
- {ccxt-4.4.35.dist-info → ccxt-4.4.36.dist-info}/METADATA +7 -6
- {ccxt-4.4.35.dist-info → ccxt-4.4.36.dist-info}/RECORD +39 -35
- {ccxt-4.4.35.dist-info → ccxt-4.4.36.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.35.dist-info → ccxt-4.4.36.dist-info}/WHEEL +0 -0
- {ccxt-4.4.35.dist-info → ccxt-4.4.36.dist-info}/top_level.txt +0 -0
ccxt/async_support/bitopro.py
CHANGED
@@ -153,6 +153,7 @@ class bitopro(Exchange, ImplicitAPI):
|
|
153
153
|
'wallet/withdraw/{currency}/id/{id}': 1,
|
154
154
|
'wallet/depositHistory/{currency}': 1,
|
155
155
|
'wallet/withdrawHistory/{currency}': 1,
|
156
|
+
'orders/open': 1,
|
156
157
|
},
|
157
158
|
'post': {
|
158
159
|
'orders/{pair}': 1 / 2, # 1200/m => 20/s => 10/20 = 1/2
|
@@ -1248,10 +1249,26 @@ class bitopro(Exchange, ImplicitAPI):
|
|
1248
1249
|
return self.parse_orders(orders, market, since, limit)
|
1249
1250
|
|
1250
1251
|
async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1252
|
+
"""
|
1253
|
+
fetch all unfilled currently open orders
|
1254
|
+
|
1255
|
+
https://github.com/bitoex/bitopro-offical-api-docs/blob/master/api/v3/private/get_open_orders_data.md
|
1256
|
+
|
1257
|
+
:param str symbol: unified market symbol
|
1258
|
+
:param int [since]: the earliest time in ms to fetch open orders for
|
1259
|
+
:param int [limit]: the maximum number of open orders structures to retrieve
|
1260
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1261
|
+
:returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
|
1262
|
+
"""
|
1263
|
+
await self.load_markets()
|
1264
|
+
request: dict = {}
|
1265
|
+
market = None
|
1266
|
+
if symbol is not None:
|
1267
|
+
market = self.market(symbol)
|
1268
|
+
request['pair'] = market['id']
|
1269
|
+
response = await self.privateGetOrdersOpen(self.extend(request, params))
|
1270
|
+
orders = self.safe_list(response, 'data', [])
|
1271
|
+
return self.parse_orders(orders, market, since, limit)
|
1255
1272
|
|
1256
1273
|
async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
|
1257
1274
|
"""
|
ccxt/async_support/bitso.py
CHANGED
@@ -1683,6 +1683,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1683
1683
|
if api == 'private':
|
1684
1684
|
self.check_required_credentials()
|
1685
1685
|
nonce = str(self.nonce())
|
1686
|
+
endpoint = '/api' + endpoint
|
1686
1687
|
request = ''.join([nonce, method, endpoint])
|
1687
1688
|
if method != 'GET' and method != 'DELETE':
|
1688
1689
|
if query:
|
@@ -1692,7 +1693,7 @@ class bitso(Exchange, ImplicitAPI):
|
|
1692
1693
|
auth = self.apiKey + ':' + nonce + ':' + signature
|
1693
1694
|
headers = {
|
1694
1695
|
'Authorization': 'Bitso ' + auth,
|
1695
|
-
'Content-Type': 'application/json',
|
1696
|
+
# 'Content-Type': 'application/json',
|
1696
1697
|
}
|
1697
1698
|
return {'url': url, 'method': method, 'body': body, 'headers': headers}
|
1698
1699
|
|
ccxt/async_support/bybit.py
CHANGED
@@ -258,6 +258,9 @@ class bybit(Exchange, ImplicitAPI):
|
|
258
258
|
'v5/spot-cross-margin-trade/data': 5,
|
259
259
|
'v5/spot-cross-margin-trade/pledge-token': 5,
|
260
260
|
'v5/spot-cross-margin-trade/borrow-token': 5,
|
261
|
+
# crypto loan
|
262
|
+
'v5/crypto-loan/collateral-data': 5,
|
263
|
+
'v5/crypto-loan/loanable-data': 5,
|
261
264
|
# institutional lending
|
262
265
|
'v5/ins-loan/product-infos': 5,
|
263
266
|
'v5/ins-loan/ensure-tokens-convert': 5,
|
@@ -385,6 +388,8 @@ class bybit(Exchange, ImplicitAPI):
|
|
385
388
|
'v5/user/aff-customer-info': 5,
|
386
389
|
'v5/user/del-submember': 5,
|
387
390
|
'v5/user/submembers': 5,
|
391
|
+
# affilate
|
392
|
+
'v5/affiliate/aff-user-list': 5,
|
388
393
|
# spot leverage token
|
389
394
|
'v5/spot-lever-token/order-record': 1, # 50/s => cost = 50 / 50 = 1
|
390
395
|
# spot margin trade
|
@@ -394,6 +399,13 @@ class bybit(Exchange, ImplicitAPI):
|
|
394
399
|
'v5/spot-cross-margin-trade/account': 1, # 50/s => cost = 50 / 50 = 1
|
395
400
|
'v5/spot-cross-margin-trade/orders': 1, # 50/s => cost = 50 / 50 = 1
|
396
401
|
'v5/spot-cross-margin-trade/repay-history': 1, # 50/s => cost = 50 / 50 = 1
|
402
|
+
# crypto loan
|
403
|
+
'v5/crypto-loan/borrowable-collateralisable-number': 5,
|
404
|
+
'v5/crypto-loan/ongoing-orders': 5,
|
405
|
+
'v5/crypto-loan/repayment-history': 5,
|
406
|
+
'v5/crypto-loan/borrow-history': 5,
|
407
|
+
'v5/crypto-loan/max-collateral-amount': 5,
|
408
|
+
'v5/crypto-loan/adjustment-history': 5,
|
397
409
|
# institutional lending
|
398
410
|
'v5/ins-loan/product-infos': 5,
|
399
411
|
'v5/ins-loan/ensure-tokens-convert': 5,
|
@@ -405,7 +417,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
405
417
|
'v5/lending/history-order': 5,
|
406
418
|
'v5/lending/account': 5,
|
407
419
|
# broker
|
408
|
-
'v5/broker/earning-record': 5,
|
420
|
+
'v5/broker/earning-record': 5, # deprecated
|
409
421
|
'v5/broker/earnings-info': 5,
|
410
422
|
'v5/broker/account-info': 5,
|
411
423
|
'v5/broker/asset/query-sub-member-deposit-record': 10,
|
@@ -526,6 +538,10 @@ class bybit(Exchange, ImplicitAPI):
|
|
526
538
|
'v5/spot-cross-margin-trade/loan': 2.5, # 20/s => cost = 50 / 20 = 2.5
|
527
539
|
'v5/spot-cross-margin-trade/repay': 2.5, # 20/s => cost = 50 / 20 = 2.5
|
528
540
|
'v5/spot-cross-margin-trade/switch': 2.5, # 20/s => cost = 50 / 20 = 2.5
|
541
|
+
# crypto loan
|
542
|
+
'v5/crypto-loan/borrow': 5,
|
543
|
+
'v5/crypto-loan/repay': 5,
|
544
|
+
'v5/crypto-loan/adjust-ltv': 5,
|
529
545
|
# institutional lending
|
530
546
|
'v5/ins-loan/association-uid': 5,
|
531
547
|
# c2c lending
|
@@ -536,6 +552,10 @@ class bybit(Exchange, ImplicitAPI):
|
|
536
552
|
'v5/account/set-collateral-switch-batch': 5,
|
537
553
|
# demo trading
|
538
554
|
'v5/account/demo-apply-money': 5,
|
555
|
+
# broker
|
556
|
+
'v5/broker/award/info': 5,
|
557
|
+
'v5/broker/award/distribute-award': 5,
|
558
|
+
'v5/broker/award/distribution-record': 5,
|
539
559
|
},
|
540
560
|
},
|
541
561
|
},
|