ccxt 4.1.54__py2.py3-none-any.whl → 4.1.56__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (251) hide show
  1. ccxt/__init__.py +2 -2
  2. ccxt/abstract/binance.py +1 -0
  3. ccxt/abstract/binancecoinm.py +1 -0
  4. ccxt/abstract/binanceus.py +1 -0
  5. ccxt/abstract/binanceusdm.py +1 -0
  6. ccxt/abstract/bitbank.py +1 -0
  7. ccxt/abstract/coinbase.py +2 -0
  8. ccxt/abstract/htx.py +3 -0
  9. ccxt/abstract/huobi.py +3 -0
  10. ccxt/abstract/huobipro.py +3 -0
  11. ccxt/abstract/okex.py +3 -1
  12. ccxt/abstract/okex5.py +3 -1
  13. ccxt/abstract/okx.py +3 -1
  14. ccxt/ace.py +23 -23
  15. ccxt/alpaca.py +8 -8
  16. ccxt/ascendex.py +26 -26
  17. ccxt/async_support/__init__.py +2 -2
  18. ccxt/async_support/ace.py +23 -23
  19. ccxt/async_support/alpaca.py +8 -8
  20. ccxt/async_support/ascendex.py +26 -26
  21. ccxt/async_support/base/exchange.py +4 -2216
  22. ccxt/async_support/bigone.py +21 -24
  23. ccxt/async_support/binance.py +61 -54
  24. ccxt/async_support/bingx.py +28 -28
  25. ccxt/async_support/bit2c.py +9 -9
  26. ccxt/async_support/bitbank.py +11 -10
  27. ccxt/async_support/bitbns.py +11 -11
  28. ccxt/async_support/bitfinex.py +15 -15
  29. ccxt/async_support/bitfinex2.py +22 -22
  30. ccxt/async_support/bitflyer.py +13 -13
  31. ccxt/async_support/bitforex.py +10 -10
  32. ccxt/async_support/bitget.py +44 -44
  33. ccxt/async_support/bithumb.py +9 -9
  34. ccxt/async_support/bitmart.py +85 -104
  35. ccxt/async_support/bitmex.py +27 -27
  36. ccxt/async_support/bitopro.py +18 -18
  37. ccxt/async_support/bitpanda.py +18 -18
  38. ccxt/async_support/bitrue.py +14 -14
  39. ccxt/async_support/bitso.py +17 -17
  40. ccxt/async_support/bitstamp.py +17 -17
  41. ccxt/async_support/bittrex.py +22 -24
  42. ccxt/async_support/bitvavo.py +15 -15
  43. ccxt/async_support/bl3p.py +4 -4
  44. ccxt/async_support/blockchaincom.py +17 -17
  45. ccxt/async_support/btcalpha.py +14 -14
  46. ccxt/async_support/btcbox.py +9 -9
  47. ccxt/async_support/btcmarkets.py +17 -17
  48. ccxt/async_support/btcturk.py +9 -9
  49. ccxt/async_support/bybit.py +46 -46
  50. ccxt/async_support/cex.py +10 -10
  51. ccxt/async_support/coinbase.py +69 -25
  52. ccxt/async_support/coinbasepro.py +19 -19
  53. ccxt/async_support/coincheck.py +10 -10
  54. ccxt/async_support/coinex.py +57 -66
  55. ccxt/async_support/coinlist.py +22 -22
  56. ccxt/async_support/coinmate.py +10 -10
  57. ccxt/async_support/coinone.py +10 -10
  58. ccxt/async_support/coinsph.py +17 -17
  59. ccxt/async_support/coinspot.py +5 -5
  60. ccxt/async_support/cryptocom.py +27 -27
  61. ccxt/async_support/currencycom.py +18 -18
  62. ccxt/async_support/delta.py +21 -21
  63. ccxt/async_support/deribit.py +24 -24
  64. ccxt/async_support/digifinex.py +35 -35
  65. ccxt/async_support/exmo.py +19 -19
  66. ccxt/async_support/gate.py +38 -38
  67. ccxt/async_support/gemini.py +11 -11
  68. ccxt/async_support/hitbtc.py +27 -27
  69. ccxt/async_support/hollaex.py +19 -19
  70. ccxt/async_support/htx.py +47 -44
  71. ccxt/async_support/huobijp.py +22 -22
  72. ccxt/async_support/idex.py +20 -20
  73. ccxt/async_support/independentreserve.py +9 -9
  74. ccxt/async_support/indodax.py +10 -10
  75. ccxt/async_support/kraken.py +25 -25
  76. ccxt/async_support/krakenfutures.py +17 -17
  77. ccxt/async_support/kucoin.py +27 -27
  78. ccxt/async_support/kucoinfutures.py +20 -20
  79. ccxt/async_support/kuna.py +19 -19
  80. ccxt/async_support/latoken.py +14 -14
  81. ccxt/async_support/lbank.py +18 -18
  82. ccxt/async_support/luno.py +14 -14
  83. ccxt/async_support/lykke.py +12 -12
  84. ccxt/async_support/mercado.py +11 -11
  85. ccxt/async_support/mexc.py +36 -36
  86. ccxt/async_support/ndax.py +18 -18
  87. ccxt/async_support/novadax.py +17 -17
  88. ccxt/async_support/oceanex.py +12 -12
  89. ccxt/async_support/okcoin.py +19 -19
  90. ccxt/async_support/okx.py +48 -45
  91. ccxt/async_support/p2b.py +6 -6
  92. ccxt/async_support/paymium.py +6 -6
  93. ccxt/async_support/phemex.py +57 -57
  94. ccxt/async_support/poloniex.py +31 -30
  95. ccxt/async_support/poloniexfutures.py +16 -16
  96. ccxt/async_support/probit.py +22 -22
  97. ccxt/async_support/tidex.py +15 -15
  98. ccxt/async_support/timex.py +20 -20
  99. ccxt/async_support/tokocrypto.py +16 -16
  100. ccxt/async_support/upbit.py +15 -15
  101. ccxt/async_support/wavesexchange.py +12 -12
  102. ccxt/async_support/wazirx.py +13 -13
  103. ccxt/async_support/whitebit.py +26 -26
  104. ccxt/async_support/woo.py +47 -47
  105. ccxt/async_support/yobit.py +8 -8
  106. ccxt/async_support/zaif.py +10 -10
  107. ccxt/async_support/zonda.py +16 -16
  108. ccxt/base/errors.py +17 -16
  109. ccxt/base/exchange.py +57 -97
  110. ccxt/base/types.py +138 -139
  111. ccxt/bigone.py +21 -24
  112. ccxt/binance.py +61 -54
  113. ccxt/bingx.py +28 -28
  114. ccxt/bit2c.py +9 -9
  115. ccxt/bitbank.py +11 -10
  116. ccxt/bitbns.py +11 -11
  117. ccxt/bitfinex.py +15 -15
  118. ccxt/bitfinex2.py +22 -22
  119. ccxt/bitflyer.py +13 -13
  120. ccxt/bitforex.py +10 -10
  121. ccxt/bitget.py +44 -44
  122. ccxt/bithumb.py +9 -9
  123. ccxt/bitmart.py +85 -104
  124. ccxt/bitmex.py +27 -27
  125. ccxt/bitopro.py +18 -18
  126. ccxt/bitpanda.py +18 -18
  127. ccxt/bitrue.py +14 -14
  128. ccxt/bitso.py +17 -17
  129. ccxt/bitstamp.py +17 -17
  130. ccxt/bittrex.py +22 -24
  131. ccxt/bitvavo.py +15 -15
  132. ccxt/bl3p.py +4 -4
  133. ccxt/blockchaincom.py +17 -17
  134. ccxt/btcalpha.py +14 -14
  135. ccxt/btcbox.py +9 -9
  136. ccxt/btcmarkets.py +17 -17
  137. ccxt/btcturk.py +9 -9
  138. ccxt/bybit.py +46 -46
  139. ccxt/cex.py +10 -10
  140. ccxt/coinbase.py +69 -25
  141. ccxt/coinbasepro.py +19 -19
  142. ccxt/coincheck.py +10 -10
  143. ccxt/coinex.py +57 -66
  144. ccxt/coinlist.py +22 -22
  145. ccxt/coinmate.py +10 -10
  146. ccxt/coinone.py +10 -10
  147. ccxt/coinsph.py +17 -17
  148. ccxt/coinspot.py +5 -5
  149. ccxt/cryptocom.py +27 -27
  150. ccxt/currencycom.py +18 -18
  151. ccxt/delta.py +21 -21
  152. ccxt/deribit.py +24 -24
  153. ccxt/digifinex.py +35 -35
  154. ccxt/exmo.py +19 -19
  155. ccxt/gate.py +38 -38
  156. ccxt/gemini.py +11 -11
  157. ccxt/hitbtc.py +27 -27
  158. ccxt/hollaex.py +19 -19
  159. ccxt/htx.py +47 -44
  160. ccxt/huobijp.py +22 -22
  161. ccxt/idex.py +20 -20
  162. ccxt/independentreserve.py +9 -9
  163. ccxt/indodax.py +10 -10
  164. ccxt/kraken.py +25 -25
  165. ccxt/krakenfutures.py +17 -17
  166. ccxt/kucoin.py +27 -27
  167. ccxt/kucoinfutures.py +20 -20
  168. ccxt/kuna.py +19 -19
  169. ccxt/latoken.py +14 -14
  170. ccxt/lbank.py +18 -18
  171. ccxt/luno.py +14 -14
  172. ccxt/lykke.py +12 -12
  173. ccxt/mercado.py +11 -11
  174. ccxt/mexc.py +36 -36
  175. ccxt/ndax.py +18 -18
  176. ccxt/novadax.py +17 -17
  177. ccxt/oceanex.py +12 -12
  178. ccxt/okcoin.py +19 -19
  179. ccxt/okx.py +48 -45
  180. ccxt/p2b.py +6 -6
  181. ccxt/paymium.py +6 -6
  182. ccxt/phemex.py +57 -57
  183. ccxt/poloniex.py +31 -30
  184. ccxt/poloniexfutures.py +16 -16
  185. ccxt/pro/__init__.py +1 -1
  186. ccxt/pro/alpaca.py +3 -3
  187. ccxt/pro/ascendex.py +2 -2
  188. ccxt/pro/binance.py +9 -9
  189. ccxt/pro/bingx.py +3 -3
  190. ccxt/pro/bitfinex.py +3 -3
  191. ccxt/pro/bitfinex2.py +3 -3
  192. ccxt/pro/bitget.py +3 -3
  193. ccxt/pro/bitmart.py +2 -2
  194. ccxt/pro/bitmex.py +3 -3
  195. ccxt/pro/bitpanda.py +3 -3
  196. ccxt/pro/bitrue.py +2 -2
  197. ccxt/pro/bitstamp.py +2 -2
  198. ccxt/pro/bittrex.py +3 -3
  199. ccxt/pro/bitvavo.py +3 -3
  200. ccxt/pro/blockchaincom.py +2 -2
  201. ccxt/pro/bybit.py +4 -4
  202. ccxt/pro/cex.py +3 -3
  203. ccxt/pro/coinbasepro.py +3 -3
  204. ccxt/pro/coinex.py +2 -2
  205. ccxt/pro/cryptocom.py +5 -5
  206. ccxt/pro/deribit.py +3 -3
  207. ccxt/pro/exmo.py +2 -2
  208. ccxt/pro/gate.py +3 -3
  209. ccxt/pro/gemini.py +2 -2
  210. ccxt/pro/hitbtc.py +4 -4
  211. ccxt/pro/hollaex.py +3 -3
  212. ccxt/pro/htx.py +3 -3
  213. ccxt/pro/idex.py +3 -3
  214. ccxt/pro/kraken.py +7 -7
  215. ccxt/pro/krakenfutures.py +4 -4
  216. ccxt/pro/kucoin.py +3 -3
  217. ccxt/pro/kucoinfutures.py +3 -3
  218. ccxt/pro/mexc.py +3 -3
  219. ccxt/pro/okcoin.py +2 -2
  220. ccxt/pro/okx.py +6 -6
  221. ccxt/pro/phemex.py +3 -3
  222. ccxt/pro/poloniex.py +3 -3
  223. ccxt/pro/poloniexfutures.py +3 -3
  224. ccxt/pro/probit.py +3 -3
  225. ccxt/pro/wazirx.py +3 -3
  226. ccxt/pro/whitebit.py +3 -3
  227. ccxt/pro/woo.py +2 -2
  228. ccxt/probit.py +22 -22
  229. ccxt/test/base/test_shared_methods.py +3 -3
  230. ccxt/test/test_async.py +543 -535
  231. ccxt/test/test_sync.py +542 -534
  232. ccxt/tidex.py +15 -15
  233. ccxt/timex.py +20 -20
  234. ccxt/tokocrypto.py +16 -16
  235. ccxt/upbit.py +15 -15
  236. ccxt/wavesexchange.py +12 -12
  237. ccxt/wazirx.py +13 -13
  238. ccxt/whitebit.py +26 -26
  239. ccxt/woo.py +47 -47
  240. ccxt/yobit.py +8 -8
  241. ccxt/zaif.py +10 -10
  242. ccxt/zonda.py +16 -16
  243. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/METADATA +10 -8
  244. ccxt-4.1.56.dist-info/RECORD +449 -0
  245. ccxt/async_support/bitstamp1.py +0 -402
  246. ccxt/async_support/lbank2.py +0 -2620
  247. ccxt/bitstamp1.py +0 -402
  248. ccxt/lbank2.py +0 -2619
  249. ccxt-4.1.54.dist-info/RECORD +0 -453
  250. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/WHEEL +0 -0
  251. {ccxt-4.1.54.dist-info → ccxt-4.1.56.dist-info}/top_level.txt +0 -0
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.luno import ImplicitAPI
8
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade
8
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import ArgumentsRequired
@@ -342,7 +342,7 @@ class luno(Exchange, ImplicitAPI):
342
342
  }
