bitmart 0.0.96__py3-none-any.whl → 0.0.98__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 bitmart might be problematic. Click here for more details.
- bitmart/ccxt/__init__.py +1 -1
- bitmart/ccxt/async_support/__init__.py +1 -1
- bitmart/ccxt/async_support/base/exchange.py +1 -1
- bitmart/ccxt/async_support/base/throttler.py +1 -1
- bitmart/ccxt/async_support/bitmart.py +18 -11
- bitmart/ccxt/base/errors.py +0 -6
- bitmart/ccxt/base/exchange.py +2 -2
- bitmart/ccxt/bitmart.py +18 -11
- bitmart/ccxt/pro/__init__.py +1 -1
- {bitmart-0.0.96.dist-info → bitmart-0.0.98.dist-info}/METADATA +1 -1
- {bitmart-0.0.96.dist-info → bitmart-0.0.98.dist-info}/RECORD +12 -12
- {bitmart-0.0.96.dist-info → bitmart-0.0.98.dist-info}/WHEEL +0 -0
bitmart/ccxt/__init__.py
CHANGED
|
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
|
26
26
|
|
|
27
27
|
# ----------------------------------------------------------------------------
|
|
28
28
|
|
|
29
|
-
__version__ = '4.5.
|
|
29
|
+
__version__ = '4.5.13'
|
|
30
30
|
|
|
31
31
|
# ----------------------------------------------------------------------------
|
|
32
32
|
|
|
@@ -42,7 +42,7 @@ class Throttler:
|
|
|
42
42
|
def __call__(self, cost=None):
|
|
43
43
|
future = asyncio.Future()
|
|
44
44
|
if len(self.queue) > self.config['maxCapacity']:
|
|
45
|
-
raise RuntimeError('throttle queue is over maxCapacity (' + str(int(self.config['maxCapacity'])) + '), see https://
|
|
45
|
+
raise RuntimeError('throttle queue is over maxCapacity (' + str(int(self.config['maxCapacity'])) + '), see https://docs.ccxt.com/#/README?id=maximum-requests-capacity')
|
|
46
46
|
self.queue.append((future, cost))
|
|
47
47
|
if not self.running:
|
|
48
48
|
self.running = True
|
|
@@ -1026,7 +1026,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1026
1026
|
'swap': False,
|
|
1027
1027
|
'future': False,
|
|
1028
1028
|
'option': False,
|
|
1029
|
-
'active':
|
|
1029
|
+
'active': self.safe_string_lower_2(market, 'status', 'trade_status') == 'trading',
|
|
1030
1030
|
'contract': False,
|
|
1031
1031
|
'linear': None,
|
|
1032
1032
|
'inverse': None,
|
|
@@ -1141,7 +1141,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1141
1141
|
'swap': isSwap,
|
|
1142
1142
|
'future': isFutures,
|
|
1143
1143
|
'option': False,
|
|
1144
|
-
'active':
|
|
1144
|
+
'active': self.safe_string_lower(market, 'status') == 'trading',
|
|
1145
1145
|
'contract': True,
|
|
1146
1146
|
'linear': True,
|
|
1147
1147
|
'inverse': False,
|
|
@@ -4517,12 +4517,15 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4517
4517
|
# "code": 1000,
|
|
4518
4518
|
# "message": "Ok",
|
|
4519
4519
|
# "data": {
|
|
4520
|
-
# "timestamp": 1695184410697,
|
|
4521
4520
|
# "symbol": "BTCUSDT",
|
|
4522
|
-
# "
|
|
4523
|
-
# "
|
|
4521
|
+
# "expected_rate": "-0.0000238",
|
|
4522
|
+
# "rate_value": "0.000009601106",
|
|
4523
|
+
# "funding_time": 1761292800000,
|
|
4524
|
+
# "funding_upper_limit": "0.0375",
|
|
4525
|
+
# "funding_lower_limit": "-0.0375",
|
|
4526
|
+
# "timestamp": 1761291544336
|
|
4524
4527
|
# },
|
|
4525
|
-
# "trace": "
|
|
4528
|
+
# "trace": "64b7a589-e1e-4ac2-86b1-41058757421"
|
|
4526
4529
|
# }
|
|
4527
4530
|
#
|
|
4528
4531
|
data = self.safe_dict(response, 'data', {})
|
|
@@ -4587,14 +4590,18 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4587
4590
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
|
4588
4591
|
#
|
|
4589
4592
|
# {
|
|
4590
|
-
# "timestamp": 1695184410697,
|
|
4591
4593
|
# "symbol": "BTCUSDT",
|
|
4592
|
-
# "
|
|
4593
|
-
# "
|
|
4594
|
+
# "expected_rate": "-0.0000238",
|
|
4595
|
+
# "rate_value": "0.000009601106",
|
|
4596
|
+
# "funding_time": 1761292800000,
|
|
4597
|
+
# "funding_upper_limit": "0.0375",
|
|
4598
|
+
# "funding_lower_limit": "-0.0375",
|
|
4599
|
+
# "timestamp": 1761291544336
|
|
4594
4600
|
# }
|
|
4595
4601
|
#
|
|
4596
4602
|
marketId = self.safe_string(contract, 'symbol')
|
|
4597
4603
|
timestamp = self.safe_integer(contract, 'timestamp')
|
|
4604
|
+
fundingTimestamp = self.safe_integer(contract, 'funding_time')
|
|
4598
4605
|
return {
|
|
4599
4606
|
'info': contract,
|
|
4600
4607
|
'symbol': self.safe_symbol(marketId, market),
|
|
@@ -4605,8 +4612,8 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4605
4612
|
'timestamp': timestamp,
|
|
4606
4613
|
'datetime': self.iso8601(timestamp),
|
|
4607
4614
|
'fundingRate': self.safe_number(contract, 'expected_rate'),
|
|
4608
|
-
'fundingTimestamp':
|
|
4609
|
-
'fundingDatetime':
|
|
4615
|
+
'fundingTimestamp': fundingTimestamp,
|
|
4616
|
+
'fundingDatetime': self.iso8601(fundingTimestamp),
|
|
4610
4617
|
'nextFundingRate': None,
|
|
4611
4618
|
'nextFundingTimestamp': None,
|
|
4612
4619
|
'nextFundingDatetime': None,
|
bitmart/ccxt/base/errors.py
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
# ----------------------------------------------------------------------------
|
|
2
|
-
|
|
3
|
-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
|
|
4
|
-
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
|
|
5
|
-
# EDIT THE CORRESPONDENT .ts FILE INSTEAD
|
|
6
|
-
|
|
7
1
|
error_hierarchy = {
|
|
8
2
|
'BaseError': {
|
|
9
3
|
'ExchangeError': {
|
bitmart/ccxt/base/exchange.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
-
__version__ = '4.5.
|
|
7
|
+
__version__ = '4.5.13'
|
|
8
8
|
|
|
9
9
|
# -----------------------------------------------------------------------------
|
|
10
10
|
|
|
@@ -2948,7 +2948,7 @@ class Exchange(object):
|
|
|
2948
2948
|
'delay': 0.001,
|
|
2949
2949
|
'capacity': 1,
|
|
2950
2950
|
'cost': 1,
|
|
2951
|
-
'maxCapacity': 1000,
|
|
2951
|
+
'maxCapacity': self.safe_integer(self.options, 'maxRequestsQueue', 1000),
|
|
2952
2952
|
'refillRate': refillRate,
|
|
2953
2953
|
}
|
|
2954
2954
|
existingBucket = {} if (self.tokenBucket is None) else self.tokenBucket
|
bitmart/ccxt/bitmart.py
CHANGED
|
@@ -1026,7 +1026,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1026
1026
|
'swap': False,
|
|
1027
1027
|
'future': False,
|
|
1028
1028
|
'option': False,
|
|
1029
|
-
'active':
|
|
1029
|
+
'active': self.safe_string_lower_2(market, 'status', 'trade_status') == 'trading',
|
|
1030
1030
|
'contract': False,
|
|
1031
1031
|
'linear': None,
|
|
1032
1032
|
'inverse': None,
|
|
@@ -1141,7 +1141,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1141
1141
|
'swap': isSwap,
|
|
1142
1142
|
'future': isFutures,
|
|
1143
1143
|
'option': False,
|
|
1144
|
-
'active':
|
|
1144
|
+
'active': self.safe_string_lower(market, 'status') == 'trading',
|
|
1145
1145
|
'contract': True,
|
|
1146
1146
|
'linear': True,
|
|
1147
1147
|
'inverse': False,
|
|
@@ -4517,12 +4517,15 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4517
4517
|
# "code": 1000,
|
|
4518
4518
|
# "message": "Ok",
|
|
4519
4519
|
# "data": {
|
|
4520
|
-
# "timestamp": 1695184410697,
|
|
4521
4520
|
# "symbol": "BTCUSDT",
|
|
4522
|
-
# "
|
|
4523
|
-
# "
|
|
4521
|
+
# "expected_rate": "-0.0000238",
|
|
4522
|
+
# "rate_value": "0.000009601106",
|
|
4523
|
+
# "funding_time": 1761292800000,
|
|
4524
|
+
# "funding_upper_limit": "0.0375",
|
|
4525
|
+
# "funding_lower_limit": "-0.0375",
|
|
4526
|
+
# "timestamp": 1761291544336
|
|
4524
4527
|
# },
|
|
4525
|
-
# "trace": "
|
|
4528
|
+
# "trace": "64b7a589-e1e-4ac2-86b1-41058757421"
|
|
4526
4529
|
# }
|
|
4527
4530
|
#
|
|
4528
4531
|
data = self.safe_dict(response, 'data', {})
|
|
@@ -4587,14 +4590,18 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4587
4590
|
def parse_funding_rate(self, contract, market: Market = None) -> FundingRate:
|
|
4588
4591
|
#
|
|
4589
4592
|
# {
|
|
4590
|
-
# "timestamp": 1695184410697,
|
|
4591
4593
|
# "symbol": "BTCUSDT",
|
|
4592
|
-
# "
|
|
4593
|
-
# "
|
|
4594
|
+
# "expected_rate": "-0.0000238",
|
|
4595
|
+
# "rate_value": "0.000009601106",
|
|
4596
|
+
# "funding_time": 1761292800000,
|
|
4597
|
+
# "funding_upper_limit": "0.0375",
|
|
4598
|
+
# "funding_lower_limit": "-0.0375",
|
|
4599
|
+
# "timestamp": 1761291544336
|
|
4594
4600
|
# }
|
|
4595
4601
|
#
|
|
4596
4602
|
marketId = self.safe_string(contract, 'symbol')
|
|
4597
4603
|
timestamp = self.safe_integer(contract, 'timestamp')
|
|
4604
|
+
fundingTimestamp = self.safe_integer(contract, 'funding_time')
|
|
4598
4605
|
return {
|
|
4599
4606
|
'info': contract,
|
|
4600
4607
|
'symbol': self.safe_symbol(marketId, market),
|
|
@@ -4605,8 +4612,8 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4605
4612
|
'timestamp': timestamp,
|
|
4606
4613
|
'datetime': self.iso8601(timestamp),
|
|
4607
4614
|
'fundingRate': self.safe_number(contract, 'expected_rate'),
|
|
4608
|
-
'fundingTimestamp':
|
|
4609
|
-
'fundingDatetime':
|
|
4615
|
+
'fundingTimestamp': fundingTimestamp,
|
|
4616
|
+
'fundingDatetime': self.iso8601(fundingTimestamp),
|
|
4610
4617
|
'nextFundingRate': None,
|
|
4611
4618
|
'nextFundingTimestamp': None,
|
|
4612
4619
|
'nextFundingDatetime': None,
|
bitmart/ccxt/pro/__init__.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
bitmart/__init__.py,sha256=DRRGWQ_AXzv_ztbAPzIZ0ID_zHfKYZID66sOb-SJ3eM,258
|
|
2
|
-
bitmart/ccxt/__init__.py,sha256=
|
|
3
|
-
bitmart/ccxt/bitmart.py,sha256=
|
|
2
|
+
bitmart/ccxt/__init__.py,sha256=EjgpBmZDE5fbJVh-S6hF6S47ankqas3vWFavSMa5V2g,6133
|
|
3
|
+
bitmart/ccxt/bitmart.py,sha256=_E8cHs80FJyhrniNFslD-wgRGHyRufvuzqEDju5BZM0,249883
|
|
4
4
|
bitmart/ccxt/abstract/bitmart.py,sha256=er1v0vWmX1-eus1XP5EyQCsmDS5LHVCUGEHqwvZuxyU,17395
|
|
5
|
-
bitmart/ccxt/async_support/__init__.py,sha256=
|
|
6
|
-
bitmart/ccxt/async_support/bitmart.py,sha256=
|
|
5
|
+
bitmart/ccxt/async_support/__init__.py,sha256=kFW41x8qA0If3LH_y5z1FIld4SFhnsaecbpimCVTluA,4866
|
|
6
|
+
bitmart/ccxt/async_support/bitmart.py,sha256=VCdMduOjC0pdMkLG_hEUBZ0cOnjBI576e8HQpmNXMLE,251007
|
|
7
7
|
bitmart/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
|
8
|
-
bitmart/ccxt/async_support/base/exchange.py,sha256=
|
|
9
|
-
bitmart/ccxt/async_support/base/throttler.py,sha256=
|
|
8
|
+
bitmart/ccxt/async_support/base/exchange.py,sha256=d9JSupaitaTrcWIC5YnEgRa_UkmSAaD9R7VqzPckdJs,126383
|
|
9
|
+
bitmart/ccxt/async_support/base/throttler.py,sha256=SR1JdHbXgkkRps_YBP7QxVREHsBN1Gbpm5gx_YuMa5g,1841
|
|
10
10
|
bitmart/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
|
11
11
|
bitmart/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
|
|
12
12
|
bitmart/ccxt/async_support/base/ws/client.py,sha256=5eVs_896IJFZOewdyvf7H-lior529AXQ0Cu6ID4AwBI,13946
|
|
@@ -16,11 +16,11 @@ bitmart/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_
|
|
|
16
16
|
bitmart/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmBJLCI5FHIRdMz1O-g,6551
|
|
17
17
|
bitmart/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
|
18
18
|
bitmart/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
|
|
19
|
-
bitmart/ccxt/base/errors.py,sha256=
|
|
20
|
-
bitmart/ccxt/base/exchange.py,sha256=
|
|
19
|
+
bitmart/ccxt/base/errors.py,sha256=LdTTHPmxpeFHJze93mGl7I3maqTgN0y_1mJ6coWkXmA,4734
|
|
20
|
+
bitmart/ccxt/base/exchange.py,sha256=c2dpaaKJCPaG-97BnYdufzPeGaR7LbwGqtBOj3VzGSc,349705
|
|
21
21
|
bitmart/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
|
22
22
|
bitmart/ccxt/base/types.py,sha256=Gvbogh9i7pPH7Z18xesYeDPribqqwq8uKpOv-YODFBs,11505
|
|
23
|
-
bitmart/ccxt/pro/__init__.py,sha256=
|
|
23
|
+
bitmart/ccxt/pro/__init__.py,sha256=cSJCttZoUMkdb61pq0hzh3aUfU0IxCIkhA1JKXIuhvs,4180
|
|
24
24
|
bitmart/ccxt/pro/bitmart.py,sha256=3Xo_6_pPDnVoWvS4jonJZ60_63RVSlFhnUcXRDRnwgc,67282
|
|
25
25
|
bitmart/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
|
26
26
|
bitmart/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
|
@@ -281,6 +281,6 @@ bitmart/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWn
|
|
|
281
281
|
bitmart/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
|
282
282
|
bitmart/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
283
283
|
bitmart/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
|
284
|
-
bitmart-0.0.
|
|
285
|
-
bitmart-0.0.
|
|
286
|
-
bitmart-0.0.
|
|
284
|
+
bitmart-0.0.98.dist-info/METADATA,sha256=cBQ5O34WWbGlGxqA3t_-KRn9Ilap7buFNqKfmvQmsF0,15177
|
|
285
|
+
bitmart-0.0.98.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
286
|
+
bitmart-0.0.98.dist-info/RECORD,,
|
|
File without changes
|