mexc-exchange-api 0.0.91__py3-none-any.whl → 0.0.92__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 mexc-exchange-api might be problematic. Click here for more details.
- mexc/ccxt/__init__.py +1 -1
- mexc/ccxt/abstract/mexc.py +1 -0
- mexc/ccxt/async_support/__init__.py +1 -1
- mexc/ccxt/async_support/base/exchange.py +1 -1
- mexc/ccxt/async_support/mexc.py +75 -36
- mexc/ccxt/base/exchange.py +1 -1
- mexc/ccxt/mexc.py +75 -36
- mexc/ccxt/pro/__init__.py +1 -1
- {mexc_exchange_api-0.0.91.dist-info → mexc_exchange_api-0.0.92.dist-info}/METADATA +2 -1
- {mexc_exchange_api-0.0.91.dist-info → mexc_exchange_api-0.0.92.dist-info}/RECORD +11 -11
- {mexc_exchange_api-0.0.91.dist-info → mexc_exchange_api-0.0.92.dist-info}/WHEEL +0 -0
mexc/ccxt/__init__.py
CHANGED
mexc/ccxt/abstract/mexc.py
CHANGED
|
@@ -58,6 +58,7 @@ class ImplicitAPI:
|
|
|
58
58
|
spot_private_get_mxdeduct_enable = spotPrivateGetMxDeductEnable = Entry('mxDeduct/enable', ['spot', 'private'], 'GET', {'cost': 1})
|
|
59
59
|
spot_private_get_userdatastream = spotPrivateGetUserDataStream = Entry('userDataStream', ['spot', 'private'], 'GET', {'cost': 1})
|
|
60
60
|
spot_private_get_selfsymbols = spotPrivateGetSelfSymbols = Entry('selfSymbols', ['spot', 'private'], 'GET', {'cost': 1})
|
|
61
|
+
spot_private_get_asset_internal_transfer_record = spotPrivateGetAssetInternalTransferRecord = Entry('asset/internal/transfer/record', ['spot', 'private'], 'GET', {'cost': 10})
|
|
61
62
|
spot_private_post_order = spotPrivatePostOrder = Entry('order', ['spot', 'private'], 'POST', {'cost': 1})
|
|
62
63
|
spot_private_post_order_test = spotPrivatePostOrderTest = Entry('order/test', ['spot', 'private'], 'POST', {'cost': 1})
|
|
63
64
|
spot_private_post_sub_account_virtualsubaccount = spotPrivatePostSubAccountVirtualSubAccount = Entry('sub-account/virtualSubAccount', ['spot', 'private'], 'POST', {'cost': 1})
|
mexc/ccxt/async_support/mexc.py
CHANGED
|
@@ -245,6 +245,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
245
245
|
'mxDeduct/enable': 1,
|
|
246
246
|
'userDataStream': 1,
|
|
247
247
|
'selfSymbols': 1,
|
|
248
|
+
'asset/internal/transfer/record': 10,
|
|
248
249
|
},
|
|
249
250
|
'post': {
|
|
250
251
|
'order': 1,
|
|
@@ -5030,7 +5031,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5030
5031
|
request: dict = {
|
|
5031
5032
|
'transact_id': id,
|
|
5032
5033
|
}
|
|
5033
|
-
response = await self.
|
|
5034
|
+
response = await self.spotPrivateGetAssetInternalTransferRecord(self.extend(request, query))
|
|
5034
5035
|
#
|
|
5035
5036
|
# {
|
|
5036
5037
|
# "code": "200",
|
|
@@ -5056,54 +5057,74 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5056
5057
|
|
|
5057
5058
|
https://mexcdevelop.github.io/apidocs/spot_v2_en/#get-internal-assets-transfer-records
|
|
5058
5059
|
https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-39-s-asset-transfer-records
|
|
5060
|
+
https://www.mexc.com/api-docs/spot-v3/wallet-endpoints#query-user-universal-transfer-history :param str code: unified currency code of the currency transferred
|
|
5059
5061
|
|
|
5060
|
-
|
|
5062
|
+
@param code
|
|
5061
5063
|
:param int [since]: the earliest time in ms to fetch transfers for
|
|
5062
5064
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
|
5063
5065
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
5066
|
+
:param str [params.fromAccountType]: 'SPOT' for spot wallet, 'FUTURES' for contract wallet
|
|
5067
|
+
:param str [params.toAccountType]: 'SPOT' for spot wallet, 'FUTURES' for contract wallet
|
|
5064
5068
|
:returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
|
|
5065
5069
|
"""
|
|
5066
|
-
marketType
|
|
5070
|
+
marketType = None
|
|
5071
|
+
marketType, params = self.handle_market_type_and_params('fetchTransfers', None, params)
|
|
5067
5072
|
await self.load_markets()
|
|
5068
5073
|
request: dict = {}
|
|
5069
5074
|
currency = None
|
|
5070
|
-
resultList = None
|
|
5071
5075
|
if code is not None:
|
|
5072
5076
|
currency = self.currency(code)
|
|
5073
|
-
|
|
5077
|
+
fromAccountType = None
|
|
5078
|
+
fromAccountType, params = self.handle_option_and_params(params, 'fetchTransfers', 'fromAccountType')
|
|
5079
|
+
accountTypes = {
|
|
5080
|
+
'spot': 'SPOT',
|
|
5081
|
+
'swap': 'FUTURES',
|
|
5082
|
+
'futures': 'FUTURES',
|
|
5083
|
+
'future': 'FUTURES',
|
|
5084
|
+
'margin': 'SPOT',
|
|
5085
|
+
}
|
|
5086
|
+
if fromAccountType is not None:
|
|
5087
|
+
request['fromAccountType'] = self.safe_string(accountTypes, fromAccountType, fromAccountType)
|
|
5088
|
+
else:
|
|
5089
|
+
raise ArgumentsRequired(self.id + ' fetchTransfers() requires a fromAccountType parameter, one of "SPOT", "FUTURES"')
|
|
5090
|
+
toAccountType = None
|
|
5091
|
+
toAccountType, params = self.handle_option_and_params(params, 'fetchTransfers', 'toAccountType')
|
|
5092
|
+
if toAccountType is not None:
|
|
5093
|
+
request['toAccountType'] = self.safe_string(accountTypes, toAccountType, toAccountType)
|
|
5094
|
+
else:
|
|
5095
|
+
raise ArgumentsRequired(self.id + ' fetchTransfers() requires a toAccountType parameter, one of "SPOT", "FUTURES"')
|
|
5096
|
+
resultList = []
|
|
5074
5097
|
if marketType == 'spot':
|
|
5075
5098
|
if since is not None:
|
|
5076
|
-
request['
|
|
5099
|
+
request['startTime'] = since
|
|
5077
5100
|
if limit is not None:
|
|
5078
|
-
if limit >
|
|
5101
|
+
if limit > 100:
|
|
5079
5102
|
raise ExchangeError('This exchange supports a maximum limit of 50')
|
|
5080
|
-
request['
|
|
5081
|
-
response = await self.
|
|
5103
|
+
request['size'] = limit
|
|
5104
|
+
response = await self.spotPrivateGetCapitalTransfer(self.extend(request, params))
|
|
5082
5105
|
#
|
|
5083
|
-
# {
|
|
5084
|
-
# "code": "200",
|
|
5085
|
-
# "data": {
|
|
5086
|
-
# "total_page": "1",
|
|
5087
|
-
# "total_size": "5",
|
|
5088
|
-
# "result_list": [{
|
|
5089
|
-
# "currency": "USDT",
|
|
5090
|
-
# "amount": "1",
|
|
5091
|
-
# "transact_id": "954877a2ef54499db9b28a7cf9ebcf41",
|
|
5092
|
-
# "from": "MAIN",
|
|
5093
|
-
# "to": "CONTRACT",
|
|
5094
|
-
# "transact_state": "SUCCESS"
|
|
5095
|
-
# },
|
|
5096
|
-
# ...
|
|
5097
|
-
# ]
|
|
5098
|
-
# }
|
|
5099
|
-
# }
|
|
5100
5106
|
#
|
|
5101
|
-
|
|
5102
|
-
|
|
5107
|
+
# {
|
|
5108
|
+
# "rows": [
|
|
5109
|
+
# {
|
|
5110
|
+
# "tranId": "cdf0d2a618b5458c965baefe6b1d0859",
|
|
5111
|
+
# "clientTranId": null,
|
|
5112
|
+
# "asset": "USDT",
|
|
5113
|
+
# "amount": "1",
|
|
5114
|
+
# "fromAccountType": "FUTURES",
|
|
5115
|
+
# "toAccountType": "SPOT",
|
|
5116
|
+
# "symbol": null,
|
|
5117
|
+
# "status": "SUCCESS",
|
|
5118
|
+
# "timestamp": 1759328309000
|
|
5119
|
+
# }
|
|
5120
|
+
# ],
|
|
5121
|
+
# "total": 1
|
|
5122
|
+
# }
|
|
5123
|
+
resultList = self.safe_list(response, 'rows', [])
|
|
5103
5124
|
elif marketType == 'swap':
|
|
5104
5125
|
if limit is not None:
|
|
5105
5126
|
request['page_size'] = limit
|
|
5106
|
-
response = await self.contractPrivateGetAccountTransferRecord(self.extend(request,
|
|
5127
|
+
response = await self.contractPrivateGetAccountTransferRecord(self.extend(request, params))
|
|
5107
5128
|
data = self.safe_value(response, 'data')
|
|
5108
5129
|
resultList = self.safe_value(data, 'resultList')
|
|
5109
5130
|
#
|
|
@@ -5151,10 +5172,10 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5151
5172
|
accounts: dict = {
|
|
5152
5173
|
'spot': 'SPOT',
|
|
5153
5174
|
'swap': 'FUTURES',
|
|
5154
|
-
'
|
|
5175
|
+
'future': 'FUTURES',
|
|
5155
5176
|
}
|
|
5156
|
-
fromId = self.safe_string(accounts, fromAccount)
|
|
5157
|
-
toId = self.safe_string(accounts, toAccount)
|
|
5177
|
+
fromId = self.safe_string(accounts, fromAccount, fromAccount)
|
|
5178
|
+
toId = self.safe_string(accounts, toAccount, toAccount)
|
|
5158
5179
|
if fromId is None:
|
|
5159
5180
|
keys = list(accounts.keys())
|
|
5160
5181
|
raise ExchangeError(self.id + ' fromAccount must be one of ' + ', '.join(keys))
|
|
@@ -5212,6 +5233,17 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5212
5233
|
# "createTime": "1648849076000",
|
|
5213
5234
|
# "updateTime": "1648849076000"
|
|
5214
5235
|
# }
|
|
5236
|
+
# {
|
|
5237
|
+
# "tranId": "cdf0d2a618b5458c965baefe6b1d0859",
|
|
5238
|
+
# "clientTranId": null,
|
|
5239
|
+
# "asset": "USDT",
|
|
5240
|
+
# "amount": "1",
|
|
5241
|
+
# "fromAccountType": "FUTURES",
|
|
5242
|
+
# "toAccountType": "SPOT",
|
|
5243
|
+
# "symbol": null,
|
|
5244
|
+
# "status": "SUCCESS",
|
|
5245
|
+
# "timestamp": 1759328309000
|
|
5246
|
+
# }
|
|
5215
5247
|
#
|
|
5216
5248
|
# transfer
|
|
5217
5249
|
#
|
|
@@ -5219,14 +5251,19 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5219
5251
|
# "tranId": "ebb06123e6a64f4ab234b396c548d57e"
|
|
5220
5252
|
# }
|
|
5221
5253
|
#
|
|
5222
|
-
currencyId = self.
|
|
5254
|
+
currencyId = self.safe_string_2(transfer, 'currency', 'asset')
|
|
5223
5255
|
id = self.safe_string_n(transfer, ['transact_id', 'txid', 'tranId'])
|
|
5224
|
-
timestamp = self.
|
|
5256
|
+
timestamp = self.safe_integer_2(transfer, 'createTime', 'timestamp')
|
|
5225
5257
|
datetime = self.iso8601(timestamp) if (timestamp is not None) else None
|
|
5226
5258
|
direction = self.safe_string(transfer, 'type')
|
|
5227
5259
|
accountFrom = None
|
|
5228
5260
|
accountTo = None
|
|
5229
|
-
|
|
5261
|
+
fromAccountType = self.safe_string(transfer, 'fromAccountType')
|
|
5262
|
+
toAccountType = self.safe_string(transfer, 'toAccountType')
|
|
5263
|
+
if (fromAccountType is not None) and (toAccountType is not None):
|
|
5264
|
+
accountFrom = fromAccountType
|
|
5265
|
+
accountTo = toAccountType
|
|
5266
|
+
elif direction is not None:
|
|
5230
5267
|
accountFrom = 'MAIN' if (direction == 'IN') else 'CONTRACT'
|
|
5231
5268
|
accountTo = 'CONTRACT' if (direction == 'IN') else 'MAIN'
|
|
5232
5269
|
else:
|
|
@@ -5241,11 +5278,13 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5241
5278
|
'amount': self.safe_number(transfer, 'amount'),
|
|
5242
5279
|
'fromAccount': self.parse_account_id(accountFrom),
|
|
5243
5280
|
'toAccount': self.parse_account_id(accountTo),
|
|
5244
|
-
'status': self.parse_transfer_status(self.
|
|
5281
|
+
'status': self.parse_transfer_status(self.safe_string_n(transfer, ['transact_state', 'state', 'status'])),
|
|
5245
5282
|
}
|
|
5246
5283
|
|
|
5247
5284
|
def parse_account_id(self, status):
|
|
5248
5285
|
statuses: dict = {
|
|
5286
|
+
'SPOT': 'spot',
|
|
5287
|
+
'FUTURES': 'swap',
|
|
5249
5288
|
'MAIN': 'spot',
|
|
5250
5289
|
'CONTRACT': 'swap',
|
|
5251
5290
|
}
|
mexc/ccxt/base/exchange.py
CHANGED
mexc/ccxt/mexc.py
CHANGED
|
@@ -244,6 +244,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
244
244
|
'mxDeduct/enable': 1,
|
|
245
245
|
'userDataStream': 1,
|
|
246
246
|
'selfSymbols': 1,
|
|
247
|
+
'asset/internal/transfer/record': 10,
|
|
247
248
|
},
|
|
248
249
|
'post': {
|
|
249
250
|
'order': 1,
|
|
@@ -5029,7 +5030,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5029
5030
|
request: dict = {
|
|
5030
5031
|
'transact_id': id,
|
|
5031
5032
|
}
|
|
5032
|
-
response = self.
|
|
5033
|
+
response = self.spotPrivateGetAssetInternalTransferRecord(self.extend(request, query))
|
|
5033
5034
|
#
|
|
5034
5035
|
# {
|
|
5035
5036
|
# "code": "200",
|
|
@@ -5055,54 +5056,74 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5055
5056
|
|
|
5056
5057
|
https://mexcdevelop.github.io/apidocs/spot_v2_en/#get-internal-assets-transfer-records
|
|
5057
5058
|
https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-user-39-s-asset-transfer-records
|
|
5059
|
+
https://www.mexc.com/api-docs/spot-v3/wallet-endpoints#query-user-universal-transfer-history :param str code: unified currency code of the currency transferred
|
|
5058
5060
|
|
|
5059
|
-
|
|
5061
|
+
@param code
|
|
5060
5062
|
:param int [since]: the earliest time in ms to fetch transfers for
|
|
5061
5063
|
:param int [limit]: the maximum number of transfers structures to retrieve
|
|
5062
5064
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
|
5065
|
+
:param str [params.fromAccountType]: 'SPOT' for spot wallet, 'FUTURES' for contract wallet
|
|
5066
|
+
:param str [params.toAccountType]: 'SPOT' for spot wallet, 'FUTURES' for contract wallet
|
|
5063
5067
|
:returns dict[]: a list of `transfer structures <https://docs.ccxt.com/#/?id=transfer-structure>`
|
|
5064
5068
|
"""
|
|
5065
|
-
marketType
|
|
5069
|
+
marketType = None
|
|
5070
|
+
marketType, params = self.handle_market_type_and_params('fetchTransfers', None, params)
|
|
5066
5071
|
self.load_markets()
|
|
5067
5072
|
request: dict = {}
|
|
5068
5073
|
currency = None
|
|
5069
|
-
resultList = None
|
|
5070
5074
|
if code is not None:
|
|
5071
5075
|
currency = self.currency(code)
|
|
5072
|
-
|
|
5076
|
+
fromAccountType = None
|
|
5077
|
+
fromAccountType, params = self.handle_option_and_params(params, 'fetchTransfers', 'fromAccountType')
|
|
5078
|
+
accountTypes = {
|
|
5079
|
+
'spot': 'SPOT',
|
|
5080
|
+
'swap': 'FUTURES',
|
|
5081
|
+
'futures': 'FUTURES',
|
|
5082
|
+
'future': 'FUTURES',
|
|
5083
|
+
'margin': 'SPOT',
|
|
5084
|
+
}
|
|
5085
|
+
if fromAccountType is not None:
|
|
5086
|
+
request['fromAccountType'] = self.safe_string(accountTypes, fromAccountType, fromAccountType)
|
|
5087
|
+
else:
|
|
5088
|
+
raise ArgumentsRequired(self.id + ' fetchTransfers() requires a fromAccountType parameter, one of "SPOT", "FUTURES"')
|
|
5089
|
+
toAccountType = None
|
|
5090
|
+
toAccountType, params = self.handle_option_and_params(params, 'fetchTransfers', 'toAccountType')
|
|
5091
|
+
if toAccountType is not None:
|
|
5092
|
+
request['toAccountType'] = self.safe_string(accountTypes, toAccountType, toAccountType)
|
|
5093
|
+
else:
|
|
5094
|
+
raise ArgumentsRequired(self.id + ' fetchTransfers() requires a toAccountType parameter, one of "SPOT", "FUTURES"')
|
|
5095
|
+
resultList = []
|
|
5073
5096
|
if marketType == 'spot':
|
|
5074
5097
|
if since is not None:
|
|
5075
|
-
request['
|
|
5098
|
+
request['startTime'] = since
|
|
5076
5099
|
if limit is not None:
|
|
5077
|
-
if limit >
|
|
5100
|
+
if limit > 100:
|
|
5078
5101
|
raise ExchangeError('This exchange supports a maximum limit of 50')
|
|
5079
|
-
request['
|
|
5080
|
-
response = self.
|
|
5102
|
+
request['size'] = limit
|
|
5103
|
+
response = self.spotPrivateGetCapitalTransfer(self.extend(request, params))
|
|
5081
5104
|
#
|
|
5082
|
-
# {
|
|
5083
|
-
# "code": "200",
|
|
5084
|
-
# "data": {
|
|
5085
|
-
# "total_page": "1",
|
|
5086
|
-
# "total_size": "5",
|
|
5087
|
-
# "result_list": [{
|
|
5088
|
-
# "currency": "USDT",
|
|
5089
|
-
# "amount": "1",
|
|
5090
|
-
# "transact_id": "954877a2ef54499db9b28a7cf9ebcf41",
|
|
5091
|
-
# "from": "MAIN",
|
|
5092
|
-
# "to": "CONTRACT",
|
|
5093
|
-
# "transact_state": "SUCCESS"
|
|
5094
|
-
# },
|
|
5095
|
-
# ...
|
|
5096
|
-
# ]
|
|
5097
|
-
# }
|
|
5098
|
-
# }
|
|
5099
5105
|
#
|
|
5100
|
-
|
|
5101
|
-
|
|
5106
|
+
# {
|
|
5107
|
+
# "rows": [
|
|
5108
|
+
# {
|
|
5109
|
+
# "tranId": "cdf0d2a618b5458c965baefe6b1d0859",
|
|
5110
|
+
# "clientTranId": null,
|
|
5111
|
+
# "asset": "USDT",
|
|
5112
|
+
# "amount": "1",
|
|
5113
|
+
# "fromAccountType": "FUTURES",
|
|
5114
|
+
# "toAccountType": "SPOT",
|
|
5115
|
+
# "symbol": null,
|
|
5116
|
+
# "status": "SUCCESS",
|
|
5117
|
+
# "timestamp": 1759328309000
|
|
5118
|
+
# }
|
|
5119
|
+
# ],
|
|
5120
|
+
# "total": 1
|
|
5121
|
+
# }
|
|
5122
|
+
resultList = self.safe_list(response, 'rows', [])
|
|
5102
5123
|
elif marketType == 'swap':
|
|
5103
5124
|
if limit is not None:
|
|
5104
5125
|
request['page_size'] = limit
|
|
5105
|
-
response = self.contractPrivateGetAccountTransferRecord(self.extend(request,
|
|
5126
|
+
response = self.contractPrivateGetAccountTransferRecord(self.extend(request, params))
|
|
5106
5127
|
data = self.safe_value(response, 'data')
|
|
5107
5128
|
resultList = self.safe_value(data, 'resultList')
|
|
5108
5129
|
#
|
|
@@ -5150,10 +5171,10 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5150
5171
|
accounts: dict = {
|
|
5151
5172
|
'spot': 'SPOT',
|
|
5152
5173
|
'swap': 'FUTURES',
|
|
5153
|
-
'
|
|
5174
|
+
'future': 'FUTURES',
|
|
5154
5175
|
}
|
|
5155
|
-
fromId = self.safe_string(accounts, fromAccount)
|
|
5156
|
-
toId = self.safe_string(accounts, toAccount)
|
|
5176
|
+
fromId = self.safe_string(accounts, fromAccount, fromAccount)
|
|
5177
|
+
toId = self.safe_string(accounts, toAccount, toAccount)
|
|
5157
5178
|
if fromId is None:
|
|
5158
5179
|
keys = list(accounts.keys())
|
|
5159
5180
|
raise ExchangeError(self.id + ' fromAccount must be one of ' + ', '.join(keys))
|
|
@@ -5211,6 +5232,17 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5211
5232
|
# "createTime": "1648849076000",
|
|
5212
5233
|
# "updateTime": "1648849076000"
|
|
5213
5234
|
# }
|
|
5235
|
+
# {
|
|
5236
|
+
# "tranId": "cdf0d2a618b5458c965baefe6b1d0859",
|
|
5237
|
+
# "clientTranId": null,
|
|
5238
|
+
# "asset": "USDT",
|
|
5239
|
+
# "amount": "1",
|
|
5240
|
+
# "fromAccountType": "FUTURES",
|
|
5241
|
+
# "toAccountType": "SPOT",
|
|
5242
|
+
# "symbol": null,
|
|
5243
|
+
# "status": "SUCCESS",
|
|
5244
|
+
# "timestamp": 1759328309000
|
|
5245
|
+
# }
|
|
5214
5246
|
#
|
|
5215
5247
|
# transfer
|
|
5216
5248
|
#
|
|
@@ -5218,14 +5250,19 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5218
5250
|
# "tranId": "ebb06123e6a64f4ab234b396c548d57e"
|
|
5219
5251
|
# }
|
|
5220
5252
|
#
|
|
5221
|
-
currencyId = self.
|
|
5253
|
+
currencyId = self.safe_string_2(transfer, 'currency', 'asset')
|
|
5222
5254
|
id = self.safe_string_n(transfer, ['transact_id', 'txid', 'tranId'])
|
|
5223
|
-
timestamp = self.
|
|
5255
|
+
timestamp = self.safe_integer_2(transfer, 'createTime', 'timestamp')
|
|
5224
5256
|
datetime = self.iso8601(timestamp) if (timestamp is not None) else None
|
|
5225
5257
|
direction = self.safe_string(transfer, 'type')
|
|
5226
5258
|
accountFrom = None
|
|
5227
5259
|
accountTo = None
|
|
5228
|
-
|
|
5260
|
+
fromAccountType = self.safe_string(transfer, 'fromAccountType')
|
|
5261
|
+
toAccountType = self.safe_string(transfer, 'toAccountType')
|
|
5262
|
+
if (fromAccountType is not None) and (toAccountType is not None):
|
|
5263
|
+
accountFrom = fromAccountType
|
|
5264
|
+
accountTo = toAccountType
|
|
5265
|
+
elif direction is not None:
|
|
5229
5266
|
accountFrom = 'MAIN' if (direction == 'IN') else 'CONTRACT'
|
|
5230
5267
|
accountTo = 'CONTRACT' if (direction == 'IN') else 'MAIN'
|
|
5231
5268
|
else:
|
|
@@ -5240,11 +5277,13 @@ class mexc(Exchange, ImplicitAPI):
|
|
|
5240
5277
|
'amount': self.safe_number(transfer, 'amount'),
|
|
5241
5278
|
'fromAccount': self.parse_account_id(accountFrom),
|
|
5242
5279
|
'toAccount': self.parse_account_id(accountTo),
|
|
5243
|
-
'status': self.parse_transfer_status(self.
|
|
5280
|
+
'status': self.parse_transfer_status(self.safe_string_n(transfer, ['transact_state', 'state', 'status'])),
|
|
5244
5281
|
}
|
|
5245
5282
|
|
|
5246
5283
|
def parse_account_id(self, status):
|
|
5247
5284
|
statuses: dict = {
|
|
5285
|
+
'SPOT': 'spot',
|
|
5286
|
+
'FUTURES': 'swap',
|
|
5248
5287
|
'MAIN': 'spot',
|
|
5249
5288
|
'CONTRACT': 'swap',
|
|
5250
5289
|
}
|
mexc/ccxt/pro/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mexc-exchange-api
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.92
|
|
4
4
|
Summary: mexc crypto exchange api client
|
|
5
5
|
Project-URL: Homepage, https://github.com/ccxt/ccxt
|
|
6
6
|
Project-URL: Issues, https://github.com/ccxt/ccxt
|
|
@@ -251,6 +251,7 @@ You can also construct custom requests to available "implicit" endpoints
|
|
|
251
251
|
- `spot_private_get_mxdeduct_enable(request)`
|
|
252
252
|
- `spot_private_get_userdatastream(request)`
|
|
253
253
|
- `spot_private_get_selfsymbols(request)`
|
|
254
|
+
- `spot_private_get_asset_internal_transfer_record(request)`
|
|
254
255
|
- `spot_private_post_order(request)`
|
|
255
256
|
- `spot_private_post_order_test(request)`
|
|
256
257
|
- `spot_private_post_sub_account_virtualsubaccount(request)`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
mexc/__init__.py,sha256=bFV_Nfz_k-lfB_ImsHGpFnJuVMUXLBRbttugnPV7c4A,222
|
|
2
|
-
mexc/ccxt/__init__.py,sha256=
|
|
3
|
-
mexc/ccxt/mexc.py,sha256=
|
|
4
|
-
mexc/ccxt/abstract/mexc.py,sha256=
|
|
5
|
-
mexc/ccxt/async_support/__init__.py,sha256=
|
|
6
|
-
mexc/ccxt/async_support/mexc.py,sha256=
|
|
2
|
+
mexc/ccxt/__init__.py,sha256=SwceHPCJuX7NC7VAF7UobvAGANETCebTrkiWp3VkSsM,6126
|
|
3
|
+
mexc/ccxt/mexc.py,sha256=jMADkRZIqSuX3S0iLEUrN2xJ9gh7teYqM9-l-ld3WoI,263123
|
|
4
|
+
mexc/ccxt/abstract/mexc.py,sha256=whLPllbBePbIrCwhJBWp4M7XPvz4PhheTlbcQExV_aY,26614
|
|
5
|
+
mexc/ccxt/async_support/__init__.py,sha256=kbxuES-cogQz-wWufKoLq6kVzT9VluOQsXIxO-IDESY,4859
|
|
6
|
+
mexc/ccxt/async_support/mexc.py,sha256=H7yNnH9lzQ_7ahs9CvV8cJk7iNpp8iGyDLMjyI1T8f4,264393
|
|
7
7
|
mexc/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
|
|
8
|
-
mexc/ccxt/async_support/base/exchange.py,sha256=
|
|
8
|
+
mexc/ccxt/async_support/base/exchange.py,sha256=oRegJjkuRKReYdiDlqBdVWelkzXoyKbCTI8lskWBCGw,121432
|
|
9
9
|
mexc/ccxt/async_support/base/throttler.py,sha256=tvDVcdRUVYi8fZRlEcnqtgzcgB_KMUMRs5Pu8tuU-tU,1847
|
|
10
10
|
mexc/ccxt/async_support/base/ws/__init__.py,sha256=uockzpLuwntKGZbs5EOWFe-Zg-k6Cj7GhNJLc_RX0so,1791
|
|
11
11
|
mexc/ccxt/async_support/base/ws/cache.py,sha256=xf2VOtfUwloxSlIQ39M1RGZHWQzyS9IGhB5NX6cDcAc,8370
|
|
@@ -17,10 +17,10 @@ mexc/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9prod
|
|
|
17
17
|
mexc/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
|
|
18
18
|
mexc/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
|
|
19
19
|
mexc/ccxt/base/errors.py,sha256=LdTTHPmxpeFHJze93mGl7I3maqTgN0y_1mJ6coWkXmA,4734
|
|
20
|
-
mexc/ccxt/base/exchange.py,sha256=
|
|
20
|
+
mexc/ccxt/base/exchange.py,sha256=z1TCuTKRamNgP_fnQGegYtaE8xe9sFz51x8QyeKZmUI,343891
|
|
21
21
|
mexc/ccxt/base/precise.py,sha256=koce64Yrp6vFbGijJtUt-QQ6XhJgeGTCksZ871FPp_A,8886
|
|
22
22
|
mexc/ccxt/base/types.py,sha256=Gvbogh9i7pPH7Z18xesYeDPribqqwq8uKpOv-YODFBs,11505
|
|
23
|
-
mexc/ccxt/pro/__init__.py,sha256=
|
|
23
|
+
mexc/ccxt/pro/__init__.py,sha256=sDMWSoDelxaiuPwadS_k1gENqMrIbJNsLRi8nhkUClk,4173
|
|
24
24
|
mexc/ccxt/pro/mexc.py,sha256=F-GKatxBc-Z_R5Bxh_gtUt9gWDLtvSTg7RUGau5wB0s,77152
|
|
25
25
|
mexc/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
|
|
26
26
|
mexc/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
|
|
@@ -281,6 +281,6 @@ mexc/ccxt/static_dependencies/toolz/curried/exceptions.py,sha256=gKFOHDIayAWnX2u
|
|
|
281
281
|
mexc/ccxt/static_dependencies/toolz/curried/operator.py,sha256=ML92mknkAwzBl2NCm-4werSUmJEtSHNY9NSzhseNM9s,525
|
|
282
282
|
mexc/ccxt/static_dependencies/typing_inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
283
283
|
mexc/ccxt/static_dependencies/typing_inspect/typing_inspect.py,sha256=5gIWomLPfuDpgd3gX1GlnX0MuXM3VorR4j2W2qXORiQ,28269
|
|
284
|
-
mexc_exchange_api-0.0.
|
|
285
|
-
mexc_exchange_api-0.0.
|
|
286
|
-
mexc_exchange_api-0.0.
|
|
284
|
+
mexc_exchange_api-0.0.92.dist-info/METADATA,sha256=uuFSlD0PSB9r14C9a5WIfNjf0fzlfXchmPtUOdOZDkc,18133
|
|
285
|
+
mexc_exchange_api-0.0.92.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
286
|
+
mexc_exchange_api-0.0.92.dist-info/RECORD,,
|
|
File without changes
|