343
343
  return self.safe_string(statuses, status, status)
344
344
 
345
- def parse_order(self, order, market=None) -> Order:
345
+ def parse_order(self, order, market: Market = None) -> Order:
346
346
  #
347
347
  # {
348
348
  # "base": "string",
@@ -414,7 +414,7 @@ class luno(Exchange, ImplicitAPI):
414
414
  'average': None,
415
415
  }, market)
416
416
 
417
- async def fetch_order(self, id: str, symbol: String = None, params={}):
417
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
418
418
  """
419
419
  fetches information on an order made by the user
420
420
  :param str symbol: not used by luno fetchOrder
@@ -428,7 +428,7 @@ class luno(Exchange, ImplicitAPI):
428
428
  response = await self.privateGetOrdersId(self.extend(request, params))
429
429
  return self.parse_order(response)
430
430
 
431
- async def fetch_orders_by_state(self, state=None, symbol: String = None, since: Int = None, limit: Int = None, params={}):
431
+ async def fetch_orders_by_state(self, state=None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
432
432
  await self.load_markets()
433
433
  request = {}
434
434
  market = None
@@ -441,7 +441,7 @@ class luno(Exchange, ImplicitAPI):
441
441
  orders = self.safe_value(response, 'orders', [])
442
442
  return self.parse_orders(orders, market, since, limit)
443
443
 
444
- async def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
444
+ async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
445
445
  """
