ccxt 4.3.30__py2.py3-none-any.whl → 4.3.32__py2.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.
Files changed (260) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +2 -0
  3. ccxt/abstract/binancecoinm.py +2 -0
  4. ccxt/abstract/binanceus.py +2 -0
  5. ccxt/abstract/binanceusdm.py +2 -0
  6. ccxt/ace.py +14 -14
  7. ccxt/alpaca.py +16 -16
  8. ccxt/ascendex.py +46 -46
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +14 -14
  11. ccxt/async_support/alpaca.py +16 -16
  12. ccxt/async_support/ascendex.py +46 -46
  13. ccxt/async_support/base/exchange.py +23 -23
  14. ccxt/async_support/bigone.py +32 -32
  15. ccxt/async_support/binance.py +105 -96
  16. ccxt/async_support/bingx.py +21 -21
  17. ccxt/async_support/bit2c.py +13 -13
  18. ccxt/async_support/bitbank.py +19 -19
  19. ccxt/async_support/bitbns.py +17 -17
  20. ccxt/async_support/bitfinex.py +24 -24
  21. ccxt/async_support/bitfinex2.py +142 -109
  22. ccxt/async_support/bitflyer.py +23 -23
  23. ccxt/async_support/bitget.py +76 -76
  24. ccxt/async_support/bithumb.py +20 -20
  25. ccxt/async_support/bitmart.py +55 -55
  26. ccxt/async_support/bitmex.py +41 -41
  27. ccxt/async_support/bitopro.py +30 -30
  28. ccxt/async_support/bitrue.py +37 -37
  29. ccxt/async_support/bitso.py +30 -30
  30. ccxt/async_support/bitstamp.py +31 -31
  31. ccxt/async_support/bitteam.py +26 -26
  32. ccxt/async_support/bitvavo.py +27 -27
  33. ccxt/async_support/bl3p.py +8 -8
  34. ccxt/async_support/blockchaincom.py +24 -24
  35. ccxt/async_support/blofin.py +37 -37
  36. ccxt/async_support/btcalpha.py +19 -19
  37. ccxt/async_support/btcbox.py +11 -11
  38. ccxt/async_support/btcmarkets.py +22 -22
  39. ccxt/async_support/btcturk.py +13 -13
  40. ccxt/async_support/bybit.py +96 -96
  41. ccxt/async_support/cex.py +21 -21
  42. ccxt/async_support/coinbase.py +53 -53
  43. ccxt/async_support/coinbaseexchange.py +29 -29
  44. ccxt/async_support/coinbaseinternational.py +32 -32
  45. ccxt/async_support/coincheck.py +14 -14
  46. ccxt/async_support/coinex.py +208 -175
  47. ccxt/async_support/coinlist.py +35 -35
  48. ccxt/async_support/coinmate.py +22 -22
  49. ccxt/async_support/coinmetro.py +22 -22
  50. ccxt/async_support/coinone.py +18 -18
  51. ccxt/async_support/coinsph.py +32 -32
  52. ccxt/async_support/coinspot.py +8 -8
  53. ccxt/async_support/cryptocom.py +43 -43
  54. ccxt/async_support/currencycom.py +33 -33
  55. ccxt/async_support/delta.py +35 -35
  56. ccxt/async_support/deribit.py +54 -54
  57. ccxt/async_support/digifinex.py +56 -56
  58. ccxt/async_support/exmo.py +34 -34
  59. ccxt/async_support/gate.py +60 -60
  60. ccxt/async_support/gemini.py +24 -24
  61. ccxt/async_support/hitbtc.py +51 -51
  62. ccxt/async_support/hollaex.py +29 -29
  63. ccxt/async_support/htx.py +73 -73
  64. ccxt/async_support/huobijp.py +30 -30
  65. ccxt/async_support/hyperliquid.py +58 -58
  66. ccxt/async_support/idex.py +33 -33
  67. ccxt/async_support/independentreserve.py +12 -12
  68. ccxt/async_support/indodax.py +21 -21
  69. ccxt/async_support/kraken.py +46 -51
  70. ccxt/async_support/krakenfutures.py +29 -29
  71. ccxt/async_support/kucoin.py +51 -51
  72. ccxt/async_support/kucoinfutures.py +33 -33
  73. ccxt/async_support/kuna.py +27 -27
  74. ccxt/async_support/latoken.py +27 -27
  75. ccxt/async_support/lbank.py +35 -35
  76. ccxt/async_support/luno.py +19 -19
  77. ccxt/async_support/lykke.py +20 -20
  78. ccxt/async_support/mercado.py +17 -17
  79. ccxt/async_support/mexc.py +64 -64
  80. ccxt/async_support/ndax.py +38 -38
  81. ccxt/async_support/novadax.py +26 -26
  82. ccxt/async_support/oceanex.py +21 -21
  83. ccxt/async_support/okcoin.py +35 -35
  84. ccxt/async_support/okx.py +85 -85
  85. ccxt/async_support/onetrading.py +32 -32
  86. ccxt/async_support/p2b.py +14 -14
  87. ccxt/async_support/paymium.py +12 -12
  88. ccxt/async_support/phemex.py +50 -50
  89. ccxt/async_support/poloniex.py +35 -35
  90. ccxt/async_support/poloniexfutures.py +25 -21
  91. ccxt/async_support/probit.py +30 -30
  92. ccxt/async_support/timex.py +22 -22
  93. ccxt/async_support/tokocrypto.py +26 -26
  94. ccxt/async_support/tradeogre.py +12 -12
  95. ccxt/async_support/upbit.py +28 -28
  96. ccxt/async_support/wavesexchange.py +33 -33
  97. ccxt/async_support/wazirx.py +21 -21
  98. ccxt/async_support/whitebit.py +37 -37
  99. ccxt/async_support/woo.py +51 -51
  100. ccxt/async_support/woofipro.py +46 -46
  101. ccxt/async_support/yobit.py +20 -20
  102. ccxt/async_support/zaif.py +12 -12
  103. ccxt/async_support/zonda.py +22 -22
  104. ccxt/base/exchange.py +48 -36
  105. ccxt/base/types.py +13 -0
  106. ccxt/bigone.py +32 -32
  107. ccxt/binance.py +105 -96
  108. ccxt/bingx.py +21 -21
  109. ccxt/bit2c.py +13 -13
  110. ccxt/bitbank.py +19 -19
  111. ccxt/bitbns.py +17 -17
  112. ccxt/bitfinex.py +24 -24
  113. ccxt/bitfinex2.py +142 -109
  114. ccxt/bitflyer.py +23 -23
  115. ccxt/bitget.py +76 -76
  116. ccxt/bithumb.py +20 -20
  117. ccxt/bitmart.py +55 -55
  118. ccxt/bitmex.py +41 -41
  119. ccxt/bitopro.py +30 -30
  120. ccxt/bitrue.py +37 -37
  121. ccxt/bitso.py +30 -30
  122. ccxt/bitstamp.py +31 -31
  123. ccxt/bitteam.py +26 -26
  124. ccxt/bitvavo.py +27 -27
  125. ccxt/bl3p.py +8 -8
  126. ccxt/blockchaincom.py +24 -24
  127. ccxt/blofin.py +37 -37
  128. ccxt/btcalpha.py +19 -19
  129. ccxt/btcbox.py +11 -11
  130. ccxt/btcmarkets.py +22 -22
  131. ccxt/btcturk.py +13 -13
  132. ccxt/bybit.py +96 -96
  133. ccxt/cex.py +21 -21
  134. ccxt/coinbase.py +53 -53
  135. ccxt/coinbaseexchange.py +29 -29
  136. ccxt/coinbaseinternational.py +32 -32
  137. ccxt/coincheck.py +14 -14
  138. ccxt/coinex.py +208 -175
  139. ccxt/coinlist.py +35 -35
  140. ccxt/coinmate.py +22 -22
  141. ccxt/coinmetro.py +22 -22
  142. ccxt/coinone.py +18 -18
  143. ccxt/coinsph.py +32 -32
  144. ccxt/coinspot.py +8 -8
  145. ccxt/cryptocom.py +43 -43
  146. ccxt/currencycom.py +33 -33
  147. ccxt/delta.py +35 -35
  148. ccxt/deribit.py +54 -54
  149. ccxt/digifinex.py +56 -56
  150. ccxt/exmo.py +34 -34
  151. ccxt/gate.py +60 -60
  152. ccxt/gemini.py +24 -24
  153. ccxt/hitbtc.py +51 -51
  154. ccxt/hollaex.py +29 -29
  155. ccxt/htx.py +73 -73
  156. ccxt/huobijp.py +30 -30
  157. ccxt/hyperliquid.py +58 -58
  158. ccxt/idex.py +33 -33
  159. ccxt/independentreserve.py +12 -12
  160. ccxt/indodax.py +21 -21
  161. ccxt/kraken.py +46 -51
  162. ccxt/krakenfutures.py +29 -29
  163. ccxt/kucoin.py +51 -51
  164. ccxt/kucoinfutures.py +33 -33
  165. ccxt/kuna.py +27 -27
  166. ccxt/latoken.py +27 -27
  167. ccxt/lbank.py +35 -35
  168. ccxt/luno.py +19 -19
  169. ccxt/lykke.py +20 -20
  170. ccxt/mercado.py +17 -17
  171. ccxt/mexc.py +64 -64
  172. ccxt/ndax.py +38 -38
  173. ccxt/novadax.py +26 -26
  174. ccxt/oceanex.py +21 -21
  175. ccxt/okcoin.py +35 -35
  176. ccxt/okx.py +85 -85
  177. ccxt/onetrading.py +32 -32
  178. ccxt/p2b.py +14 -14
  179. ccxt/paymium.py +12 -12
  180. ccxt/phemex.py +50 -50
  181. ccxt/poloniex.py +35 -35
  182. ccxt/poloniexfutures.py +25 -21
  183. ccxt/pro/__init__.py +1 -1
  184. ccxt/pro/alpaca.py +8 -8
  185. ccxt/pro/ascendex.py +4 -4
  186. ccxt/pro/binance.py +56 -56
  187. ccxt/pro/bingx.py +5 -5
  188. ccxt/pro/bitfinex.py +6 -6
  189. ccxt/pro/bitfinex2.py +10 -10
  190. ccxt/pro/bitget.py +17 -17
  191. ccxt/pro/bithumb.py +6 -6
  192. ccxt/pro/bitmart.py +8 -8
  193. ccxt/pro/bitmex.py +16 -16
  194. ccxt/pro/bitopro.py +4 -4
  195. ccxt/pro/bitrue.py +8 -8
  196. ccxt/pro/bitstamp.py +5 -5
  197. ccxt/pro/bitvavo.py +14 -14
  198. ccxt/pro/blockchaincom.py +7 -7
  199. ccxt/pro/bybit.py +12 -12
  200. ccxt/pro/cex.py +20 -20
  201. ccxt/pro/coinbase.py +32 -2
  202. ccxt/pro/coinbaseexchange.py +10 -10
  203. ccxt/pro/coinbaseinternational.py +4 -4
  204. ccxt/pro/coincheck.py +2 -2
  205. ccxt/pro/coinex.py +15 -15
  206. ccxt/pro/coinone.py +4 -4
  207. ccxt/pro/cryptocom.py +11 -11
  208. ccxt/pro/currencycom.py +4 -4
  209. ccxt/pro/deribit.py +9 -9
  210. ccxt/pro/exmo.py +9 -9
  211. ccxt/pro/gate.py +12 -12
  212. ccxt/pro/gemini.py +11 -11
  213. ccxt/pro/hitbtc.py +13 -13
  214. ccxt/pro/hollaex.py +6 -6
  215. ccxt/pro/htx.py +15 -15
  216. ccxt/pro/huobijp.py +16 -16
  217. ccxt/pro/hyperliquid.py +9 -9
  218. ccxt/pro/idex.py +12 -12
  219. ccxt/pro/independentreserve.py +2 -2
  220. ccxt/pro/kraken.py +14 -14
  221. ccxt/pro/krakenfutures.py +12 -12
  222. ccxt/pro/kucoin.py +12 -12
  223. ccxt/pro/kucoinfutures.py +16 -16
  224. ccxt/pro/lbank.py +12 -12
  225. ccxt/pro/luno.py +4 -4
  226. ccxt/pro/mexc.py +14 -14
  227. ccxt/pro/ndax.py +12 -12
  228. ccxt/pro/okcoin.py +6 -6
  229. ccxt/pro/okx.py +30 -30
  230. ccxt/pro/onetrading.py +13 -13
  231. ccxt/pro/p2b.py +2 -2
  232. ccxt/pro/phemex.py +9 -9
  233. ccxt/pro/poloniex.py +9 -9
  234. ccxt/pro/poloniexfutures.py +10 -10
  235. ccxt/pro/probit.py +8 -8
  236. ccxt/pro/upbit.py +1 -1
  237. ccxt/pro/wazirx.py +10 -10
  238. ccxt/pro/whitebit.py +8 -8
  239. ccxt/pro/woo.py +14 -14
  240. ccxt/pro/woofipro.py +14 -14
  241. ccxt/probit.py +30 -30
  242. ccxt/test/base/test_shared_methods.py +1 -0
  243. ccxt/test/test_async.py +1 -1
  244. ccxt/test/test_sync.py +1 -1
  245. ccxt/timex.py +22 -22
  246. ccxt/tokocrypto.py +26 -26
  247. ccxt/tradeogre.py +12 -12
  248. ccxt/upbit.py +28 -28
  249. ccxt/wavesexchange.py +33 -33
  250. ccxt/wazirx.py +21 -21
  251. ccxt/whitebit.py +37 -37
  252. ccxt/woo.py +51 -51
  253. ccxt/woofipro.py +46 -46
  254. ccxt/yobit.py +20 -20
  255. ccxt/zaif.py +12 -12
  256. ccxt/zonda.py +22 -22
  257. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/METADATA +4 -4
  258. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/RECORD +260 -260
  259. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/WHEEL +0 -0
  260. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/top_level.txt +0 -0
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.mexc import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Account, Balances, Currencies, Currency, IndexType, Int, Leverage, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry, TransferEntries
9
+ from ccxt.base.types import Account, Balances, Currencies, Currency, IndexType, Int, Leverage, LeverageTier, LeverageTiers, MarginModification, Market, Num, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, TransferEntry, TransferEntries
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import AuthenticationError
@@ -1053,7 +1053,7 @@ class mexc(Exchange, ImplicitAPI):
1053
1053
  # ]
