bitmart 0.0.26__py3-none-any.whl → 0.0.28__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/abstract/bitmart.py +1 -0
- bitmart/ccxt/async_support/__init__.py +1 -1
- bitmart/ccxt/async_support/base/exchange.py +5 -1
- bitmart/ccxt/async_support/bitmart.py +7 -2
- bitmart/ccxt/base/errors.py +0 -6
- bitmart/ccxt/base/exchange.py +1 -1
- bitmart/ccxt/bitmart.py +7 -2
- bitmart/ccxt/pro/__init__.py +1 -1
- {bitmart-0.0.26.dist-info → bitmart-0.0.28.dist-info}/METADATA +2 -1
- {bitmart-0.0.26.dist-info → bitmart-0.0.28.dist-info}/RECORD +12 -12
- {bitmart-0.0.26.dist-info → bitmart-0.0.28.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.4.
|
|
29
|
+
__version__ = '4.4.80'
|
|
30
30
|
|
|
31
31
|
# ----------------------------------------------------------------------------
|
|
32
32
|
|
bitmart/ccxt/abstract/bitmart.py
CHANGED
|
@@ -61,6 +61,7 @@ class ImplicitAPI:
|
|
|
61
61
|
private_get_contract_private_order = privateGetContractPrivateOrder = Entry('contract/private/order', 'private', 'GET', {'cost': 1.2})
|
|
62
62
|
private_get_contract_private_order_history = privateGetContractPrivateOrderHistory = Entry('contract/private/order-history', 'private', 'GET', {'cost': 10})
|
|
63
63
|
private_get_contract_private_position = privateGetContractPrivatePosition = Entry('contract/private/position', 'private', 'GET', {'cost': 10})
|
|
64
|
+
private_get_contract_private_position_v2 = privateGetContractPrivatePositionV2 = Entry('contract/private/position-v2', 'private', 'GET', {'cost': 10})
|
|
64
65
|
private_get_contract_private_get_open_orders = privateGetContractPrivateGetOpenOrders = Entry('contract/private/get-open-orders', 'private', 'GET', {'cost': 1.2})
|
|
65
66
|
private_get_contract_private_current_plan_order = privateGetContractPrivateCurrentPlanOrder = Entry('contract/private/current-plan-order', 'private', 'GET', {'cost': 1.2})
|
|
66
67
|
private_get_contract_private_trades = privateGetContractPrivateTrades = Entry('contract/private/trades', 'private', 'GET', {'cost': 10})
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# -----------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
__version__ = '4.4.
|
|
5
|
+
__version__ = '4.4.80'
|
|
6
6
|
|
|
7
7
|
# -----------------------------------------------------------------------------
|
|
8
8
|
|
|
@@ -114,6 +114,10 @@ class Exchange(BaseExchange):
|
|
|
114
114
|
if self.ssl_context is None:
|
|
115
115
|
# Create our SSL context object with our CA cert file
|
|
116
116
|
self.ssl_context = ssl.create_default_context(cafile=self.cafile) if self.verify else self.verify
|
|
117
|
+
if (self.ssl_context and self.safe_bool(self.options, 'include_OS_certificates', False)):
|
|
118
|
+
os_default_paths = ssl.get_default_verify_paths()
|
|
119
|
+
if os_default_paths.cafile and os_default_paths.cafile != self.cafile:
|
|
120
|
+
self.ssl_context.load_verify_locations(cafile=os_default_paths.cafile)
|
|
117
121
|
|
|
118
122
|
if self.own_session and self.session is None:
|
|
119
123
|
# Pass this SSL context to aiohttp and create a TCPConnector
|
|
@@ -225,6 +225,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
225
225
|
'contract/private/order': 1.2,
|
|
226
226
|
'contract/private/order-history': 10,
|
|
227
227
|
'contract/private/position': 10,
|
|
228
|
+
'contract/private/position-v2': 10,
|
|
228
229
|
'contract/private/get-open-orders': 1.2,
|
|
229
230
|
'contract/private/current-plan-order': 1.2,
|
|
230
231
|
'contract/private/trades': 10,
|
|
@@ -1214,6 +1215,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1214
1215
|
# {
|
|
1215
1216
|
# "currency": "BTC",
|
|
1216
1217
|
# "name": "Bitcoin",
|
|
1218
|
+
# "recharge_minsize": '0.00000001',
|
|
1217
1219
|
# "contract_address": null,
|
|
1218
1220
|
# "network": "BTC",
|
|
1219
1221
|
# "withdraw_enabled": True,
|
|
@@ -1235,7 +1237,8 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1235
1237
|
fullId = self.safe_string(currency, 'currency')
|
|
1236
1238
|
currencyId = fullId
|
|
1237
1239
|
networkId = self.safe_string(currency, 'network')
|
|
1238
|
-
|
|
1240
|
+
isNtf = (fullId.find('NFT') >= 0)
|
|
1241
|
+
if not isNtf:
|
|
1239
1242
|
parts = fullId.split('-')
|
|
1240
1243
|
currencyId = self.safe_string(parts, 0)
|
|
1241
1244
|
second = self.safe_string(parts, 1)
|
|
@@ -1254,6 +1257,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1254
1257
|
'withdraw': None,
|
|
1255
1258
|
'active': None,
|
|
1256
1259
|
'networks': {},
|
|
1260
|
+
'type': 'other' if isNtf else 'crypto',
|
|
1257
1261
|
}
|
|
1258
1262
|
networkCode = self.network_id_to_code(networkId)
|
|
1259
1263
|
withdraw = self.safe_bool(currency, 'withdraw_enabled')
|
|
@@ -4659,6 +4663,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4659
4663
|
fetch all open contract positions
|
|
4660
4664
|
|
|
4661
4665
|
https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-keyed
|
|
4666
|
+
https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-v2-keyed
|
|
4662
4667
|
|
|
4663
4668
|
:param str[]|None symbols: list of unified market symbols
|
|
4664
4669
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
@@ -4675,7 +4680,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4675
4680
|
if symbolsLength == 1:
|
|
4676
4681
|
# only supports symbols or sending one symbol
|
|
4677
4682
|
request['symbol'] = market['id']
|
|
4678
|
-
response = await self.
|
|
4683
|
+
response = await self.privateGetContractPrivatePositionV2(self.extend(request, params))
|
|
4679
4684
|
#
|
|
4680
4685
|
# {
|
|
4681
4686
|
# "code": 1000,
|
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
bitmart/ccxt/bitmart.py
CHANGED
|
@@ -225,6 +225,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
225
225
|
'contract/private/order': 1.2,
|
|
226
226
|
'contract/private/order-history': 10,
|
|
227
227
|
'contract/private/position': 10,
|
|
228
|
+
'contract/private/position-v2': 10,
|
|
228
229
|
'contract/private/get-open-orders': 1.2,
|
|
229
230
|
'contract/private/current-plan-order': 1.2,
|
|
230
231
|
'contract/private/trades': 10,
|
|
@@ -1214,6 +1215,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1214
1215
|
# {
|
|
1215
1216
|
# "currency": "BTC",
|
|
1216
1217
|
# "name": "Bitcoin",
|
|
1218
|
+
# "recharge_minsize": '0.00000001',
|
|
1217
1219
|
# "contract_address": null,
|
|
1218
1220
|
# "network": "BTC",
|
|
1219
1221
|
# "withdraw_enabled": True,
|
|
@@ -1235,7 +1237,8 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1235
1237
|
fullId = self.safe_string(currency, 'currency')
|
|
1236
1238
|
currencyId = fullId
|
|
1237
1239
|
networkId = self.safe_string(currency, 'network')
|
|
1238
|
-
|
|
1240
|
+
isNtf = (fullId.find('NFT') >= 0)
|
|
1241
|
+
if not isNtf:
|
|
1239
1242
|
parts = fullId.split('-')
|
|
1240
1243
|
currencyId = self.safe_string(parts, 0)
|
|
1241
1244
|
second = self.safe_string(parts, 1)
|
|
@@ -1254,6 +1257,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
1254
1257
|
'withdraw': None,
|
|
1255
1258
|
'active': None,
|
|
1256
1259
|
'networks': {},
|
|
1260
|
+
'type': 'other' if isNtf else 'crypto',
|
|
1257
1261
|
}
|
|
1258
1262
|
networkCode = self.network_id_to_code(networkId)
|
|
1259
1263
|
withdraw = self.safe_bool(currency, 'withdraw_enabled')
|
|
@@ -4659,6 +4663,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4659
4663
|
fetch all open contract positions
|
|
4660
4664
|
|
|
4661
4665
|
https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-keyed
|
|
4666
|
+
https://developer-pro.bitmart.com/en/futuresv2/#get-current-position-v2-keyed
|
|
4662
4667
|
|
|
4663
4668
|
:param str[]|None symbols: list of unified market symbols
|
|
4664
4669
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
@@ -4675,7 +4680,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4675
4680
|
if symbolsLength == 1:
|
|
4676
4681
|
# only supports symbols or sending one symbol
|
|
4677
4682
|
request['symbol'] = market['id']
|
|
4678
|
-
response = self.
|
|
4683
|
+
response = self.privateGetContractPrivatePositionV2(self.extend(request, params))
|
|
4679
4684
|
#
|
|
4680
4685
|
# {
|
|
4681
4686
|
# "code": 1000,
|
bitmart/ccxt/pro/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bitmart
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.28
|
|
4
4
|
Summary: bitmart crypto exchange api client
|
|
5
5
|
Project-URL: Homepage, https://github.com/ccxt/ccxt
|
|
6
6
|
Project-URL: Issues, https://github.com/ccxt/ccxt
|
|
@@ -250,6 +250,7 @@ You can also construct custom requests to available "implicit" endpoints
|
|
|
250
250
|
- `private_get_contract_private_order(request)`
|
|
251
251
|
- `private_get_contract_private_order_history(request)`
|
|
252
252
|
- `private_get_contract_private_position(request)`
|
|
253
|
+
- `private_get_contract_private_position_v2(request)`
|
|
253
254
|
- `private_get_contract_private_get_open_orders(request)`
|
|
254
255
|
- `private_get_contract_private_current_plan_order(request)`
|
|
255
256
|
- `private_get_contract_private_trades(request)`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
bitmart/__init__.py,sha256=DRRGWQ_AXzv_ztbAPzIZ0ID_zHfKYZID66sOb-SJ3eM,258
|
|
2
|
-
bitmart/ccxt/__init__.py,sha256=
|
|
3
|
-
bitmart/ccxt/bitmart.py,sha256=
|
|
4
|
-
bitmart/ccxt/abstract/bitmart.py,sha256=
|
|
5
|
-
bitmart/ccxt/async_support/__init__.py,sha256=
|
|
6
|
-
bitmart/ccxt/async_support/bitmart.py,sha256=
|
|
2
|
+
bitmart/ccxt/__init__.py,sha256=xeD4BH4LtPUsMHHyQMJbz3eaxGNl05Z9Y9rH92UJCL0,6050
|
|
3
|
+
bitmart/ccxt/bitmart.py,sha256=8LbVvV2whAFi4WNythAlWGuzGqhKmavqOJwmKqinSLo,248228
|
|
4
|
+
bitmart/ccxt/abstract/bitmart.py,sha256=er1v0vWmX1-eus1XP5EyQCsmDS5LHVCUGEHqwvZuxyU,17395
|
|
5
|
+
bitmart/ccxt/async_support/__init__.py,sha256=QT9qcf6cJIXcKa_nxadxrhbYiI6zFCFlKyukHKv0JHM,4783
|
|
6
|
+
bitmart/ccxt/async_support/bitmart.py,sha256=8U1WC9fD8CLJFJC85wHZyZuf0XihYL4DubW3ZTtVEac,249352
|
|
7
7
|
bitmart/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
|
8
|
-
bitmart/ccxt/async_support/base/exchange.py,sha256=
|
|
8
|
+
bitmart/ccxt/async_support/base/exchange.py,sha256=fFbTwjLVQEHgO857XsJEKewCRbGEdCK3Fgxe-ju3D50,117601
|
|
9
9
|
bitmart/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
|
|
10
10
|
bitmart/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
|
11
11
|
bitmart/ccxt/async_support/base/ws/aiohttp_client.py,sha256=Y5HxAVXyyYduj6b6SbbUZETlq3GrVMzrkW1r-TMgpb8,6329
|
|
@@ -18,11 +18,11 @@ bitmart/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_
|
|
|
18
18
|
bitmart/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmBJLCI5FHIRdMz1O-g,6551
|
|
19
19
|
bitmart/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
|
20
20
|
bitmart/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
|
|
21
|
-
bitmart/ccxt/base/errors.py,sha256=
|
|
22
|
-
bitmart/ccxt/base/exchange.py,sha256=
|
|
21
|
+
bitmart/ccxt/base/errors.py,sha256=Pad-6ugvGUwhoYuKUliX-N7FTrcnKCQGFjsaq2tMn0I,4610
|
|
22
|
+
bitmart/ccxt/base/exchange.py,sha256=Htk-wL8Aqmj3XEffVhRsoj_OzpZuFATi0aGkV6oWk64,326255
|
|
23
23
|
bitmart/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
|
24
24
|
bitmart/ccxt/base/types.py,sha256=SfxIKDSsxP7MPHWiOVI965Nr5NSEPpAno5fuveTRi3w,11423
|
|
25
|
-
bitmart/ccxt/pro/__init__.py,sha256=
|
|
25
|
+
bitmart/ccxt/pro/__init__.py,sha256=cOHJ98m2aVtZFhAvHTCbE-WDB7k3HjuHQV9VB85PAC4,621
|
|
26
26
|
bitmart/ccxt/pro/bitmart.py,sha256=-iCp2w0UXeNrro_TcyVyJvsaTFXtq92nEP4h7hq-F-w,67253
|
|
27
27
|
bitmart/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
|
28
28
|
bitmart/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
|
@@ -283,6 +283,6 @@ bitmart/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWn
|
|
|
283
283
|
bitmart/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
|
284
284
|
bitmart/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
285
285
|
bitmart/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
|
286
|
-
bitmart-0.0.
|
|
287
|
-
bitmart-0.0.
|
|
288
|
-
bitmart-0.0.
|
|
286
|
+
bitmart-0.0.28.dist-info/METADATA,sha256=O5yQk4SjcoVcFG_CRT68VEB6mycxH3jptX7DGcdA7Xk,15156
|
|
287
|
+
bitmart-0.0.28.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
288
|
+
bitmart-0.0.28.dist-info/RECORD,,
|
|
File without changes
|