446
446
  fetches information on multiple orders made by the user
447
447
  :param str symbol: unified market symbol of the market orders were made in
@@ -452,7 +452,7 @@ class luno(Exchange, ImplicitAPI):
452
452
  """
453
453
  return await self.fetch_orders_by_state(None, symbol, since, limit, params)
454
454
 
455
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
455
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
456
456
  """
457
457
  fetch all unfilled currently open orders
458
458
  :param str symbol: unified market symbol
@@ -463,7 +463,7 @@ class luno(Exchange, ImplicitAPI):
463
463
  """
464
464
  return await self.fetch_orders_by_state('PENDING', symbol, since, limit, params)
465
465
 
466
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
466
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
467
467
  """
468
468
  fetches information on multiple closed orders made by the user
469
469
  :param str symbol: unified market symbol of the market orders were made in
@@ -474,7 +474,7 @@ class luno(Exchange, ImplicitAPI):
474
474
  """
475
475
  return await self.fetch_orders_by_state('COMPLETE', symbol, since, limit, params)
476
476
 
477
- def parse_ticker(self, ticker, market=None) -> Ticker:
477
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
478
478
  # {
479
479
  # "pair":"XBTAUD",
480
480
  # "timestamp":1642201439301,
@@ -556,7 +556,7 @@ class luno(Exchange, ImplicitAPI):
556
556
  # }
557
557
  return self.parse_ticker(response, market)
558
558
 
559
- def parse_trade(self, trade, market=None) -> Trade:
559
+ def parse_trade(self, trade, market: Market = None) -> Trade:
560
560
  #
561
561
  # fetchTrades(public)
562
562
  #
@@ -673,7 +673,7 @@ class luno(Exchange, ImplicitAPI):
673
673
  trades = self.safe_value(response, 'trades', [])
674
674
  return self.parse_trades(trades, market, since, limit)
675
675
 
676
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
676
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
677
677
  """
