ccxt 3.1.53__py2.py3-none-any.whl → 3.1.54__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.
Potentially problematic release.
This version of ccxt might be problematic. Click here for more details.
- ccxt/__init__.py +1 -1
- ccxt/abstract/bybit.py +1 -0
- ccxt/abstract/okex.py +1 -0
- ccxt/abstract/okex5.py +1 -0
- ccxt/abstract/okx.py +1 -0
- ccxt/async_support/__init__.py +1 -1
- ccxt/async_support/base/exchange.py +3 -3
- ccxt/async_support/bitmex.py +447 -399
- ccxt/async_support/bybit.py +1 -0
- ccxt/async_support/cryptocom.py +83 -0
- ccxt/async_support/luno.py +1 -1
- ccxt/async_support/okx.py +1 -0
- ccxt/base/exchange.py +3 -3
- ccxt/bitmex.py +447 -399
- ccxt/bybit.py +1 -0
- ccxt/cryptocom.py +83 -0
- ccxt/luno.py +1 -1
- ccxt/okx.py +1 -0
- ccxt/pro/__init__.py +1 -1
- {ccxt-3.1.53.dist-info → ccxt-3.1.54.dist-info}/METADATA +4 -4
- {ccxt-3.1.53.dist-info → ccxt-3.1.54.dist-info}/RECORD +23 -23
- {ccxt-3.1.53.dist-info → ccxt-3.1.54.dist-info}/WHEEL +0 -0
- {ccxt-3.1.53.dist-info → ccxt-3.1.54.dist-info}/top_level.txt +0 -0
ccxt/async_support/bybit.py
CHANGED
@@ -369,6 +369,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
369
369
|
'user/v3/private/frozen-sub-member': 10, # 5/s
|
370
370
|
'user/v3/private/query-sub-members': 5, # 10/s
|
371
371
|
'user/v3/private/query-api': 5, # 10/s
|
372
|
+
'user/v3/private/get-member-type': 1,
|
372
373
|
'asset/v3/private/transfer/transfer-coin/list/query': 0.84, # 60/s
|
373
374
|
'asset/v3/private/transfer/account-coin/balance/query': 0.84, # 60/s
|
374
375
|
'asset/v3/private/transfer/account-coins/balance/query': 50,
|
ccxt/async_support/cryptocom.py
CHANGED
@@ -79,6 +79,7 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
79
79
|
'fetchOrders': True,
|
80
80
|
'fetchPositionMode': False,
|
81
81
|
'fetchPositions': False,
|
82
|
+
'fetchSettlementHistory': True,
|
82
83
|
'fetchStatus': False,
|
83
84
|
'fetchTicker': True,
|
84
85
|
'fetchTickers': True,
|
@@ -2476,6 +2477,88 @@ class cryptocom(Exchange, ImplicitAPI):
|
|
2476
2477
|
'info': account,
|
2477
2478
|
}
|
2478
2479
|
|
2480
|
+
async def fetch_settlement_history(self, symbol: Optional[str] = None, since: Optional[int] = None, limit: Optional[int] = None, params={}):
|
2481
|
+
"""
|
2482
|
+
fetches historical settlement records
|
2483
|
+
see https://exchange-docs.crypto.com/exchange/v1/rest-ws/index.html#public-get-expired-settlement-price
|
2484
|
+
:param str symbol: unified market symbol of the settlement history
|
2485
|
+
:param int|None since: timestamp in ms
|
2486
|
+
:param int|None limit: number of records
|
2487
|
+
:param dict params: exchange specific params
|
2488
|
+
:param int|None params['type']: 'future', 'option'
|
2489
|
+
:returns [dict]: a list of [settlement history objects]
|
2490
|
+
"""
|
2491
|
+
await self.load_markets()
|
2492
|
+
market = None
|
2493
|
+
if symbol is not None:
|
2494
|
+
market = self.market(symbol)
|
2495
|
+
type = None
|
2496
|
+
type, params = self.handle_market_type_and_params('fetchSettlementHistory', market, params)
|
2497
|
+
self.check_required_argument('fetchSettlementHistory', type, 'type', ['future', 'option', 'WARRANT', 'FUTURE'])
|
2498
|
+
if type == 'option':
|
2499
|
+
type = 'WARRANT'
|
2500
|
+
request = {
|
2501
|
+
'instrument_type': type.upper(),
|
2502
|
+
}
|
2503
|
+
response = await self.v1PublicGetPublicGetExpiredSettlementPrice(self.extend(request, params))
|
2504
|
+
#
|
2505
|
+
# {
|
2506
|
+
# "id": -1,
|
2507
|
+
# "method": "public/get-expired-settlement-price",
|
2508
|
+
# "code": 0,
|
2509
|
+
# "result": {
|
2510
|
+
# "data": [
|
2511
|
+
# {
|
2512
|
+
# "i": "BTCUSD-230526",
|
2513
|
+
# "x": 1685088000000,
|
2514
|
+
# "v": "26464.1",
|
2515
|
+
# "t": 1685087999500
|
2516
|
+
# }
|
2517
|
+
# ]
|
2518
|
+
# }
|
2519
|
+
# }
|
2520
|
+
#
|
2521
|
+
result = self.safe_value(response, 'result', {})
|
2522
|
+
data = self.safe_value(result, 'data', [])
|
2523
|
+
settlements = self.parse_settlements(data, market)
|
2524
|
+
sorted = self.sort_by(settlements, 'timestamp')
|
2525
|
+
return self.filter_by_symbol_since_limit(sorted, symbol, since, limit)
|
2526
|
+
|
2527
|
+
def parse_settlement(self, settlement, market):
|
2528
|
+
#
|
2529
|
+
# {
|
2530
|
+
# "i": "BTCUSD-230526",
|
2531
|
+
# "x": 1685088000000,
|
2532
|
+
# "v": "26464.1",
|
2533
|
+
# "t": 1685087999500
|
2534
|
+
# }
|
2535
|
+
#
|
2536
|
+
timestamp = self.safe_integer(settlement, 'x')
|
2537
|
+
marketId = self.safe_string(settlement, 'i')
|
2538
|
+
return {
|
2539
|
+
'info': settlement,
|
2540
|
+
'symbol': self.safe_symbol(marketId, market),
|
2541
|
+
'price': self.safe_number(settlement, 'v'),
|
2542
|
+
'timestamp': timestamp,
|
2543
|
+
'datetime': self.iso8601(timestamp),
|
2544
|
+
}
|
2545
|
+
|
2546
|
+
def parse_settlements(self, settlements, market):
|
2547
|
+
#
|
2548
|
+
# [
|
2549
|
+
# {
|
2550
|
+
# "i": "BTCUSD-230526",
|
2551
|
+
# "x": 1685088000000,
|
2552
|
+
# "v": "26464.1",
|
2553
|
+
# "t": 1685087999500
|
2554
|
+
# }
|
2555
|
+
# ]
|
2556
|
+
#
|
2557
|
+
result = []
|
2558
|
+
for i in range(0, len(settlements)):
|
2559
|
+
result.append(self.parse_settlement(settlements[i], market))
|
2560
|
+
return result
|
2561
|
+
|
2479
2562
|
def nonce(self):
|
2480
2563
|
return self.milliseconds()
|
2481
2564
|
|
ccxt/async_support/luno.py
CHANGED
@@ -727,7 +727,7 @@ class luno(Exchange, ImplicitAPI):
|
|
727
727
|
await self.load_markets()
|
728
728
|
market = self.market(symbol)
|
729
729
|
request = {
|
730
|
-
'
|
730
|
+
'pair': market['id'],
|
731
731
|
}
|
732
732
|
response = await self.privateGetFeeInfo(self.extend(request, params))
|
733
733
|
#
|
ccxt/async_support/okx.py
CHANGED
@@ -188,6 +188,7 @@ class okx(Exchange, ImplicitAPI):
|
|
188
188
|
'market/index-candles': 1,
|
189
189
|
'market/mark-price-candles': 1,
|
190
190
|
'market/trades': 1,
|
191
|
+
'market/history-trades': 2,
|
191
192
|
'market/platform-24-volume': 10,
|
192
193
|
'market/open-oracle': 40,
|
193
194
|
'market/index-components': 1,
|
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '3.1.
|
7
|
+
__version__ = '3.1.54'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -2496,8 +2496,8 @@ class Exchange(object):
|
|
2496
2496
|
percentage = self.safe_value(ticker, 'percentage')
|
2497
2497
|
average = self.safe_value(ticker, 'average')
|
2498
2498
|
vwap = self.safe_value(ticker, 'vwap')
|
2499
|
-
baseVolume = self.
|
2500
|
-
quoteVolume = self.
|
2499
|
+
baseVolume = self.safe_string(ticker, 'baseVolume')
|
2500
|
+
quoteVolume = self.safe_string(ticker, 'quoteVolume')
|
2501
2501
|
if vwap is None:
|
2502
2502
|
vwap = Precise.string_div(quoteVolume, baseVolume)
|
2503
2503
|
if (last is not None) and (close is None):
|