bitmart 0.0.20__py3-none-any.whl → 0.0.22__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 +3 -2
- bitmart/ccxt/abstract/bitmart.py +1 -0
- bitmart/ccxt/async_support/__init__.py +3 -2
- bitmart/ccxt/async_support/base/exchange.py +3 -3
- bitmart/ccxt/async_support/bitmart.py +12 -1
- bitmart/ccxt/base/exchange.py +31 -4
- bitmart/ccxt/base/types.py +28 -0
- bitmart/ccxt/bitmart.py +12 -1
- bitmart/ccxt/pro/__init__.py +3 -2
- bitmart/ccxt/pro/bitmart.py +15 -7
- {bitmart-0.0.20.dist-info → bitmart-0.0.22.dist-info}/METADATA +2 -1
- {bitmart-0.0.20.dist-info → bitmart-0.0.22.dist-info}/RECORD +13 -13
- {bitmart-0.0.20.dist-info → bitmart-0.0.22.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.72'
|
|
30
30
|
|
|
31
31
|
# ----------------------------------------------------------------------------
|
|
32
32
|
|
|
@@ -87,9 +87,10 @@ from ccxt.base.errors import CancelPending # noqa: F4
|
|
|
87
87
|
from ccxt.base.errors import UnsubscribeError # noqa: F401
|
|
88
88
|
from ccxt.base.errors import error_hierarchy # noqa: F401
|
|
89
89
|
|
|
90
|
+
from ccxt.bitfinex1 import bitfinex1 # noqa: F401
|
|
90
91
|
from ccxt.bitmart import bitmart # noqa: F401
|
|
91
92
|
|
|
92
|
-
exchanges = [ 'bitmart',]
|
|
93
|
+
exchanges = [ 'bitfinex1', 'bitmart',]
|
|
93
94
|
|
|
94
95
|
base = [
|
|
95
96
|
'Exchange',
|
bitmart/ccxt/abstract/bitmart.py
CHANGED
|
@@ -108,6 +108,7 @@ class ImplicitAPI:
|
|
|
108
108
|
private_post_contract_private_submit_tp_sl_order = privatePostContractPrivateSubmitTpSlOrder = Entry('contract/private/submit-tp-sl-order', 'private', 'POST', {'cost': 2.5})
|
|
109
109
|
private_post_contract_private_modify_plan_order = privatePostContractPrivateModifyPlanOrder = Entry('contract/private/modify-plan-order', 'private', 'POST', {'cost': 2.5})
|
|
110
110
|
private_post_contract_private_modify_preset_plan_order = privatePostContractPrivateModifyPresetPlanOrder = Entry('contract/private/modify-preset-plan-order', 'private', 'POST', {'cost': 2.5})
|
|
111
|
+
private_post_contract_private_modify_limit_order = privatePostContractPrivateModifyLimitOrder = Entry('contract/private/modify-limit-order', 'private', 'POST', {'cost': 2.5})
|
|
111
112
|
private_post_contract_private_modify_tp_sl_order = privatePostContractPrivateModifyTpSlOrder = Entry('contract/private/modify-tp-sl-order', 'private', 'POST', {'cost': 2.5})
|
|
112
113
|
private_post_contract_private_submit_trail_order = privatePostContractPrivateSubmitTrailOrder = Entry('contract/private/submit-trail-order', 'private', 'POST', {'cost': 2.5})
|
|
113
114
|
private_post_contract_private_cancel_trail_order = privatePostContractPrivateCancelTrailOrder = Entry('contract/private/cancel-trail-order', 'private', 'POST', {'cost': 1.5})
|
|
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
|
8
8
|
|
|
9
9
|
# -----------------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
__version__ = '4.4.
|
|
11
|
+
__version__ = '4.4.72'
|
|
12
12
|
|
|
13
13
|
# -----------------------------------------------------------------------------
|
|
14
14
|
|
|
@@ -67,9 +67,10 @@ from ccxt.base.errors import UnsubscribeError # noqa: F4
|
|
|
67
67
|
from ccxt.base.errors import error_hierarchy # noqa: F401
|
|
68
68
|
|
|
69
69
|
|
|
70
|
+
from ccxt.async_support.bitfinex1 import bitfinex1 # noqa: F401
|
|
70
71
|
from ccxt.async_support.bitmart import bitmart # noqa: F401
|
|
71
72
|
|
|
72
|
-
exchanges = [ 'bitmart',]
|
|
73
|
+
exchanges = [ 'bitfinex1', 'bitmart',]
|
|
73
74
|
|
|
74
75
|
base = [
|
|
75
76
|
'Exchange',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# -----------------------------------------------------------------------------
|
|
4
4
|
|
|
5
|
-
__version__ = '4.4.
|
|
5
|
+
__version__ = '4.4.72'
|
|
6
6
|
|
|
7
7
|
# -----------------------------------------------------------------------------
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ from ccxt.async_support.base.throttler import Throttler
|
|
|
25
25
|
# -----------------------------------------------------------------------------
|
|
26
26
|
|
|
27
27
|
from ccxt.base.errors import BaseError, BadSymbol, BadRequest, BadResponse, ExchangeError, ExchangeNotAvailable, RequestTimeout, NotSupported, NullResponse, InvalidAddress, RateLimitExceeded, OperationFailed
|
|
28
|
-
from ccxt.base.types import OrderType, OrderSide, OrderRequest, CancellationRequest
|
|
28
|
+
from ccxt.base.types import ConstructorArgs, OrderType, OrderSide, OrderRequest, CancellationRequest
|
|
29
29
|
|
|
30
30
|
# -----------------------------------------------------------------------------
|
|
31
31
|
|
|
@@ -67,7 +67,7 @@ class Exchange(BaseExchange):
|
|
|
67
67
|
clients = {}
|
|
68
68
|
timeout_on_exit = 250 # needed for: https://github.com/ccxt/ccxt/pull/23470
|
|
69
69
|
|
|
70
|
-
def __init__(self, config={}):
|
|
70
|
+
def __init__(self, config: ConstructorArgs = {}):
|
|
71
71
|
if 'asyncio_loop' in config:
|
|
72
72
|
self.asyncio_loop = config['asyncio_loop']
|
|
73
73
|
self.aiohttp_trust_env = config.get('aiohttp_trust_env', self.aiohttp_trust_env)
|
|
@@ -61,6 +61,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
61
61
|
'createOrder': True,
|
|
62
62
|
'createOrders': True,
|
|
63
63
|
'createPostOnlyOrder': True,
|
|
64
|
+
'createReduceOnlyOrder': True,
|
|
64
65
|
'createStopLimitOrder': False,
|
|
65
66
|
'createStopMarketOrder': False,
|
|
66
67
|
'createStopOrder': False,
|
|
@@ -278,6 +279,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
278
279
|
'contract/private/submit-tp-sl-order': 2.5,
|
|
279
280
|
'contract/private/modify-plan-order': 2.5,
|
|
280
281
|
'contract/private/modify-preset-plan-order': 2.5,
|
|
282
|
+
'contract/private/modify-limit-order': 2.5,
|
|
281
283
|
'contract/private/modify-tp-sl-order': 2.5,
|
|
282
284
|
'contract/private/submit-trail-order': 2.5, # weight is not provided by the exchange, is set order
|
|
283
285
|
'contract/private/cancel-trail-order': 1.5, # weight is not provided by the exchange, is set order
|
|
@@ -4875,6 +4877,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4875
4877
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-plan-order-signed
|
|
4876
4878
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-tp-sl-order-signed
|
|
4877
4879
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-preset-plan-order-signed
|
|
4880
|
+
https://developer-pro.bitmart.com/en/futuresv2/#modify-limit-order-signed
|
|
4878
4881
|
|
|
4879
4882
|
:param str id: order id
|
|
4880
4883
|
:param str symbol: unified symbol of the market to edit an order in
|
|
@@ -4909,6 +4912,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4909
4912
|
isTakeProfit = takeProfitPrice is not None
|
|
4910
4913
|
isPresetStopLoss = presetStopLoss is not None
|
|
4911
4914
|
isPresetTakeProfit = presetTakeProfit is not None
|
|
4915
|
+
isLimitOrder = (type == 'limit')
|
|
4912
4916
|
request: dict = {
|
|
4913
4917
|
'symbol': market['id'],
|
|
4914
4918
|
}
|
|
@@ -4973,8 +4977,15 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4973
4977
|
# "trace": "a5c3234534534a836bc476a203.123452.172716624359200197"
|
|
4974
4978
|
# }
|
|
4975
4979
|
#
|
|
4980
|
+
elif isLimitOrder:
|
|
4981
|
+
request['order_id'] = self.parse_to_int(id) # reparse id self endpoint is the only one requiring it
|
|
4982
|
+
if amount is not None:
|
|
4983
|
+
request['size'] = self.amount_to_precision(symbol, amount)
|
|
4984
|
+
if price is not None:
|
|
4985
|
+
request['price'] = self.price_to_precision(symbol, price)
|
|
4986
|
+
response = await self.privatePostContractPrivateModifyLimitOrder(self.extend(request, params))
|
|
4976
4987
|
else:
|
|
4977
|
-
raise NotSupported(self.id + ' editOrder() only supports trigger, stop loss and take profit orders')
|
|
4988
|
+
raise NotSupported(self.id + ' editOrder() only supports limit, trigger, stop loss and take profit orders')
|
|
4978
4989
|
data = self.safe_dict(response, 'data', {})
|
|
4979
4990
|
return self.parse_order(data, market)
|
|
4980
4991
|
|
bitmart/ccxt/base/exchange.py
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# -----------------------------------------------------------------------------
|
|
6
6
|
|
|
7
|
-
__version__ = '4.4.
|
|
7
|
+
__version__ = '4.4.72'
|
|
8
8
|
|
|
9
9
|
# -----------------------------------------------------------------------------
|
|
10
10
|
|
|
@@ -33,7 +33,7 @@ from ccxt.base.decimal_to_precision import decimal_to_precision
|
|
|
33
33
|
from ccxt.base.decimal_to_precision import DECIMAL_PLACES, TICK_SIZE, NO_PADDING, TRUNCATE, ROUND, ROUND_UP, ROUND_DOWN, SIGNIFICANT_DIGITS
|
|
34
34
|
from ccxt.base.decimal_to_precision import number_to_string
|
|
35
35
|
from ccxt.base.precise import Precise
|
|
36
|
-
from ccxt.base.types import BalanceAccount, Currency, IndexType, OrderSide, OrderType, Trade, OrderRequest, Market, MarketType, Str, Num, Strings, CancellationRequest, Bool
|
|
36
|
+
from ccxt.base.types import ConstructorArgs, BalanceAccount, Currency, IndexType, OrderSide, OrderType, Trade, OrderRequest, Market, MarketType, Str, Num, Strings, CancellationRequest, Bool
|
|
37
37
|
|
|
38
38
|
# -----------------------------------------------------------------------------
|
|
39
39
|
|
|
@@ -369,7 +369,7 @@ class Exchange(object):
|
|
|
369
369
|
}
|
|
370
370
|
synchronous = True
|
|
371
371
|
|
|
372
|
-
def __init__(self, config={}):
|
|
372
|
+
def __init__(self, config: ConstructorArgs = {}):
|
|
373
373
|
self.aiohttp_trust_env = self.aiohttp_trust_env or self.trust_env
|
|
374
374
|
self.requests_trust_env = self.requests_trust_env or self.trust_env
|
|
375
375
|
|
|
@@ -410,6 +410,9 @@ class Exchange(object):
|
|
|
410
410
|
|
|
411
411
|
self.after_construct()
|
|
412
412
|
|
|
413
|
+
if self.safe_bool(config, 'sandbox') or self.safe_bool(config, 'testnet'):
|
|
414
|
+
self.set_sandbox_mode(True)
|
|
415
|
+
|
|
413
416
|
# convert all properties from underscore notation foo_bar to camelcase notation fooBar
|
|
414
417
|
cls = type(self)
|
|
415
418
|
for name in dir(self):
|
|
@@ -2918,7 +2921,8 @@ class Exchange(object):
|
|
|
2918
2921
|
length = len(keys)
|
|
2919
2922
|
if length != 0:
|
|
2920
2923
|
for i in range(0, length):
|
|
2921
|
-
|
|
2924
|
+
key = keys[i]
|
|
2925
|
+
network = networks[key]
|
|
2922
2926
|
deposit = self.safe_bool(network, 'deposit')
|
|
2923
2927
|
if currencyDeposit is None or deposit:
|
|
2924
2928
|
currency['deposit'] = deposit
|
|
@@ -2928,6 +2932,12 @@ class Exchange(object):
|
|
|
2928
2932
|
active = self.safe_bool(network, 'active')
|
|
2929
2933
|
if currencyActive is None or active:
|
|
2930
2934
|
currency['active'] = active
|
|
2935
|
+
# set network 'active' to False if D or W is disabled
|
|
2936
|
+
if self.safe_bool(network, 'active') is None:
|
|
2937
|
+
if deposit and withdraw:
|
|
2938
|
+
currency['networks'][key]['active'] = True
|
|
2939
|
+
elif deposit is not None and withdraw is not None:
|
|
2940
|
+
currency['networks'][key]['active'] = False
|
|
2931
2941
|
# find lowest fee(which is more desired)
|
|
2932
2942
|
fee = self.safe_string(network, 'fee')
|
|
2933
2943
|
feeMain = self.safe_string(currency, 'fee')
|
|
@@ -4286,6 +4296,23 @@ class Exchange(object):
|
|
|
4286
4296
|
params = self.omit(params, [paramName1, paramName2])
|
|
4287
4297
|
return [value, params]
|
|
4288
4298
|
|
|
4299
|
+
def handle_request_network(self, params: dict, request: dict, exchangeSpecificKey: str, currencyCode: Str = None, isRequired: bool = False):
|
|
4300
|
+
"""
|
|
4301
|
+
:param dict params: - extra parameters
|
|
4302
|
+
:param dict request: - existing dictionary of request
|
|
4303
|
+
:param str exchangeSpecificKey: - the key for chain id to be set in request
|
|
4304
|
+
:param dict currencyCode: - (optional) existing dictionary of request
|
|
4305
|
+
:param boolean isRequired: - (optional) whether that param is required to be present
|
|
4306
|
+
:returns dict[]: - returns [request, params] where request is the modified request object and params is the modified params object
|
|
4307
|
+
"""
|
|
4308
|
+
networkCode = None
|
|
4309
|
+
networkCode, params = self.handle_network_code_and_params(params)
|
|
4310
|
+
if networkCode is not None:
|
|
4311
|
+
request[exchangeSpecificKey] = self.network_code_to_id(networkCode, currencyCode)
|
|
4312
|
+
elif isRequired:
|
|
4313
|
+
raise ArgumentsRequired(self.id + ' - "network" param is required for self request')
|
|
4314
|
+
return [request, params]
|
|
4315
|
+
|
|
4289
4316
|
def resolve_path(self, path, params):
|
|
4290
4317
|
return [
|
|
4291
4318
|
self.implode_params(path, params),
|
bitmart/ccxt/base/types.py
CHANGED
|
@@ -575,3 +575,31 @@ LeverageTiers = Dict[Str, List[LeverageTier]]
|
|
|
575
575
|
|
|
576
576
|
Market = Optional[MarketInterface]
|
|
577
577
|
Currency = Optional[CurrencyInterface]
|
|
578
|
+
|
|
579
|
+
class ConstructorArgs(TypedDict, total=False):
|
|
580
|
+
apiKey: str
|
|
581
|
+
secret: str
|
|
582
|
+
passphrase: str
|
|
583
|
+
password: str
|
|
584
|
+
privateKey: str
|
|
585
|
+
walletAddress: str
|
|
586
|
+
uid: str
|
|
587
|
+
verbose: bool
|
|
588
|
+
testnet: bool
|
|
589
|
+
sandbox: bool # redudant but kept for backwards compatibility
|
|
590
|
+
options: Dict[str, Any]
|
|
591
|
+
enableRateLimit: bool
|
|
592
|
+
httpsProxy: str
|
|
593
|
+
socksProxy: str
|
|
594
|
+
wssProxy: str
|
|
595
|
+
proxy: str
|
|
596
|
+
rateLimit: Num
|
|
597
|
+
commonCurrencies: Dict[str, Any]
|
|
598
|
+
userAgent: str
|
|
599
|
+
userAgents: Dict[str, Any]
|
|
600
|
+
timeout: Num
|
|
601
|
+
markets: Dict[str, Any]
|
|
602
|
+
currencies: Dict[str, Any]
|
|
603
|
+
hostname: str
|
|
604
|
+
urls: Dict[str, Any]
|
|
605
|
+
headers: Dict[str, Any]
|
bitmart/ccxt/bitmart.py
CHANGED
|
@@ -61,6 +61,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
61
61
|
'createOrder': True,
|
|
62
62
|
'createOrders': True,
|
|
63
63
|
'createPostOnlyOrder': True,
|
|
64
|
+
'createReduceOnlyOrder': True,
|
|
64
65
|
'createStopLimitOrder': False,
|
|
65
66
|
'createStopMarketOrder': False,
|
|
66
67
|
'createStopOrder': False,
|
|
@@ -278,6 +279,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
278
279
|
'contract/private/submit-tp-sl-order': 2.5,
|
|
279
280
|
'contract/private/modify-plan-order': 2.5,
|
|
280
281
|
'contract/private/modify-preset-plan-order': 2.5,
|
|
282
|
+
'contract/private/modify-limit-order': 2.5,
|
|
281
283
|
'contract/private/modify-tp-sl-order': 2.5,
|
|
282
284
|
'contract/private/submit-trail-order': 2.5, # weight is not provided by the exchange, is set order
|
|
283
285
|
'contract/private/cancel-trail-order': 1.5, # weight is not provided by the exchange, is set order
|
|
@@ -4875,6 +4877,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4875
4877
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-plan-order-signed
|
|
4876
4878
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-tp-sl-order-signed
|
|
4877
4879
|
https://developer-pro.bitmart.com/en/futuresv2/#modify-preset-plan-order-signed
|
|
4880
|
+
https://developer-pro.bitmart.com/en/futuresv2/#modify-limit-order-signed
|
|
4878
4881
|
|
|
4879
4882
|
:param str id: order id
|
|
4880
4883
|
:param str symbol: unified symbol of the market to edit an order in
|
|
@@ -4909,6 +4912,7 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4909
4912
|
isTakeProfit = takeProfitPrice is not None
|
|
4910
4913
|
isPresetStopLoss = presetStopLoss is not None
|
|
4911
4914
|
isPresetTakeProfit = presetTakeProfit is not None
|
|
4915
|
+
isLimitOrder = (type == 'limit')
|
|
4912
4916
|
request: dict = {
|
|
4913
4917
|
'symbol': market['id'],
|
|
4914
4918
|
}
|
|
@@ -4973,8 +4977,15 @@ class bitmart(Exchange, ImplicitAPI):
|
|
|
4973
4977
|
# "trace": "a5c3234534534a836bc476a203.123452.172716624359200197"
|
|
4974
4978
|
# }
|
|
4975
4979
|
#
|
|
4980
|
+
elif isLimitOrder:
|
|
4981
|
+
request['order_id'] = self.parse_to_int(id) # reparse id self endpoint is the only one requiring it
|
|
4982
|
+
if amount is not None:
|
|
4983
|
+
request['size'] = self.amount_to_precision(symbol, amount)
|
|
4984
|
+
if price is not None:
|
|
4985
|
+
request['price'] = self.price_to_precision(symbol, price)
|
|
4986
|
+
response = self.privatePostContractPrivateModifyLimitOrder(self.extend(request, params))
|
|
4976
4987
|
else:
|
|
4977
|
-
raise NotSupported(self.id + ' editOrder() only supports trigger, stop loss and take profit orders')
|
|
4988
|
+
raise NotSupported(self.id + ' editOrder() only supports limit, trigger, stop loss and take profit orders')
|
|
4978
4989
|
data = self.safe_dict(response, 'data', {})
|
|
4979
4990
|
return self.parse_order(data, market)
|
|
4980
4991
|
|
bitmart/ccxt/pro/__init__.py
CHANGED
|
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
|
|
|
8
8
|
|
|
9
9
|
# ----------------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
__version__ = '4.4.
|
|
11
|
+
__version__ = '4.4.72'
|
|
12
12
|
|
|
13
13
|
# ----------------------------------------------------------------------------
|
|
14
14
|
|
|
@@ -16,6 +16,7 @@ from ccxt.async_support.base.exchange import Exchange # noqa: F401
|
|
|
16
16
|
|
|
17
17
|
# CCXT Pro exchanges (now this is mainly used for importing exchanges in WS tests)
|
|
18
18
|
|
|
19
|
+
from ccxt.pro.bitfinex1 import bitfinex1 # noqa: F401
|
|
19
20
|
from ccxt.pro.bitmart import bitmart # noqa: F401
|
|
20
21
|
|
|
21
|
-
exchanges = [ 'bitmart',]
|
|
22
|
+
exchanges = [ 'bitfinex1', 'bitmart',]
|
bitmart/ccxt/pro/bitmart.py
CHANGED
|
@@ -861,15 +861,12 @@ class bitmart(bitmartAsync):
|
|
|
861
861
|
# "data":[
|
|
862
862
|
# {
|
|
863
863
|
# "trade_id":6798697637,
|
|
864
|
-
# "contract_id":1,
|
|
865
864
|
# "symbol":"BTCUSDT",
|
|
866
865
|
# "deal_price":"39735.8",
|
|
867
866
|
# "deal_vol":"2",
|
|
868
|
-
# "type":0,
|
|
869
867
|
# "way":1,
|
|
870
|
-
# "
|
|
871
|
-
# "
|
|
872
|
-
# "created_at":"2023-12-03T15:48:23.517518538Z"
|
|
868
|
+
# "created_at":"2023-12-03T15:48:23.517518538Z",
|
|
869
|
+
# "m": True,
|
|
873
870
|
# }
|
|
874
871
|
# ]
|
|
875
872
|
# }
|
|
@@ -902,6 +899,7 @@ class bitmart(bitmartAsync):
|
|
|
902
899
|
return symbol
|
|
903
900
|
|
|
904
901
|
def parse_ws_trade(self, trade: dict, market: Market = None):
|
|
902
|
+
#
|
|
905
903
|
# spot
|
|
906
904
|
# {
|
|
907
905
|
# "ms_t": 1740320841473,
|
|
@@ -932,6 +930,16 @@ class bitmart(bitmartAsync):
|
|
|
932
930
|
timestamp = self.parse8601(datetime)
|
|
933
931
|
else:
|
|
934
932
|
datetime = self.iso8601(timestamp)
|
|
933
|
+
takerOrMaker = None # True for public trades
|
|
934
|
+
side = self.safe_string(trade, 'side')
|
|
935
|
+
buyerMaker = self.safe_bool(trade, 'm')
|
|
936
|
+
if buyerMaker is not None:
|
|
937
|
+
if side is None:
|
|
938
|
+
if buyerMaker:
|
|
939
|
+
side = 'sell'
|
|
940
|
+
else:
|
|
941
|
+
side = 'buy'
|
|
942
|
+
takerOrMaker = 'taker'
|
|
935
943
|
return self.safe_trade({
|
|
936
944
|
'info': trade,
|
|
937
945
|
'id': self.safe_string(trade, 'trade_id'),
|
|
@@ -940,11 +948,11 @@ class bitmart(bitmartAsync):
|
|
|
940
948
|
'datetime': datetime,
|
|
941
949
|
'symbol': market['symbol'],
|
|
942
950
|
'type': None,
|
|
943
|
-
'side':
|
|
951
|
+
'side': side,
|
|
944
952
|
'price': self.safe_string_2(trade, 'price', 'deal_price'),
|
|
945
953
|
'amount': self.safe_string_2(trade, 'size', 'deal_vol'),
|
|
946
954
|
'cost': None,
|
|
947
|
-
'takerOrMaker':
|
|
955
|
+
'takerOrMaker': takerOrMaker,
|
|
948
956
|
'fee': None,
|
|
949
957
|
}, market)
|
|
950
958
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: bitmart
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.22
|
|
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
|
|
@@ -287,6 +287,7 @@ You can also construct custom requests to available "implicit" endpoints
|
|
|
287
287
|
- `private_post_contract_private_submit_tp_sl_order(request)`
|
|
288
288
|
- `private_post_contract_private_modify_plan_order(request)`
|
|
289
289
|
- `private_post_contract_private_modify_preset_plan_order(request)`
|
|
290
|
+
- `private_post_contract_private_modify_limit_order(request)`
|
|
290
291
|
- `private_post_contract_private_modify_tp_sl_order(request)`
|
|
291
292
|
- `private_post_contract_private_submit_trail_order(request)`
|
|
292
293
|
- `private_post_contract_private_cancel_trail_order(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=joHwNpx5jSLzx8JTe4fEM0JW0e0lPvU1U9XB8N62ymg,6149
|
|
3
|
+
bitmart/ccxt/bitmart.py,sha256=hWhCICJl9EMFzcESneSAA9eANyBi6b89On5Z09SpBgM,245514
|
|
4
|
+
bitmart/ccxt/abstract/bitmart.py,sha256=zYFFdysW3eiSYIERFkU-mUdLyeUCNN2F6NjcJPHmrOA,16895
|
|
5
|
+
bitmart/ccxt/async_support/__init__.py,sha256=USRCkwczf_IS8M_TakFTVTQ1Atde-xjYbWD1OgOJxcs,4892
|
|
6
|
+
bitmart/ccxt/async_support/bitmart.py,sha256=2KJA_yqf_br2WvOSQUvQE5yPyTif68NNHyL5Ks54ULg,246608
|
|
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=KAsKEfcM2w4vjLa0zmUEMXiBsNduSWfo1A6h15pOLGA,117223
|
|
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
|
|
@@ -19,11 +19,11 @@ bitmart/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9p
|
|
|
19
19
|
bitmart/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
|
20
20
|
bitmart/ccxt/base/decimal_to_precision.py,sha256=fgWRBzRTtsf3r2INyS4f7WHlzgjB5YM1ekiwqD21aac,6634
|
|
21
21
|
bitmart/ccxt/base/errors.py,sha256=MvCrL_sAM3de616T6RE0PSxiF2xV6Qqz5b1y1ghidbk,4888
|
|
22
|
-
bitmart/ccxt/base/exchange.py,sha256=
|
|
22
|
+
bitmart/ccxt/base/exchange.py,sha256=Fr_Du0LL1ud6tVY0ldQ0Vl3PZVDAo_lkqkEIuQi-8hI,321957
|
|
23
23
|
bitmart/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
|
24
|
-
bitmart/ccxt/base/types.py,sha256=
|
|
25
|
-
bitmart/ccxt/pro/__init__.py,sha256=
|
|
26
|
-
bitmart/ccxt/pro/bitmart.py,sha256=
|
|
24
|
+
bitmart/ccxt/base/types.py,sha256=SfxIKDSsxP7MPHWiOVI965Nr5NSEPpAno5fuveTRi3w,11423
|
|
25
|
+
bitmart/ccxt/pro/__init__.py,sha256=iFZc-HgnZ6bRiOiL-mg5sUbOLsgpr2SdBX0C6dAd7Wg,724
|
|
26
|
+
bitmart/ccxt/pro/bitmart.py,sha256=q7vF_BTj_ztO01JCiSFsJJkOVM5Hwd5aYMfrjBLgYeE,66902
|
|
27
27
|
bitmart/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
|
28
28
|
bitmart/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
|
29
29
|
bitmart/ccxt/static_dependencies/ecdsa/__init__.py,sha256=Xaj0G79BLtBt2YZcOOMV8qOlQZ7fIJznNiHhiEEZfQA,594
|
|
@@ -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.22.dist-info/METADATA,sha256=-qfTVHkolSniXwZaBYUTc2YvSUA8EjCDi8tCOIQmP8Y,14637
|
|
287
|
+
bitmart-0.0.22.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
288
|
+
bitmart-0.0.22.dist-info/RECORD,,
|
|
File without changes
|