678
678
  fetch all trades made by the user
679
679
  :param str symbol: unified market symbol
@@ -780,7 +780,7 @@ class luno(Exchange, ImplicitAPI):
780
780
  'id': response['order_id'],
781
781
  }, market)
782
782
 
783
- async def cancel_order(self, id: str, symbol: String = None, params={}):
783
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
784
784
  """
785
785
  cancels an open order
786
786
  :param str id: order id
@@ -794,7 +794,7 @@ class luno(Exchange, ImplicitAPI):
794
794
  }
795
795
  return await self.privatePostStoporder(self.extend(request, params))
796
796
 
797
- async def fetch_ledger_by_entries(self, code: String = None, entry=None, limit=None, params={}):
797
+ async def fetch_ledger_by_entries(self, code: Str = None, entry=None, limit=None, params={}):
798
798
  # by default without entry number or limit number, return most recent entry
799
799
  if entry is None:
800
800
  entry = -1
@@ -807,7 +807,7 @@ class luno(Exchange, ImplicitAPI):
807
807
  }
808
808
  return await self.fetch_ledger(code, since, limit, self.extend(request, params))
809
809
 
810
- async def fetch_ledger(self, code: String = None, since: Int = None, limit: Int = None, params={}):
810
+ async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
811
811
  """
812
812
  fetch the history of changes, actions done by the user or operations that altered balance of the user
813
813
  :param str code: unified currency code, default is None
@@ -881,7 +881,7 @@ class luno(Exchange, ImplicitAPI):
881
881
  'referenceId': referenceId,
882
882
  }
883
883
 
884
- def parse_ledger_entry(self, entry, currency=None):
884
+ def parse_ledger_entry(self, entry, currency: Currency = None):
885
885
  # details = self.safe_value(entry, 'details', {})
886
886
  id = self.safe_string(entry, 'row_index')
887
887
  account_id = self.safe_string(entry, 'account_id')
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.lykke import ImplicitAPI
8
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
8
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
9
9
  from typing import List
10
10
  from ccxt.base.errors import ExchangeError
11
11
  from ccxt.base.errors import BadRequest
@@ -348,7 +348,7 @@ class lykke(Exchange, ImplicitAPI):
348
348
  })
349
349
  return result
350
350
 
351
- def parse_ticker(self, ticker, market=None) -> Ticker:
351
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
352
352
  #
353
353
  # fetchTickers
354
354
  #
@@ -540,7 +540,7 @@ class lykke(Exchange, ImplicitAPI):
540
540
  timestamp = self.safe_integer(orderbook, 'timestamp')
541
541
  return self.parse_order_book(orderbook, market['symbol'], timestamp, 'bids', 'asks', 'p', 'v')
542
542
 
543
- def parse_trade(self, trade, market=None) -> Trade:
543
+ def parse_trade(self, trade, market: Market = None) -> Trade:
544
544
  #
545
545
  # public fetchTrades
546
546
  #
@@ -694,7 +694,7 @@ class lykke(Exchange, ImplicitAPI):
694
694
  }
695
695
  return self.safe_string(statuses, status, status)
696
696
 
697
- def parse_order(self, order, market=None) -> Order:
697
+ def parse_order(self, order, market: Market = None) -> Order:
698
698
  #
699
699
  # {
700
700
  # "id":"1b367978-7e4f-454b-b870-64040d484443",
@@ -816,7 +816,7 @@ class lykke(Exchange, ImplicitAPI):
816
816
  'trades': None,
817
817
  }, market)
818
818
 
819
- async def cancel_order(self, id: str, symbol: String = None, params={}):
819
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
820
820
  """
821
821
  cancels an open order
822
822
  :param str id: order id
@@ -835,7 +835,7 @@ class lykke(Exchange, ImplicitAPI):
835
835
  #
836
836
  return await self.privateDeleteOrdersOrderId(self.extend(request, params))
837
837
 
838
- async def cancel_all_orders(self, symbol: String = None, params={}):
838
+ async def cancel_all_orders(self, symbol: Str = None, params={}):
839
839
  """
840
840
  cancel all open orders
841
841
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
@@ -858,7 +858,7 @@ class lykke(Exchange, ImplicitAPI):
858
858
  #
859
859
  return await self.privateDeleteOrders(self.extend(request, params))
860
860
 
861
- async def fetch_order(self, id: str, symbol: String = None, params={}):
861
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
862
862
  """
863
863
  fetches information on an order made by the user
864
864
  :param str symbol: not used by lykke fetchOrder
@@ -892,7 +892,7 @@ class lykke(Exchange, ImplicitAPI):
892
892
  #
893
893
  return self.parse_order(payload)
894
894
 
895
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
895
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
896
896
  """
897
897
  fetch all unfilled currently open orders