1054
1054
  # }
1055
1055
  #
1056
- result = {}
1056
+ result: dict = {}
1057
1057
  for i in range(0, len(response)):
1058
1058
  currency = response[i]
1059
1059
  id = self.safe_string(currency, 'coin')
@@ -1065,7 +1065,7 @@ class mexc(Exchange, ImplicitAPI):
1065
1065
  currencyWithdrawMax = None
1066
1066
  depositEnabled = False
1067
1067
  withdrawEnabled = False
1068
- networks = {}
1068
+ networks: dict = {}
1069
1069
  chains = self.safe_value(currency, 'networkList', [])
1070
1070
  for j in range(0, len(chains)):
1071
1071
  chain = chains[j]
@@ -1383,7 +1383,7 @@ class mexc(Exchange, ImplicitAPI):
1383
1383
  """
1384
1384
  await self.load_markets()
1385
1385
  market = self.market(symbol)
1386
- request = {
1386
+ request: dict = {
1387
1387
  'symbol': market['id'],
1388
1388
  }
1389
1389
  if limit is not None:
@@ -1457,7 +1457,7 @@ class mexc(Exchange, ImplicitAPI):
1457
1457
  """
1458
1458
  await self.load_markets()
1459
1459
  market = self.market(symbol)
1460
- request = {
1460
+ request: dict = {
1461
1461
  'symbol': market['id'],
1462
1462
  }
1463
1463
  if limit is not None:
@@ -1535,7 +1535,7 @@ class mexc(Exchange, ImplicitAPI):
1535
1535
  trades = self.safe_value(response, 'data')
1536
1536
  return self.parse_trades(trades, market, since, limit)
1537
1537
 
1538
- def parse_trade(self, trade, market: Market = None) -> Trade:
1538
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1539
1539
  id = None
1540
1540
  timestamp = None
1541
1541
  orderId = None
@@ -1715,7 +1715,7 @@ class mexc(Exchange, ImplicitAPI):
1715
1715
  timeframes = self.safe_value(options, market['type'], {})
1716
1716
  timeframeValue = self.safe_string(timeframes, timeframe)
1717
1717
  duration = self.parse_timeframe(timeframe) * 1000
1718
- request = {
1718
+ request: dict = {
1719
1719
  'symbol': market['id'],
1720
1720
  'interval': timeframeValue,
1721
1721
  }
@@ -1805,7 +1805,7 @@ class mexc(Exchange, ImplicitAPI):
1805
1805
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
1806
1806
  """
1807
1807
  await self.load_markets()
1808
- request = {}
1808
+ request: dict = {}
1809
1809
  market = None
1810
1810
  isSingularMarket = False
1811
1811
  if symbols is not None:
@@ -1889,7 +1889,7 @@ class mexc(Exchange, ImplicitAPI):
1889
1889
  market = self.market(symbol)
1890
1890
  marketType, query = self.handle_market_type_and_params('fetchTicker', market, params)
1891
1891
  ticker = None
1892
- request = {
1892
+ request: dict = {
1893
1893
  'symbol': market['id'],
1894
1894
  }
1895
1895
  if marketType == 'spot':
@@ -2147,7 +2147,7 @@ class mexc(Exchange, ImplicitAPI):
2147
2147
  def create_spot_order_request(self, market, type, side, amount, price=None, marginMode=None, params={}):
2148
2148
  symbol = market['symbol']
2149
2149
  orderSide = side.upper()
2150
- request = {
2150
+ request: dict = {
2151
2151
  'symbol': market['id'],
2152
2152
  'side': orderSide,
2153
2153
  'type': type.upper(),
@@ -2242,7 +2242,7 @@ class mexc(Exchange, ImplicitAPI):
2242
2242
  type = 1
2243
2243
  elif type == 'market':
2244
2244
  type = 6
2245
- request = {
2245
+ request: dict = {
2246
2246
  'symbol': market['id'],
2247
2247
  # 'price': float(self.price_to_precision(symbol, price)),
2248
2248
  'vol': float(self.amount_to_precision(symbol, amount)),
@@ -2302,7 +2302,7 @@ class mexc(Exchange, ImplicitAPI):
2302
2302
  # {"success":true,"code":0,"data":259208506303929856}
2303
2303
  #
2304
2304
  data = self.safe_string(response, 'data')
2305
- return self.parse_order(data, market)
2305
+ return self.safe_order({'id': data}, market)
2306
2306
 
2307
2307
  async def create_orders(self, orders: List[OrderRequest], params={}):
2308
2308
  """
@@ -2335,7 +2335,7 @@ class mexc(Exchange, ImplicitAPI):
2335
2335
  marginMode, params = self.handle_margin_mode_and_params('createOrder', params)
2336
2336
  orderRequest = self.create_spot_order_request(market, type, side, amount, price, marginMode, orderParams)
2337
2337
  ordersRequests.append(orderRequest)
2338
- request = {
2338
+ request: dict = {
2339
2339
  'batchOrders': self.json(ordersRequests),
2340
2340
  }
2341
2341
  response = await self.spotPrivatePostBatchOrders(request)
@@ -2373,7 +2373,7 @@ class mexc(Exchange, ImplicitAPI):
2373
2373
  raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
2374
2374
  await self.load_markets()
2375
2375
  market = self.market(symbol)
2376
- request = {
2376
+ request: dict = {
2377
2377
  'symbol': market['id'],
2378
2378
  }
2379
2379
  data = None
@@ -2484,7 +2484,7 @@ class mexc(Exchange, ImplicitAPI):
2484
2484
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
2485
2485
  """
2486
2486
  await self.load_markets()
2487
- request = {}
2487
+ request: dict = {}
2488
2488
  market = None
2489
2489
  if symbol is not None:
2490
2490
  market = self.market(symbol)
@@ -2638,7 +2638,7 @@ class mexc(Exchange, ImplicitAPI):
2638
2638
 
2639
2639
  async def fetch_orders_by_ids(self, ids, symbol: Str = None, params={}):
2640
2640
  await self.load_markets()
2641
- request = {}
2641
+ request: dict = {}
2642
2642
  market = None
2643
2643
  if symbol is not None:
2644
2644
  market = self.market(symbol)
@@ -2697,7 +2697,7 @@ class mexc(Exchange, ImplicitAPI):
2697
2697
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
2698
2698
  """
2699
2699
  await self.load_markets()
2700
- request = {}
2700
+ request: dict = {}
2701
2701
  market = None
2702
2702
  marketType = None
2703
2703
  if symbol is not None:
@@ -2792,7 +2792,7 @@ class mexc(Exchange, ImplicitAPI):
2792
2792
 
2793
2793
  async def fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2794
2794
  await self.load_markets()
2795
- request = {}
2795
+ request: dict = {}
2796
2796
  market = None
2797
2797
  if symbol is not None:
2798
2798
  market = self.market(symbol)
@@ -2813,7 +2813,7 @@ class mexc(Exchange, ImplicitAPI):
2813
2813
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
2814
2814
  """
2815
2815
  await self.load_markets()
2816
- request = {}
2816
+ request: dict = {}
2817
2817
  market = None
2818
2818
  if symbol is not None:
2819
2819
  market = self.market(symbol)
@@ -2825,7 +2825,7 @@ class mexc(Exchange, ImplicitAPI):
2825
2825
  if marketType == 'spot':
2826
2826
  if symbol is None:
2827
2827
  raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
2828
- requestInner = {
2828
+ requestInner: dict = {
2829
2829
  'symbol': market['id'],
2830
2830
  }
2831
2831
  clientOrderId = self.safe_string(params, 'clientOrderId')
@@ -2946,7 +2946,7 @@ class mexc(Exchange, ImplicitAPI):
2946
2946
  """
2947
2947
  await self.load_markets()
2948
2948
  market = self.market(symbol) if (symbol is not None) else None
2949
- request = {}
2949
+ request: dict = {}
2950
2950
  marketType = None
2951
2951
  marketType, params = self.handle_market_type_and_params('cancelAllOrders', market, params)
2952
2952
  marginMode, query = self.handle_margin_mode_and_params('cancelAllOrders', params)
@@ -3019,7 +3019,7 @@ class mexc(Exchange, ImplicitAPI):
3019
3019
  data = self.safe_list(response, 'data', [])
3020
3020
  return self.parse_orders(data, market)
3021
3021
 
3022
- def parse_order(self, order, market: Market = None) -> Order:
3022
+ def parse_order(self, order: dict, market: Market = None) -> Order:
3023
3023
  #
3024
3024
  # spot: createOrder
3025
3025
  #
@@ -3227,7 +3227,7 @@ class mexc(Exchange, ImplicitAPI):
3227
3227
  }, market)
3228
3228
 
3229
3229
  def parse_order_side(self, status):
3230
- statuses = {
3230
+ statuses: dict = {
3231
3231
  'BUY': 'buy',
3232
3232
  'SELL': 'sell',
3233
3233
  '1': 'buy',
@@ -3237,15 +3237,15 @@ class mexc(Exchange, ImplicitAPI):
3237
3237
  return self.safe_string(statuses, status, status)
3238
3238
 
3239
3239
  def parse_order_type(self, status):
3240
- statuses = {
3240
+ statuses: dict = {
3241
3241
  'MARKET': 'market',
3242
3242
  'LIMIT': 'limit',
3243
3243
  'LIMIT_MAKER': 'limit',
3244
3244
  }
3245
3245
  return self.safe_string(statuses, status, status)
3246
3246
 
3247
- def parse_order_status(self, status):
3248
- statuses = {
3247
+ def parse_order_status(self, status: Str):
3248
+ statuses: dict = {
3249
3249
  'NEW': 'open',
3250
3250
  'FILLED': 'closed',
3251
3251
  'CANCELED': 'canceled',
@@ -3261,7 +3261,7 @@ class mexc(Exchange, ImplicitAPI):
3261
3261
  return self.safe_string(statuses, status, status)
3262
3262
 
3263
3263
  def parse_order_time_in_force(self, status):
3264
- statuses = {
3264
+ statuses: dict = {
3265
3265
  'GTC': 'GTC',
3266
3266
  'FOK': 'FOK',
3267
3267
  'IOC': 'IOC',
@@ -3358,7 +3358,7 @@ class mexc(Exchange, ImplicitAPI):
3358
3358
  takerFee = self.safe_string(response, 'takerCommission')
3359
3359
  makerFee = Precise.string_div(makerFee, '1000')
3360
3360
  takerFee = Precise.string_div(takerFee, '1000')
3361
- result = {}
3361
+ result: dict = {}
3362
3362
  for i in range(0, len(self.symbols)):
3363
3363
  symbol = self.symbols[i]
3364
3364
  result[symbol] = {
@@ -3449,7 +3449,7 @@ class mexc(Exchange, ImplicitAPI):
3449
3449
  quote = self.safe_value(entry, 'quoteAsset', {})
3450
3450
  baseCode = self.safe_currency_code(self.safe_string(base, 'asset'))
3451
3451
  quoteCode = self.safe_currency_code(self.safe_string(quote, 'asset'))
3452
- subResult = {}
3452
+ subResult: dict = {}
3453
3453
  subResult[baseCode] = self.parse_balance_helper(base)
3454
3454
  subResult[quoteCode] = self.parse_balance_helper(quote)
3455
3455
  result[symbol] = self.safe_balance(subResult)
@@ -3497,7 +3497,7 @@ class mexc(Exchange, ImplicitAPI):
3497
3497
  """
3498
3498
  await self.load_markets()
3499
3499
  marketType = None
3500
- request = {}
3500
+ request: dict = {}
3501
3501
  marketType, params = self.handle_market_type_and_params('fetchBalance', None, params)
3502
3502
  marginMode = self.safe_string(params, 'marginMode')
3503
3503
  isMargin = self.safe_bool(params, 'margin', False)
@@ -3624,7 +3624,7 @@ class mexc(Exchange, ImplicitAPI):
3624
3624
  await self.load_markets()
3625
3625
  market = self.market(symbol)
3626
3626
  marketType, query = self.handle_market_type_and_params('fetchMyTrades', market, params)
3627
- request = {
3627
+ request: dict = {
3628
3628
  'symbol': market['id'],
3629
3629
  }
3630
3630
  trades = None
@@ -3701,7 +3701,7 @@ class mexc(Exchange, ImplicitAPI):
3701
3701
  :returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
3702
3702
  """
3703
3703
  await self.load_markets()
3704
- request = {}
3704
+ request: dict = {}
3705
3705
  market = None
3706
3706
  if symbol is not None:
3707
3707
  market = self.market(symbol)
@@ -3768,7 +3768,7 @@ class mexc(Exchange, ImplicitAPI):
3768
3768
  if positionId is None:
3769
3769
  raise ArgumentsRequired(self.id + ' modifyMarginHelper() requires a positionId parameter')
3770
3770
  await self.load_markets()
3771
- request = {
3771
+ request: dict = {
3772
3772
  'positionId': positionId,
3773
3773
  'amount': amount,
3774
3774
  'type': addOrReduce,
@@ -3810,7 +3810,7 @@ class mexc(Exchange, ImplicitAPI):
3810
3810
  :returns dict: response from the exchange
3811
3811
  """
3812
3812
  await self.load_markets()
3813
- request = {
3813
+ request: dict = {
3814
3814
  'leverage': leverage,
3815
3815
  }
3816
3816
  positionId = self.safe_integer(params, 'positionId')
@@ -3839,7 +3839,7 @@ class mexc(Exchange, ImplicitAPI):
3839
3839
  """
3840
3840
  await self.load_markets()
3841
3841
  market = None
3842
- request = {
3842
+ request: dict = {
3843
3843
  # 'symbol': market['id'],
3844
3844
  # 'position_id': positionId,
3845
3845
  # 'page_num': 1,
@@ -3947,7 +3947,7 @@ class mexc(Exchange, ImplicitAPI):
3947
3947
  """
3948
3948
  await self.load_markets()
3949
3949
  market = self.market(symbol)
3950
- request = {
3950
+ request: dict = {
3951
3951
  'symbol': market['id'],
3952
3952
  }
3953
3953
  response = await self.contractPublicGetFundingRateSymbol(self.extend(request, params))
@@ -3982,7 +3982,7 @@ class mexc(Exchange, ImplicitAPI):
3982
3982
  raise ArgumentsRequired(self.id + ' fetchFundingRateHistory() requires a symbol argument')
3983
3983
  await self.load_markets()
3984
3984
  market = self.market(symbol)
3985
- request = {
3985
+ request: dict = {
3986
3986
  'symbol': market['id'],
3987
3987
  # 'page_size': limit, # optional
3988
3988
  # 'page_num': 1, # optional, current page number, default is 1
@@ -4032,7 +4032,7 @@ class mexc(Exchange, ImplicitAPI):
4032
4032
  sorted = self.sort_by(rates, 'timestamp')
4033
4033
  return self.filter_by_symbol_since_limit(sorted, market['symbol'], since, limit)
4034
4034
 
4035
- async def fetch_leverage_tiers(self, symbols: Strings = None, params={}):
4035
+ async def fetch_leverage_tiers(self, symbols: Strings = None, params={}) -> LeverageTiers:
4036
4036
  """
4037
4037
  retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes, if a market has a leverage tier of 0, then the leverage tiers cannot be obtained for self market
4038
4038
  :see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
@@ -4091,7 +4091,7 @@ class mexc(Exchange, ImplicitAPI):
4091
4091
  data = self.safe_list(response, 'data')
4092
4092
  return self.parse_leverage_tiers(data, symbols, 'symbol')
4093
4093
 
4094
- def parse_market_leverage_tiers(self, info, market: Market = None):
4094
+ def parse_market_leverage_tiers(self, info, market: Market = None) -> List[LeverageTier]:
4095
4095
  #
4096
4096
  # {
4097
4097
  # "symbol": "BTC_USDT",
@@ -4144,8 +4144,8 @@ class mexc(Exchange, ImplicitAPI):
4144
4144
  {
4145
4145
  'tier': 0,
4146
4146
  'currency': self.safe_currency_code(quoteId),
4147
- 'notionalFloor': None,
4148
- 'notionalCap': None,
4147
+ 'minNotional': None,
4148
+ 'maxNotional': None,
4149
4149
  'maintenanceMarginRate': None,
4150
4150
  'maxLeverage': self.safe_number(info, 'maxLeverage'),
4151
4151
  'info': info,
@@ -4156,8 +4156,8 @@ class mexc(Exchange, ImplicitAPI):
4156
4156
  tiers.append({
4157
4157
  'tier': self.parse_number(Precise.string_div(cap, riskIncrVol)),
4158
4158
  'currency': self.safe_currency_code(quoteId),
4159
- 'notionalFloor': self.parse_number(floor),
4160
- 'notionalCap': self.parse_number(cap),
4159
+ 'minNotional': self.parse_number(floor),
4160
+ 'maxNotional': self.parse_number(cap),
4161
4161
  'maintenanceMarginRate': self.parse_number(maintenanceMarginRate),
4162
4162
  'maxLeverage': self.parse_number(Precise.string_div('1', initialMarginRate)),
4163
4163
  'info': info,
@@ -4198,7 +4198,7 @@ class mexc(Exchange, ImplicitAPI):
4198
4198
  """
4199
4199
  await self.load_markets()
4200
4200
  currency = self.currency(code)
4201
- request = {
4201
+ request: dict = {
4202
4202
  'coin': currency['id'],
4203
4203
  }
4204
4204
  networkCode = self.safe_string(params, 'network')
@@ -4234,7 +4234,7 @@ class mexc(Exchange, ImplicitAPI):
4234
4234
  """
4235
4235
  await self.load_markets()
4236
4236
  currency = self.currency(code)
4237
- request = {
4237
+ request: dict = {
4238
4238
  'coin': currency['id'],
4239
4239
  }
4240
4240
  networkCode = self.safe_string(params, 'network')
@@ -4292,7 +4292,7 @@ class mexc(Exchange, ImplicitAPI):
4292
4292
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
4293
4293
  """
4294
4294
  await self.load_markets()
4295
- request = {
4295
+ request: dict = {
4296
4296
  # 'coin': currency['id'] + network example: USDT-TRX,
4297
4297
  # 'status': 'status',
4298
4298
  # 'startTime': since, # default 90 days
@@ -4345,7 +4345,7 @@ class mexc(Exchange, ImplicitAPI):
4345
4345
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
4346
4346
  """
4347
4347
  await self.load_markets()
4348
- request = {
4348
+ request: dict = {
4349
4349
  # 'coin': currency['id'],
4350
4350
  # 'status': 'status',
4351
4351
  # 'startTime': since, # default 90 days
@@ -4384,7 +4384,7 @@ class mexc(Exchange, ImplicitAPI):
4384
4384
  #
4385
4385
  return self.parse_transactions(response, currency, since, limit)
4386
4386
 
4387
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
4387
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
4388
4388
  #
4389
4389
  # fetchDeposits
4390
4390
  #
@@ -4475,7 +4475,7 @@ class mexc(Exchange, ImplicitAPI):
4475
4475
  }
4476
4476
 
4477
4477
  def parse_transaction_status_by_type(self, status, type=None):
4478
- statusesByType = {
4478
+ statusesByType: dict = {
4479
4479
  'deposit': {
4480
4480
  '1': 'failed', # SMALL
4481
4481
  '2': 'pending', # TIME_DELAY
@@ -4510,7 +4510,7 @@ class mexc(Exchange, ImplicitAPI):
4510
4510
  """
4511
4511
  await self.load_markets()
4512
4512
  market = self.market(symbol)
4513
- request = {
4513
+ request: dict = {
4514
4514
  'symbol': market['id'],
4515
4515
  }
4516
4516
  response = await self.fetch_positions(None, self.extend(request, params))
@@ -4558,7 +4558,7 @@ class mexc(Exchange, ImplicitAPI):
4558
4558
  data = self.safe_list(response, 'data', [])
4559
4559
  return self.parse_positions(data, symbols)
4560
4560
 
4561
- def parse_position(self, position, market: Market = None):
4561
+ def parse_position(self, position: dict, market: Market = None):
4562
4562
  #
4563
4563
  # fetchPositions
4564
4564
  #
@@ -4665,7 +4665,7 @@ class mexc(Exchange, ImplicitAPI):
4665
4665
  marketType, query = self.handle_market_type_and_params('fetchTransfer', None, params)
4666
4666
  await self.load_markets()
4667
4667
  if marketType == 'spot':
4668
- request = {
4668
+ request: dict = {
4669
4669
  'transact_id': id,
4670
4670
  }
4671
4671
  response = await self.spot2PrivateGetAssetInternalTransferInfo(self.extend(request, query))
@@ -4699,7 +4699,7 @@ class mexc(Exchange, ImplicitAPI):
4699
4699
  """
4700
4700
  marketType, query = self.handle_market_type_and_params('fetchTransfers', None, params)
4701
4701
  await self.load_markets()
4702
- request = {}
4702
+ request: dict = {}
4703
4703
  currency = None
4704
4704
  resultList = None
4705
4705
  if code is not None:
@@ -4780,7 +4780,7 @@ class mexc(Exchange, ImplicitAPI):
4780
4780
  """
4781
4781
  await self.load_markets()
4782
4782
  currency = self.currency(code)
4783
- accounts = {
4783
+ accounts: dict = {
4784
4784
  'spot': 'SPOT',
4785
4785
  'swap': 'FUTURES',
4786
4786
  'margin': 'ISOLATED_MARGIN',
@@ -4793,7 +4793,7 @@ class mexc(Exchange, ImplicitAPI):
4793
4793
  if toId is None:
4794
4794
  keys = list(accounts.keys())
4795
4795
  raise ExchangeError(self.id + ' toAccount must be one of ' + ', '.join(keys))
4796
- request = {
4796
+ request: dict = {
4797
4797
  'asset': currency['id'],
4798
4798
  'amount': amount,
4799
4799
  'fromAccountType': fromId,
@@ -4877,14 +4877,14 @@ class mexc(Exchange, ImplicitAPI):
4877
4877
  }
4878
4878
 
4879
4879
  def parse_account_id(self, status):
4880
- statuses = {
4880
+ statuses: dict = {
4881
4881
  'MAIN': 'spot',
4882
4882
  'CONTRACT': 'swap',
4883
4883
  }
4884
4884
  return self.safe_string(statuses, status, status)
4885
4885
 
4886
4886
  def parse_transfer_status(self, status: Str) -> Str:
4887
- statuses = {
4887
+ statuses: dict = {
4888
4888
  'SUCCESS': 'ok',
4889
4889
  'FAILED': 'failed',
4890
4890
  'WAIT': 'pending',
@@ -4909,7 +4909,7 @@ class mexc(Exchange, ImplicitAPI):
4909
4909
  self.check_address(address)
4910
4910
  await self.load_markets()
4911
4911
  currency = self.currency(code)
4912
- request = {
4912
+ request: dict = {
4913
4913
  'coin': currency['id'],
4914
4914
  'address': address,
4915
4915
  'amount': amount,
@@ -4928,7 +4928,7 @@ class mexc(Exchange, ImplicitAPI):
4928
4928
  return self.parse_transaction(response, currency)
4929
4929
 
4930
4930
  async def set_position_mode(self, hedged: bool, symbol: Str = None, params={}):
4931
- request = {
4931
+ request: dict = {
4932
4932
  'positionMode': 1 if hedged else 2, # 1 Hedge, 2 One-way, before changing position mode make sure that there are no active orders, planned orders, or open positions, the risk limit level will be reset to 1
4933
4933
  }
4934
4934
  response = await self.contractPrivatePostPositionChangePositionMode(self.extend(request, params))
@@ -4955,7 +4955,7 @@ class mexc(Exchange, ImplicitAPI):
4955
4955
  'hedged': (positionMode == 1),
4956
4956
  }
4957
4957
 
4958
- async def fetch_transaction_fees(self, codes: List[str] = None, params={}):
4958
+ async def fetch_transaction_fees(self, codes: Strings = None, params={}):
4959
4959
  """
4960
4960
  fetch deposit and withdrawal fees
4961
4961
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#query-the-currency-information
@@ -4997,7 +4997,7 @@ class mexc(Exchange, ImplicitAPI):
4997
4997
  return self.parse_transaction_fees(response, codes)
4998
4998
 
4999
4999
  def parse_transaction_fees(self, response, codes=None):
5000
- withdrawFees = {}
5000
+ withdrawFees: dict = {}
5001
5001
  for i in range(0, len(response)):
5002
5002
  entry = response[i]
5003
5003
  currencyId = self.safe_string(entry, 'coin')
@@ -5039,7 +5039,7 @@ class mexc(Exchange, ImplicitAPI):
5039
5039
  # }
5040
5040
  #
5041
5041
  networkList = self.safe_value(transaction, 'networkList', [])
5042
- result = {}
5042
+ result: dict = {}
5043
5043
  for j in range(0, len(networkList)):
5044
5044
  networkEntry = networkList[j]
5045
5045
  networkId = self.safe_string(networkEntry, 'network')
@@ -5144,7 +5144,7 @@ class mexc(Exchange, ImplicitAPI):
5144
5144
  """
5145
5145
  await self.load_markets()
5146
5146
  market = self.market(symbol)
5147
- request = {
5147
+ request: dict = {
5148
5148
  'symbol': market['id'],
5149
5149
  }
5150
5150
  response = await self.contractPrivateGetPositionLeverage(self.extend(request, params))
@@ -5233,7 +5233,7 @@ class mexc(Exchange, ImplicitAPI):
5233
5233
  :returns dict[]: a list of `position structures <https://docs.ccxt.com/#/?id=position-structure>`
5234
5234
  """
5235
5235
  await self.load_markets()
5236
- request = {}
5236
+ request: dict = {}
5237
5237
  if symbols is not None:
5238
5238
  symbolsLength = len(symbols)
5239
5239
  if symbolsLength == 1: