mexc-exchange-api 0.0.82__py3-none-any.whl → 0.0.84__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.
mexc/ccxt/__init__.py CHANGED
@@ -26,7 +26,7 @@ sys.modules['ccxt'] = ccxt_module
26
26
 
27
27
  # ----------------------------------------------------------------------------
28
28
 
29
- __version__ = '4.4.100'
29
+ __version__ = '4.5.1'
30
30
 
31
31
  # ----------------------------------------------------------------------------
32
32
 
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.100'
11
+ __version__ = '4.5.1'
12
12
 
13
13
  # -----------------------------------------------------------------------------
14
14
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # -----------------------------------------------------------------------------
4
4
 
5
- __version__ = '4.4.100'
5
+ __version__ = '4.5.1'
6
6
 
7
7
  # -----------------------------------------------------------------------------
8
8
 
@@ -585,7 +585,7 @@ class Exchange(BaseExchange):
585
585
 
586
586
  def decode_proto_msg(self, data):
587
587
  if not MessageToDict:
588
- raise NotSupported(self.id + ' requires protobuf to decode messages, please install it with `pip install "protobuf==5.29.3"`')
588
+ raise NotSupported(self.id + ' requires protobuf to decode messages, please install it with `pip install "protobuf==5.29.5"`')
589
589
  message = PushDataV3ApiWrapper_pb2.PushDataV3ApiWrapper()
590
590
  message.ParseFromString(data)
591
591
  dict_msg = MessageToDict(message)
@@ -681,6 +681,7 @@ class mexc(Exchange, ImplicitAPI):
681
681
  'BNB Smart Chain(BEP20-RACAV1)': 'BSC',
682
682
  'BNB Smart Chain(BEP20-RACAV2)': 'BSC',
683
683
  'BNB Smart Chain(BEP20)': 'BSC',
684
+ 'Ethereum(ERC20)': 'ERC20',
684
685
  # TODO: uncomment below after deciding unified name
685
686
  # 'PEPE COIN BSC':
686
687
  # 'SMART BLOCKCHAIN':
@@ -4961,7 +4962,7 @@ class mexc(Exchange, ImplicitAPI):
4961
4962
  # positionShowStatus: 'CLOSED'
4962
4963
  # }
4963
4964
  #
4964
- market = self.safe_market(self.safe_string(position, 'symbol'), market)
4965
+ market = self.safe_market(self.safe_string(position, 'symbol'), market, None, 'swap')
4965
4966
  symbol = market['symbol']
4966
4967
  contracts = self.safe_string(position, 'holdVol')
4967
4968
  entryPrice = self.safe_number(position, 'openAvgPrice')