898
898
  :param str symbol: unified market symbol
@@ -936,7 +936,7 @@ class lykke(Exchange, ImplicitAPI):
936
936
  #
937
937
  return self.parse_orders(payload, market, since, limit)
938
938
 
939
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
939
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
940
940
  """
941
941
  fetches information on multiple closed orders made by the user
942
942
  :param str symbol: unified market symbol of the market orders were made in
@@ -980,7 +980,7 @@ class lykke(Exchange, ImplicitAPI):
980
980
  #
981
981
  return self.parse_orders(payload, market, since, limit)
982
982
 
983
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
983
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
984
984
  """
985
985
  fetch all trades made by the user
986
986
  :param str symbol: unified market symbol
@@ -1068,7 +1068,7 @@ class lykke(Exchange, ImplicitAPI):
1068
1068
  'info': response,
1069
1069
  }
1070
1070
 
1071
- def parse_transaction(self, transaction, currency=None) -> Transaction:
1071
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
1072
1072
  #
1073
1073
  # withdraw
1074
1074
  # "3035b1ad-2005-4587-a986-1f7966be78e0"
@@ -1127,7 +1127,7 @@ class lykke(Exchange, ImplicitAPI):
1127
1127
  'fee': fee,
1128
1128
  }
1129
1129
 
1130
- async def fetch_deposits_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1130
+ async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1131
1131
  """
1132
1132
  fetch history of deposits and withdrawals
1133
1133
  :param str [code]: unified currency code for the currency of the deposit/withdrawals, default is None
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.mercado import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType, String, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Str, Ticker, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -259,7 +259,7 @@ class mercado(Exchange, ImplicitAPI):
259
259
  response = await self.publicGetCoinOrderbook(self.extend(request, params))
260
260
  return self.parse_order_book(response, market['symbol'])
261
261
 
262
- def parse_ticker(self, ticker, market=None) -> Ticker:
262
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
263
263
  #
264
264
  # {
265
265
  # "high":"103.96000000",
@@ -328,7 +328,7 @@ class mercado(Exchange, ImplicitAPI):
328
328
  #
329
329
  return self.parse_ticker(ticker, market)
330
330
 
331
- def parse_trade(self, trade, market=None) -> Trade:
331
+ def parse_trade(self, trade, market: Market = None) -> Trade:
332
332
  timestamp = self.safe_timestamp_2(trade, 'date', 'executed_timestamp')
333
333
  market = self.safe_market(None, market)
334
334
  id = self.safe_string_2(trade, 'tid', 'operation_id')
@@ -445,7 +445,7 @@ class mercado(Exchange, ImplicitAPI):
445
445
  'id': str(response['response_data']['order']['order_id']),
446
446
  }, market)
447
447
 
448
- async def cancel_order(self, id: str, symbol: String = None, params={}):
448
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
449
449
  """
450
450
  cancels an open order
451
451
  :param str id: order id
@@ -496,7 +496,7 @@ class mercado(Exchange, ImplicitAPI):
496
496
  }
497
497
  return self.safe_string(statuses, status, status)
498
498
 
499
- def parse_order(self, order, market=None) -> Order:
499
+ def parse_order(self, order, market: Market = None) -> Order:
500
500
  #
501
501
  # {
502
502
  # "order_id": 4,
@@ -567,7 +567,7 @@ class mercado(Exchange, ImplicitAPI):
567
567
  'trades': rawTrades,
568
568
  }, market)
569
569
 
570
- async def fetch_order(self, id: str, symbol: String = None, params={}):
570
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
571
571
  """
572
572
  fetches information on an order made by the user
573
573
  :param str symbol: unified symbol of the market the order was made in
@@ -643,7 +643,7 @@ class mercado(Exchange, ImplicitAPI):
643
643
  withdrawal = self.safe_value(responseData, 'withdrawal')
644
644
  return self.parse_transaction(withdrawal, currency)
645
645
 
646
- def parse_transaction(self, transaction, currency=None) -> Transaction:
646
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
647
647
  #
648
648
  # {
649
649
  # "id": 1,
@@ -681,7 +681,7 @@ class mercado(Exchange, ImplicitAPI):
681
681
  'info': transaction,
682
682
  }
683
683
 
684
- def parse_ohlcv(self, ohlcv, market=None) -> list:
684
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
685
685
  return [
686
686
  self.safe_integer(ohlcv, 0),
687
687
  self.safe_number(ohlcv, 1),
@@ -719,7 +719,7 @@ class mercado(Exchange, ImplicitAPI):
719
719
  candles = self.convert_trading_view_to_ohlcv(response, 't', 'o', 'h', 'l', 'c', 'v')
720
720
  return self.parse_ohlcvs(candles, market, timeframe, since, limit)
721
721
 
722
- async def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
722
+ async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
723
723
  """
724
724
  fetches information on multiple orders made by the user
725
725
  :param str symbol: unified market symbol of the market orders were made in
@@ -739,7 +739,7 @@ class mercado(Exchange, ImplicitAPI):
739
739
  orders = self.safe_value(responseData, 'orders', [])
740
740
  return self.parse_orders(orders, market, since, limit)
741
741
 
742
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
742
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
743
743
  """
744
744
  fetch all unfilled currently open orders
745
745
  :param str symbol: unified market symbol
@@ -760,7 +760,7 @@ class mercado(Exchange, ImplicitAPI):
760
760
  orders = self.safe_value(responseData, 'orders', [])
761
761
  return self.parse_orders(orders, market, since, limit)
762
762
 
763
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
763
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
764
764
  """
765
765
  fetch all trades made by the user
766
766
  :param str symbol: unified market symbol
@@ -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 Balances, Int, Order, OrderBook, OrderRequest, OrderSide, OrderType, IndexType, String, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, IndexType, Str, Strings, Ticker, Tickers, Trade, Transaction
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import PermissionDenied
@@ -1422,7 +1422,7 @@ class mexc(Exchange, ImplicitAPI):
1422
1422
  trades = self.safe_value(response, 'data')
1423
1423
  return self.parse_trades(trades, market, since, limit)
1424
1424
 
1425
- def parse_trade(self, trade, market=None) -> Trade:
1425
+ def parse_trade(self, trade, market: Market = None) -> Trade:
1426
1426
  id = None
1427
1427
  timestamp = None
1428
1428
  orderId = None
@@ -1671,7 +1671,7 @@ class mexc(Exchange, ImplicitAPI):
1671
1671
  candles = self.convert_trading_view_to_ohlcv(data, 'time', 'open', 'high', 'low', 'close', 'vol')
1672
1672
  return self.parse_ohlcvs(candles, market, timeframe, since, limit)
1673
1673
 
1674
- def parse_ohlcv(self, ohlcv, market=None) -> list:
1674
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
1675
1675
  return [
1676
1676
  self.safe_integer(ohlcv, 0),
1677
1677
  self.safe_number(ohlcv, 1),
@@ -1831,7 +1831,7 @@ class mexc(Exchange, ImplicitAPI):
1831
1831
  # when it's single symbol request, the returned structure is different(singular object) for both spot & swap, thus we need to wrap inside array
1832
1832
  return self.parse_ticker(ticker, market)
1833
1833
 
1834
- def parse_ticker(self, ticker, market=None) -> Ticker:
1834
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1835
1835
  marketId = self.safe_string(ticker, 'symbol')
1836
1836
  market = self.safe_market(marketId, market)
1837
1837
  timestamp = None
@@ -2218,7 +2218,7 @@ class mexc(Exchange, ImplicitAPI):
2218
2218
  #
2219
2219
  return self.parse_orders(response)
2220
2220
 
2221
- async def fetch_order(self, id: str, symbol: String = None, params={}):
2221
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
2222
2222
  """
2223
2223
  fetches information on an order made by the user
2224
2224
  :param str symbol: unified symbol of the market the order was made in
@@ -2329,7 +2329,7 @@ class mexc(Exchange, ImplicitAPI):
2329
2329
  data = self.safe_value(response, 'data')
2330
2330
  return self.parse_order(data, market)
2331
2331
 
2332
- async def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2332
+ async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2333
2333
  """
2334
2334
  fetches information on multiple orders made by the user
2335
2335
  :param str symbol: unified market symbol of the market orders were made in
@@ -2491,7 +2491,7 @@ class mexc(Exchange, ImplicitAPI):
2491
2491
  merged = self.array_concat(ordersOfTrigger, ordersOfRegular)
2492
2492
  return self.parse_orders(merged, market, since, limit, params)
2493
2493
 
2494
- async def fetch_orders_by_ids(self, ids, symbol: String = None, params={}):
2494
+ async def fetch_orders_by_ids(self, ids, symbol: Str = None, params={}):
2495
2495
  await self.load_markets()
2496
2496
  request = {}
2497
2497
  market = None
@@ -2541,7 +2541,7 @@ class mexc(Exchange, ImplicitAPI):
2541
2541
  data = self.safe_value(response, 'data')
2542
2542
  return self.parse_orders(data, market)
2543
2543
 
2544
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2544
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2545
2545
  """
2546
2546
  fetch all unfilled currently open orders
2547
2547
  :param str symbol: unified market symbol
@@ -2622,7 +2622,7 @@ class mexc(Exchange, ImplicitAPI):
2622
2622
  # TO_DO: another possible way is through: open_orders/{symbol}, but have same ratelimits, and less granularity, i think historical orders are more convenient, supports more params(however, theoretically, open-orders endpoint might be sligthly fast)
2623
2623
  return await self.fetch_orders_by_state(2, symbol, since, limit, params)
2624
2624
 
2625
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2625
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2626
2626
  """
2627
2627
  fetches information on multiple closed orders made by the user
2628
2628
  :param str symbol: unified market symbol of the market orders were made in
@@ -2633,7 +2633,7 @@ class mexc(Exchange, ImplicitAPI):
2633
2633
  """
2634
2634
  return await self.fetch_orders_by_state(3, symbol, since, limit, params)
2635
2635
 
2636
- async def fetch_canceled_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2636
+ async def fetch_canceled_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2637
2637
  """
2638
2638
  fetches information on multiple canceled orders made by the user
2639
2639
  :param str symbol: unified market symbol of the market orders were made in
@@ -2644,7 +2644,7 @@ class mexc(Exchange, ImplicitAPI):
2644
2644
  """
2645
2645
  return await self.fetch_orders_by_state(4, symbol, since, limit, params)
2646
2646
 
2647
- async def fetch_orders_by_state(self, state, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2647
+ async def fetch_orders_by_state(self, state, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2648
2648
  await self.load_markets()
2649
2649
  request = {}
2650
2650
  market = None
@@ -2657,7 +2657,7 @@ class mexc(Exchange, ImplicitAPI):
2657
2657
  request['states'] = state
2658
2658
  return await self.fetch_orders(symbol, since, limit, self.extend(request, params))
2659
2659
 
2660
- async def cancel_order(self, id: str, symbol: String = None, params={}):
2660
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
2661
2661
  """
2662
2662
  cancels an open order
2663
2663
  :param str id: order id
@@ -2753,7 +2753,7 @@ class mexc(Exchange, ImplicitAPI):
2753
2753
  raise InvalidOrder(self.id + ' cancelOrder() the order with id ' + id + ' cannot be cancelled: ' + errorMsg)
2754
2754
  return self.parse_order(data, market)
2755
2755
 
2756
- async def cancel_orders(self, ids, symbol: String = None, params={}):
2756
+ async def cancel_orders(self, ids, symbol: Str = None, params={}):
2757
2757
  """
2758
2758
  cancel multiple orders
2759
2759
  :param str[] ids: order ids
@@ -2784,7 +2784,7 @@ class mexc(Exchange, ImplicitAPI):
2784
2784
  data = self.safe_value(response, 'data')
2785
2785
  return self.parse_orders(data, market)
2786
2786
 
2787
- async def cancel_all_orders(self, symbol: String = None, params={}):
2787
+ async def cancel_all_orders(self, symbol: Str = None, params={}):
2788
2788
  """
2789
2789
  cancel all open orders
2790
2790
  :param str symbol: unified market symbol, only orders in the market of self symbol are cancelled when symbol is not None
@@ -2862,7 +2862,7 @@ class mexc(Exchange, ImplicitAPI):
2862
2862
  data = self.safe_value(response, 'data', [])
2863
2863
  return self.parse_orders(data, market)
2864
2864
 
2865
- def parse_order(self, order, market=None) -> Order:
2865
+ def parse_order(self, order, market: Market = None) -> Order:
2866
2866
  #
2867
2867
  # spot: createOrder
2868
2868
  #
@@ -3451,7 +3451,7 @@ class mexc(Exchange, ImplicitAPI):
3451
3451
  #
3452
3452
  return self.custom_parse_balance(response, marketType)
3453
3453
 
3454
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
3454
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3455
3455
  """
3456
3456
  fetch all trades made by the user
3457
3457
  :param str symbol: unified market symbol
@@ -3530,7 +3530,7 @@ class mexc(Exchange, ImplicitAPI):
3530
3530
  trades = self.safe_value(response, 'data')
3531
3531
  return self.parse_trades(trades, market, since, limit)
3532
3532
 
3533
- async def fetch_order_trades(self, id: str, symbol: String = None, since: Int = None, limit: Int = None, params={}):
3533
+ async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3534
3534
  """
3535
3535
  fetch all the trades made from a single order
3536
3536
  :param str id: order id
@@ -3641,7 +3641,7 @@ class mexc(Exchange, ImplicitAPI):
3641
3641
  """
3642
3642
  return await self.modify_margin_helper(symbol, amount, 'ADD', params)
3643
3643
 
3644
- async def set_leverage(self, leverage, symbol: String = None, params={}):
3644
+ async def set_leverage(self, leverage, symbol: Str = None, params={}):
3645
3645
  """
3646
3646
  set the level of leverage for a market
3647
3647
  :param float leverage: the rate of leverage
@@ -3668,7 +3668,7 @@ class mexc(Exchange, ImplicitAPI):
3668
3668
  request['positionId'] = positionId
3669
3669
  return await self.contractPrivatePostPositionChangeLeverage(self.extend(request, params))
3670
3670
 
3671
- async def fetch_funding_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
3671
+ async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3672
3672
  """
3673
3673
  fetch the history of funding payments paid and received on self account
3674
3674
  :param str symbol: unified market symbol
@@ -3740,7 +3740,7 @@ class mexc(Exchange, ImplicitAPI):
3740
3740
  })
3741
3741
  return result
3742
3742
 
3743
- def parse_funding_rate(self, contract, market=None):
3743
+ def parse_funding_rate(self, contract, market: Market = None):
3744
3744
  #
3745
3745
  # {
3746
3746
  # "symbol": "BTC_USDT",
@@ -3809,7 +3809,7 @@ class mexc(Exchange, ImplicitAPI):
3809
3809
  result = self.safe_value(response, 'data', {})
3810
3810
  return self.parse_funding_rate(result, market)
3811
3811
 
3812
- async def fetch_funding_rate_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
3812
+ async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3813
3813
  """
3814
3814
  fetches historical funding rate prices
3815
3815
  :param str symbol: unified symbol of the market to fetch the funding rate history for
@@ -3929,7 +3929,7 @@ class mexc(Exchange, ImplicitAPI):
3929
3929
  data = self.safe_value(response, 'data')
3930
3930
  return self.parse_leverage_tiers(data, symbols, 'symbol')
3931
3931
 
3932
- def parse_market_leverage_tiers(self, info, market=None):
3932
+ def parse_market_leverage_tiers(self, info, market: Market = None):
3933
3933
  """
3934
3934
  @param info {object} Exchange response for 1 market
3935
3935
  @param market {object} CCXT market
@@ -3959,7 +3959,7 @@ class mexc(Exchange, ImplicitAPI):
3959
3959
  floor = cap
3960
3960
  return tiers
3961
3961
 
3962
- def parse_deposit_address(self, depositAddress, currency=None):
3962
+ def parse_deposit_address(self, depositAddress, currency: Currency = None):
3963
3963
  #
3964
3964
  # {"chain":"ERC-20","address":"0x55cbd73db24eafcca97369e3f2db74b2490586e6"},
3965
3965
  # {"chain":"MATIC","address":"0x05aa3236f1970eae0f8feb17ec19435b39574d74"},
@@ -4075,7 +4075,7 @@ class mexc(Exchange, ImplicitAPI):
4075
4075
  raise InvalidAddress(self.id + ' fetchDepositAddress() cannot find a deposit address for ' + code + ', consider creating one using the MEXC platform')
4076
4076
  return result
4077
4077
 
4078
- async def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
4078
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
4079
4079
  """
4080
4080
  fetch all deposits made to an account
4081
4081
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#deposit-history-supporting-network
@@ -4128,7 +4128,7 @@ class mexc(Exchange, ImplicitAPI):
4128
4128
  #
4129
4129
  return self.parse_transactions(response, currency, since, limit)
4130
4130
 
4131
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
4131
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
4132
4132
  """
4133
4133
  fetch all withdrawals made from an account
4134
4134
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#withdraw-history-supporting-network
@@ -4178,7 +4178,7 @@ class mexc(Exchange, ImplicitAPI):
4178
4178
  #
4179
4179
  return self.parse_transactions(response, currency, since, limit)
4180
4180
 
4181
- def parse_transaction(self, transaction, currency=None) -> Transaction:
4181
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
4182
4182
  #
4183
4183
  # fetchDeposits
4184
4184
  #
@@ -4352,7 +4352,7 @@ class mexc(Exchange, ImplicitAPI):
4352
4352
  data = self.safe_value(response, 'data', [])
4353
4353
  return self.parse_positions(data, symbols)
4354
4354
 
4355
- def parse_position(self, position, market=None):
4355
+ def parse_position(self, position, market: Market = None):
4356
4356
  #
4357
4357
  # {
4358
4358
  # "positionId": 1394650,
@@ -4446,7 +4446,7 @@ class mexc(Exchange, ImplicitAPI):
4446
4446
  raise BadRequest(self.id + ' fetchTransfer() is not supported for ' + marketType)
4447
4447
  return None
4448
4448
 
4449
- async def fetch_transfers(self, code: String = None, since: Int = None, limit: Int = None, params={}):
4449
+ async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
4450
4450
  """
4451
4451
  fetch a history of internal transfers made on an account
4452
4452
  :param str code: unified currency code of the currency transferred
@@ -4577,7 +4577,7 @@ class mexc(Exchange, ImplicitAPI):
4577
4577
  'toAccount': toAccount,
4578
4578
  })