mexc/ccxt/base/errors.py CHANGED
@@ -1,3 +1,9 @@
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
+
1
7
  error_hierarchy = {
2
8
  'BaseError': {
3
9
  'ExchangeError': {
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.4.100'
7
+ __version__ = '4.5.1'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
@@ -2337,6 +2337,12 @@ class Exchange(object):
2337
2337
  # return the first index of the cache that can be applied to the orderbook or -1 if not possible
2338
2338
  return -1
2339
2339
 
2340
+ def arrays_concat(self, arraysOfArrays: List[Any]):
2341
+ result = []
2342
+ for i in range(0, len(arraysOfArrays)):
2343
+ result = self.array_concat(result, arraysOfArrays[i])
2344
+ return result
2345
+
2340
2346
  def find_timeframe(self, timeframe, timeframes=None):
2341
2347
  if timeframes is None:
2342
2348
  timeframes = self.timeframes
mexc/ccxt/mexc.py CHANGED
@@ -680,6 +680,7 @@ class mexc(Exchange, ImplicitAPI):
680
680
  'BNB Smart Chain(BEP20-RACAV1)': 'BSC',
681
681
  'BNB Smart Chain(BEP20-RACAV2)': 'BSC',
682
682
  'BNB Smart Chain(BEP20)': 'BSC',
683
+ 'Ethereum(ERC20)': 'ERC20',
683
684
  # TODO: uncomment below after deciding unified name
684
685
  # 'PEPE COIN BSC':
685
686
  # 'SMART BLOCKCHAIN':
@@ -4960,7 +4961,7 @@ class mexc(Exchange, ImplicitAPI):
4960
4961
  # positionShowStatus: 'CLOSED'
4961
4962
  # }
4962
4963
  #
4963
- market = self.safe_market(self.safe_string(position, 'symbol'), market)
4964
+ market = self.safe_market(self.safe_string(position, 'symbol'), market, None, 'swap')
4964
4965
  symbol = market['symbol']
4965
4966
  contracts = self.safe_string(position, 'holdVol')
4966
4967
  entryPrice = self.safe_number(position, 'openAvgPrice')
mexc/ccxt/pro/__init__.py CHANGED
@@ -8,7 +8,7 @@ sys.modules['ccxt'] = ccxt_module
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
11
- __version__ = '4.4.100'
11
+ __version__ = '4.5.1'
12
12
 
13
13
  # ----------------------------------------------------------------------------
14
14
 
mexc/ccxt/pro/mexc.py CHANGED
@@ -858,7 +858,6 @@ class mexc(mexcAsync):
858
858
  timestamp = self.safe_integer_n(message, ['t', 'ts', 'sendTime'])
859
859
  storedOrderBook['timestamp'] = timestamp
860
860
  storedOrderBook['datetime'] = self.iso8601(timestamp)
861
- storedOrderBook['nonce'] = self.safe_integer(data, 'fromVersion')
862
861
  except Exception as e:
863
862
  del client.subscriptions[messageHash]
864
863
  client.reject(e, messageHash)
@@ -1372,7 +1371,7 @@ class mexc(mexcAsync):
1372
1371
  }
1373
1372
  return self.safe_order({
1374
1373
  'id': self.safe_string(order, 'id'),
1375
- 'clientOrderId': self.safe_string(order, 'clientOrderId'),
1374
+ 'clientOrderId': self.safe_string(order, 'clientId'),
1376
1375
  'timestamp': timestamp,
1377
1376
  'datetime': self.iso8601(timestamp),
1378
1377
  'lastTradeTimestamp': None,
@@ -1517,14 +1516,14 @@ class mexc(mexcAsync):
1517
1516
  channel = 'spot@public.aggre.bookTicker.v3.api.pb@100ms@' + market['id']
1518
1517
  url = self.urls['api']['ws']['spot']
1519
1518
  params['unsubscribed'] = True
1520
- await self.watch_spot_public(channel, messageHash, params)
1519
+ self.watch_spot_public(channel, messageHash, params)
1521
1520
  else:
1522
1521
  channel = 'unsub.ticker'
1523
1522
  requestParams: dict = {
1524
1523
  'symbol': market['id'],
1525
1524
  }
1526
1525
  url = self.urls['api']['ws']['swap']
1527
- await self.watch_swap_public(channel, messageHash, requestParams, params)
1526
+ self.watch_swap_public(channel, messageHash, requestParams, params)
1528
1527
  client = self.client(url)
1529
1528
  self.handle_unsubscriptions(client, [messageHash])
1530
1529
  return None
@@ -1581,7 +1580,7 @@ class mexc(mexcAsync):
1581
1580
  request['params'] = {}
1582
1581
  messageHashes.append('unsubscribe:ticker')
1583
1582
  client = self.client(url)
1584
- await self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
1583
+ self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
1585
1584
  self.handle_unsubscriptions(client, messageHashes)
1586
1585
  return None
1587
1586
 
@@ -1615,7 +1614,7 @@ class mexc(mexcAsync):
1615
1614
  'params': topics,
1616
1615
  }
1617
1616
  client = self.client(url)
1618
- await self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
1617
+ self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes)
1619
1618
  self.handle_unsubscriptions(client, messageHashes)
1620
1619
  return None
1621
1620
 
@@ -1639,7 +1638,7 @@ class mexc(mexcAsync):
1639
1638
  url = self.urls['api']['ws']['spot']
1640
1639
  channel = 'spot@public.kline.v3.api.pb@' + market['id'] + '@' + timeframeId
1641
1640
  params['unsubscribed'] = True
1642
- await self.watch_spot_public(channel, messageHash, params)
1641
+ self.watch_spot_public(channel, messageHash, params)
1643
1642
  else:
1644
1643
  url = self.urls['api']['ws']['swap']
1645
1644
  channel = 'unsub.kline'
@@ -1647,7 +1646,7 @@ class mexc(mexcAsync):
1647
1646
  'symbol': market['id'],
1648
1647
  'interval': timeframeId,
1649
1648
  }
1650
- await self.watch_swap_public(channel, messageHash, requestParams, params)
1649
+ self.watch_swap_public(channel, messageHash, requestParams, params)
1651
1650
  client = self.client(url)
1652
1651
  self.handle_unsubscriptions(client, [messageHash])
1653
1652
  return None
@@ -1671,14 +1670,14 @@ class mexc(mexcAsync):
1671
1670
  frequency, params = self.handle_option_and_params(params, 'watchOrderBook', 'frequency', '100ms')
1672
1671
  channel = 'spot@public.aggre.depth.v3.api.pb@' + frequency + '@' + market['id']
1673
1672
  params['unsubscribed'] = True
1674
- await self.watch_spot_public(channel, messageHash, params)
1673
+ self.watch_spot_public(channel, messageHash, params)
1675
1674
  else:
1676
1675
  url = self.urls['api']['ws']['swap']
1677
1676
  channel = 'unsub.depth'
1678
1677
  requestParams: dict = {
1679
1678
  'symbol': market['id'],
1680
1679
  }
1681
- await self.watch_swap_public(channel, messageHash, requestParams, params)
1680
+ self.watch_swap_public(channel, messageHash, requestParams, params)
1682
1681
  client = self.client(url)
1683
1682
  self.handle_unsubscriptions(client, [messageHash])
1684
1683
  return None
@@ -1700,14 +1699,14 @@ class mexc(mexcAsync):
1700
1699
  url = self.urls['api']['ws']['spot']
1701
1700
  channel = 'spot@public.aggre.deals.v3.api.pb@100ms@' + market['id']
1702
1701
  params['unsubscribed'] = True
1703
- await self.watch_spot_public(channel, messageHash, params)
1702
+ self.watch_spot_public(channel, messageHash, params)
1704
1703
  else:
1705
1704
  url = self.urls['api']['ws']['swap']
1706
1705
  channel = 'unsub.deal'
1707
1706
  requestParams: dict = {
1708
1707
  'symbol': market['id'],
1709
1708
  }
1710
- await self.watch_swap_public(channel, messageHash, requestParams, params)
1709
+ self.watch_swap_public(channel, messageHash, requestParams, params)
1711
1710
  client = self.client(url)
1712
1711
  self.handle_unsubscriptions(client, [messageHash])
1713
1712
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mexc-exchange-api
3
- Version: 0.0.82
3
+ Version: 0.0.84
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
@@ -1,11 +1,11 @@
1
1
  mexc/__init__.py,sha256=bFV_Nfz_k-lfB_ImsHGpFnJuVMUXLBRbttugnPV7c4A,222
2
- mexc/ccxt/__init__.py,sha256=7HQIWs_6NvVjCI63dIuuDS4s_mlIuCas7qRr7Sy-JoU,6128
3
- mexc/ccxt/mexc.py,sha256=BJBbqsU2QZweqSW8U-kP88Bew9qMPQ6f9YoKSiBU8F0,259606
2
+ mexc/ccxt/__init__.py,sha256=_LC-mWh3Q2ta_-dC9QlqcvdgL_Mct-EkzbgDLPsSNg4,6126
3
+ mexc/ccxt/mexc.py,sha256=fpvMyG4DsY62UpK_m4R_yML9ydx0uJAKy4EtNrpyvBk,259668
4
4
  mexc/ccxt/abstract/mexc.py,sha256=oyg0sZFYs1d77F-_9QAatqMSQJ8h-1u1wWb-d1DX2zQ,26434
5
- mexc/ccxt/async_support/__init__.py,sha256=6nHHKVnMKaA3ZsME0wNk4HytHsZqfUigF1UJVqH3Ar0,4861
6
- mexc/ccxt/async_support/mexc.py,sha256=1tXAsxLrbmOHscJpMeu4ZU70V_S5kbL_46vd62cgmhU,260870
5
+ mexc/ccxt/async_support/__init__.py,sha256=X4ySc8PGjm6ZI83kUbHAcimW0W5-dLCeMvZTbhvvE80,4859
6
+ mexc/ccxt/async_support/mexc.py,sha256=NONCKdVPd2VM65J4kk26iEbkMdKwt-k8TAHQa4tLY84,260932
7
7
  mexc/ccxt/async_support/base/__init__.py,sha256=aVYSsFi--b4InRs9zDN_wtCpj8odosAB726JdUHavrk,67
8
- mexc/ccxt/async_support/base/exchange.py,sha256=WdBdPIULdRg1xxi4Vj7sMuECybSEysxFe2GZMjn1VnE,121270
8
+ mexc/ccxt/async_support/base/exchange.py,sha256=F8astaio1v_0MuDn3pjKByPR6NdwB1lSvDE71auAnA8,121268
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
@@ -16,12 +16,12 @@ mexc/ccxt/async_support/base/ws/order_book.py,sha256=uBUaIHhzMRykpmo4BCsdJ-t_Hoz
16
16
  mexc/ccxt/async_support/base/ws/order_book_side.py,sha256=GhnGUt78pJ-AYL_Dq9produGjmBJLCI5FHIRdMz1O-g,6551
17
17
  mexc/ccxt/base/__init__.py,sha256=eTx1OE3HJjspFUQjGm6LBhaQiMKJnXjkdP-JUXknyQ0,1320
18
18
  mexc/ccxt/base/decimal_to_precision.py,sha256=3XI30u9YudHbTA438397u5rkdlXa3atxwZEfUus3C4k,6803
19
- mexc/ccxt/base/errors.py,sha256=LdTTHPmxpeFHJze93mGl7I3maqTgN0y_1mJ6coWkXmA,4734
20
- mexc/ccxt/base/exchange.py,sha256=FCbVCDcddJTuVcvOg6-fFNxY1hA4WfHERonT0N36bT0,334126
19
+ mexc/ccxt/base/errors.py,sha256=OGhWNvNtRlJOzFx-n1x3ZjTnaPpfWH0Vc0xACS-MeDw,5012
20
+ mexc/ccxt/base/exchange.py,sha256=uA5L1S85RqI7H9tDUkHTeqUBX_HzGD3tMl4Y7r4y_eU,334337
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=bLfUjGyHc2e230OdgohQRPWmXFoeqDlQnaAXAHixSnM,4175
24
- mexc/ccxt/pro/mexc.py,sha256=EP9MENT3ASq3BYT35CVSlH5580j2i43wW_s82cYjp5Y,77084
23
+ mexc/ccxt/pro/__init__.py,sha256=5j9L_BPnQHwdFNT9EY69LZPbIbibM3rNu2lLkf68paQ,4173
24
+ mexc/ccxt/pro/mexc.py,sha256=LW5R_K9MZMS14_dBh2svy4KDzbRhiDAFOcb-ZPLIQeQ,76941
25
25
  mexc/ccxt/static_dependencies/README.md,sha256=3TCvhhn09_Cqf9BDDpao1V7EfKHDpQ6k9oWRsLFixpU,18
26
26
  mexc/ccxt/static_dependencies/__init__.py,sha256=tzFje8cloqmiIE6kola3EaYC0SnD1izWnri69hzHsSw,168
27
27
  mexc/ccxt/static_dependencies/ecdsa/__init__.py,sha256=Xaj0G79BLtBt2YZcOOMV8qOlQZ7fIJznNiHhiEEZfQA,594
@@ -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.82.dist-info/METADATA,sha256=GcQAz4AlkdXkjGCNI6IvWZNzbDmuAxIluJN0xc1oa2g,18072
285
- mexc_exchange_api-0.0.82.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
- mexc_exchange_api-0.0.82.dist-info/RECORD,,
284
+ mexc_exchange_api-0.0.84.dist-info/METADATA,sha256=r4CkLmlNzTO__zTNU86yyJeaFBKm9LPdqgPENyh17V4,18072
285
+ mexc_exchange_api-0.0.84.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
286
+ mexc_exchange_api-0.0.84.dist-info/RECORD,,