4579
4579
 
4580
- def parse_transfer(self, transfer, currency=None):
4580
+ def parse_transfer(self, transfer, currency: Currency = None):
4581
4581
  #
4582
4582
  # spot: fetchTransfer
4583
4583
  #
@@ -4685,7 +4685,7 @@ class mexc(Exchange, ImplicitAPI):
4685
4685
  #
4686
4686
  return self.parse_transaction(response, currency)
4687
4687
 
4688
- async def set_position_mode(self, hedged, symbol: String = None, params={}):
4688
+ async def set_position_mode(self, hedged, symbol: Str = None, params={}):
4689
4689
  request = {
4690
4690
  '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
4691
4691
  }
@@ -4698,7 +4698,7 @@ class mexc(Exchange, ImplicitAPI):
4698
4698
  #
4699
4699
  return response
4700
4700
 
4701
- async def fetch_position_mode(self, symbol: String = None, params={}):
4701
+ async def fetch_position_mode(self, symbol: Str = None, params={}):
4702
4702
  response = await self.contractPrivateGetPositionPositionMode(params)
4703
4703
  #
4704
4704
  # {
@@ -4713,7 +4713,7 @@ class mexc(Exchange, ImplicitAPI):
4713
4713
  'hedged': (positionMode == 1),
4714
4714
  }
4715
4715
 
4716
- async def borrow_margin(self, code: str, amount, symbol: String = None, params={}):
4716
+ async def borrow_margin(self, code: str, amount, symbol: Str = None, params={}):
4717
4717
  """
4718
4718
  create a loan to borrow margin
4719
4719
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#loan
@@ -4744,7 +4744,7 @@ class mexc(Exchange, ImplicitAPI):
4744
4744
  'symbol': symbol,
4745
4745
  })
4746
4746
 
4747
- async def repay_margin(self, code: str, amount, symbol: String = None, params={}):
4747
+ async def repay_margin(self, code: str, amount, symbol: Str = None, params={}):
4748
4748
  """
4749
4749
  repay borrowed margin and interest
4750
4750
  :see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#repayment
@@ -4836,7 +4836,7 @@ class mexc(Exchange, ImplicitAPI):
4836
4836
  'info': response,
4837
4837
  }
4838
4838
 
4839
- def parse_transaction_fee(self, transaction, currency=None):
4839
+ def parse_transaction_fee(self, transaction, currency: Currency = None):
4840
4840
  #
4841
4841
  # {
4842
4842
  # "coin": "AGLD",
@@ -4914,7 +4914,7 @@ class mexc(Exchange, ImplicitAPI):
4914
4914
  #
4915
4915
  return self.parse_deposit_withdraw_fees(response, codes, 'coin')
4916
4916
 
4917
- def parse_deposit_withdraw_fee(self, fee, currency=None):
4917
+ def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
4918
4918
  #
4919
4919
  # {
4920
4920
  # "coin": "AGLD",
@@ -4959,7 +4959,7 @@ class mexc(Exchange, ImplicitAPI):
4959
4959
  }
4960
4960
  return self.assign_default_deposit_withdraw_fees(result)
4961
4961
 
4962
- def parse_margin_loan(self, info, currency=None):
4962
+ def parse_margin_loan(self, info, currency: Currency = None):
4963
4963
  #
4964
4964
  # {
4965
4965
  # "tranId": "762407666453712896"