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
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.kraken import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, 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
@@ -512,7 +512,7 @@ class kraken(Exchange, ImplicitAPI):
512
512
  self.options['marketsByAltname'] = self.index_by(result, 'altname')
513
513
  return result
514
514
 
515
- def safe_currency(self, currencyId, currency=None):
515
+ def safe_currency(self, currencyId, currency: Currency = None):
516
516
  if currencyId is not None:
517
517
  if len(currencyId) > 3:
518
518
  if (currencyId.find('X') == 0) or (currencyId.find('Z') == 0):
@@ -719,7 +719,7 @@ class kraken(Exchange, ImplicitAPI):
719
719
  orderbook = self.safe_value(result, wsName, orderbook)
720
720
  return self.parse_order_book(orderbook, symbol)
721
721
 
722
- def parse_ticker(self, ticker, market=None) -> Ticker:
722
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
723
723
  #
724
724
  # {
725
725
  # "a":["2432.77000","1","1.000"],
@@ -820,7 +820,7 @@ class kraken(Exchange, ImplicitAPI):
820
820
  ticker = response['result'][market['id']]
821
821
  return self.parse_ticker(ticker, market)
822
822
 
823
- def parse_ohlcv(self, ohlcv, market=None) -> list:
823
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
824
824
  #
825
825
  # [
826
826
  # 1591475640,
@@ -898,7 +898,7 @@ class kraken(Exchange, ImplicitAPI):
898
898
  }
899
899
  return self.safe_string(types, type, type)
900
900
 
901
- def parse_ledger_entry(self, item, currency=None):
901
+ def parse_ledger_entry(self, item, currency: Currency = None):
902
902
  #
903
903
  # {
904
904
  # 'LTFK7F-N2CUX-PNY4SX': {
@@ -949,7 +949,7 @@ class kraken(Exchange, ImplicitAPI):
949
949
  },
950
950
  }
951
951
 
952
- async def fetch_ledger(self, code: String = None, since: Int = None, limit: Int = None, params={}):
952
+ async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
953
953
  """
954
954
  fetch the history of changes, actions done by the user or operations that altered balance of the user
955
955
  :see: https://docs.kraken.com/rest/#tag/Account-Data/operation/getLedgers
@@ -991,7 +991,7 @@ class kraken(Exchange, ImplicitAPI):
991
991
  items.append(value)
992
992
  return self.parse_ledger(items, currency, since, limit)
993
993
 
994
- async def fetch_ledger_entries_by_ids(self, ids, code: String = None, params={}):
994
+ async def fetch_ledger_entries_by_ids(self, ids, code: Str = None, params={}):
995
995
  # https://www.kraken.com/features/api#query-ledgers
996
996
  await self.load_markets()
997
997
  ids = ','.join(ids)
@@ -1018,11 +1018,11 @@ class kraken(Exchange, ImplicitAPI):
1018
1018
  items.append(value)
1019
1019
  return self.parse_ledger(items)
1020
1020
 
1021
- async def fetch_ledger_entry(self, id: str, code: String = None, params={}):
1021
+ async def fetch_ledger_entry(self, id: str, code: Str = None, params={}):
1022
1022
  items = await self.fetch_ledger_entries_by_ids([id], code, params)
1023
1023
  return items[0]
1024
1024
 
1025
- def parse_trade(self, trade, market=None) -> Trade:
1025
+ def parse_trade(self, trade, market: Market = None) -> Trade:
1026
1026
  #
1027
1027
  # fetchTrades(public)
1028
1028
  #
@@ -1296,7 +1296,7 @@ class kraken(Exchange, ImplicitAPI):
1296
1296
  }
1297
1297
  return self.safe_string(statuses, status, status)
1298
1298
 
1299
- def parse_order(self, order, market=None) -> Order:
1299
+ def parse_order(self, order, market: Market = None) -> Order:
1300
1300
  #
1301
1301
  # createOrder for regular orders
1302
1302
  #
@@ -1556,7 +1556,7 @@ class kraken(Exchange, ImplicitAPI):
1556
1556
  data = self.safe_value(response, 'result', {})
1557
1557
  return self.parse_order(data, market)
1558
1558
 
1559
- async def fetch_order(self, id: str, symbol: String = None, params={}):
1559
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
1560
1560
  """
1561
1561
  fetches information on an order made by the user
1562
1562
  :see: https://docs.kraken.com/rest/#tag/Account-Data/operation/getOrdersInfo
@@ -1620,7 +1620,7 @@ class kraken(Exchange, ImplicitAPI):
1620
1620
  raise OrderNotFound(self.id + ' fetchOrder() could not find order id ' + id)
1621
1621
  return self.parse_order(self.extend({'id': id}, result[id]))
1622
1622
 
1623
- async def fetch_order_trades(self, id: str, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1623
+ async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1624
1624
  """
1625
1625
  fetch all the trades made from a single order
1626
1626
  :see: https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradesInfo
@@ -1691,7 +1691,7 @@ class kraken(Exchange, ImplicitAPI):
1691
1691
  result = self.array_concat(result, tradesFilteredBySymbol)
1692
1692
  return result
1693
1693
 
1694
- async def fetch_orders_by_ids(self, ids, symbol: String = None, params={}):
1694
+ async def fetch_orders_by_ids(self, ids, symbol: Str = None, params={}):
1695
1695
  await self.load_markets()
1696
1696
  response = await self.privatePostQueryOrders(self.extend({
1697
1697
  'trades': True, # whether or not to include trades in output(optional, default False)
@@ -1707,7 +1707,7 @@ class kraken(Exchange, ImplicitAPI):
1707
1707
  orders.append(order)
1708
1708
  return orders
1709
1709
 
1710
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1710
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1711
1711
  """
1712
1712
  fetch all trades made by the user
1713
1713
  :see: https://docs.kraken.com/rest/#tag/Account-Data/operation/getTradeHistory
@@ -1762,7 +1762,7 @@ class kraken(Exchange, ImplicitAPI):
1762
1762
  market = self.market(symbol)
1763
1763
  return self.parse_trades(trades, market, since, limit)
1764
1764
 
1765
- async def cancel_order(self, id: str, symbol: String = None, params={}):
1765
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
1766
1766
  """
1767
1767
  cancels an open order
1768
1768
  :see: https://docs.kraken.com/rest/#tag/Trading/operation/cancelOrder
@@ -1787,7 +1787,7 @@ class kraken(Exchange, ImplicitAPI):
1787
1787
  raise e
1788
1788
  return response
1789
1789
 
1790
- async def cancel_orders(self, ids, symbol: String = None, params={}):
1790
+ async def cancel_orders(self, ids, symbol: Str = None, params={}):
1791
1791
  """
1792
1792
  cancel multiple orders
1793
1793
  :see: https://docs.kraken.com/rest/#tag/Trading/operation/cancelOrderBatch
@@ -1810,7 +1810,7 @@ class kraken(Exchange, ImplicitAPI):
1810
1810
  #
1811
1811
  return response
1812
1812
 
1813
- async def cancel_all_orders(self, symbol: String = None, params={}):
1813
+ async def cancel_all_orders(self, symbol: Str = None, params={}):
1814
1814
  """
1815
1815
  cancel all open orders
1816
1816
  :see: https://docs.kraken.com/rest/#tag/Trading/operation/cancelAllOrders
@@ -1821,7 +1821,7 @@ class kraken(Exchange, ImplicitAPI):
1821
1821
  await self.load_markets()
1822
1822
  return await self.privatePostCancelAll(params)
1823
1823
 
1824
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1824
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1825
1825
  """
1826
1826
  fetch all unfilled currently open orders
1827
1827
  :see: https://docs.kraken.com/rest/#tag/Account-Data/operation/getOpenOrders
@@ -1848,7 +1848,7 @@ class kraken(Exchange, ImplicitAPI):
1848
1848
  orders = self.safe_value(result, 'open', [])
1849
1849
  return self.parse_orders(orders, market, since, limit)
1850
1850
 
1851
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1851
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1852
1852
  """
1853
1853
  fetches information on multiple closed orders made by the user
1854
1854
  :see: https://docs.kraken.com/rest/#tag/Account-Data/operation/getClosedOrders
@@ -1928,7 +1928,7 @@ class kraken(Exchange, ImplicitAPI):
1928
1928
  }
1929
1929
  return self.safe_string(statuses, status, status)
1930
1930
 
1931
- def parse_transaction(self, transaction, currency=None) -> Transaction:
1931
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
1932
1932
  #
1933
1933
  # fetchDeposits
1934
1934
  #
@@ -2032,7 +2032,7 @@ class kraken(Exchange, ImplicitAPI):
2032
2032
  },
2033
2033
  }
2034
2034
 
2035
- def parse_transactions_by_type(self, type, transactions, code: String = None, since: Int = None, limit: Int = None):
2035
+ def parse_transactions_by_type(self, type, transactions, code: Str = None, since: Int = None, limit: Int = None):
2036
2036
  result = []
2037
2037
  for i in range(0, len(transactions)):
2038
2038
  transaction = self.parse_transaction(self.extend({
@@ -2041,7 +2041,7 @@ class kraken(Exchange, ImplicitAPI):
2041
2041
  result.append(transaction)
2042
2042
  return self.filter_by_currency_since_limit(result, code, since, limit)
2043
2043
 
2044
- async def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2044
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2045
2045
  """
2046
2046
  fetch all deposits made to an account
2047
2047
  :see: https://docs.kraken.com/rest/#tag/Funding/operation/getStatusRecentDeposits
@@ -2098,7 +2098,7 @@ class kraken(Exchange, ImplicitAPI):
2098
2098
  result = self.safe_value(response, 'result', {})
2099
2099
  return self.safe_timestamp(result, 'unixtime')
2100
2100
 
2101
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2101
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2102
2102
  """
2103
2103
  fetch all withdrawals made from an account
2104
2104
  :see: https://docs.kraken.com/rest/#tag/Funding/operation/getStatusRecentWithdrawals
@@ -2230,7 +2230,7 @@ class kraken(Exchange, ImplicitAPI):
2230
2230
  raise InvalidAddress(self.id + ' privatePostDepositAddresses() returned no addresses for ' + code)
2231
2231
  return self.parse_deposit_address(firstResult, currency)
2232
2232
 
2233
- def parse_deposit_address(self, depositAddress, currency=None):
2233
+ def parse_deposit_address(self, depositAddress, currency: Currency = None):
2234
2234
  #
2235
2235
  # {
2236
2236
  # "address":"0x77b5051f97efa9cc52c9ad5b023a53fc15c200d3",
@@ -2407,7 +2407,7 @@ class kraken(Exchange, ImplicitAPI):
2407
2407
  'toAccount': toAccount,
2408
2408
  })
2409
2409
 
2410
- def parse_transfer(self, transfer, currency=None):
2410
+ def parse_transfer(self, transfer, currency: Currency = None):
2411
2411
  #
2412
2412
  # transfer
2413
2413
  #
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.krakenfutures import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderRequest, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade
9
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -506,7 +506,7 @@ class krakenfutures(Exchange, ImplicitAPI):
506
506
  tickers = self.safe_value(response, 'tickers')
507
507
  return self.parse_tickers(tickers, symbols)
508
508
 
509
- def parse_ticker(self, ticker, market=None) -> Ticker:
509
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
510
510
  #
511
511
  # {
512
512
  # "tag": 'semiannual', # 'month', 'quarter', "perpetual", "semiannual",
@@ -633,7 +633,7 @@ class krakenfutures(Exchange, ImplicitAPI):
633
633
  candles = self.safe_value(response, 'candles')
634
634
  return self.parse_ohlcvs(candles, market, timeframe, since, limit)
635
635
 
636
- def parse_ohlcv(self, ohlcv, market=None) -> list:
636
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
637
637
  #
638
638
  # {
639
639
  # "time": 1645198500000,
@@ -699,7 +699,7 @@ class krakenfutures(Exchange, ImplicitAPI):
699
699
  history = self.safe_value(response, 'history')
700
700
  return self.parse_trades(history, market, since, limit)
701
701
 
702
- def parse_trade(self, trade, market=None) -> Trade:
702
+ def parse_trade(self, trade, market: Market = None) -> Trade:
703
703
  #
704
704
  # fetchTrades(public)
705
705
  #
@@ -973,7 +973,7 @@ class krakenfutures(Exchange, ImplicitAPI):
973
973
  order['info'] = response
974
974
  return order
975
975
 
976
- async def cancel_order(self, id: str, symbol: String = None, params={}):
976
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
977
977
  """
978
978
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-cancel-order
979
979
  Cancel an open order on the exchange
@@ -991,7 +991,7 @@ class krakenfutures(Exchange, ImplicitAPI):
991
991
  order = self.parse_order(response['cancelStatus'])
992
992
  return self.extend({'info': response}, order)
993
993
 
994
- async def cancel_orders(self, ids: List[str], symbol: String = None, params={}):
994
+ async def cancel_orders(self, ids: List[str], symbol: Str = None, params={}):
995
995
  """
996
996
  cancel multiple orders
997
997
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-batch-order-management
@@ -1049,7 +1049,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1049
1049
  batchStatus = self.safe_value(response, 'batchStatus', [])
1050
1050
  return self.parse_orders(batchStatus)
1051
1051
 
1052
- async def cancel_all_orders(self, symbol: String = None, params={}):
1052
+ async def cancel_all_orders(self, symbol: Str = None, params={}):
1053
1053
  """
1054
1054
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-cancel-all-orders
1055
1055
  Cancels all orders on the exchange, including trigger orders
@@ -1063,7 +1063,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1063
1063
  response = await self.privatePostCancelallorders(self.extend(request, params))
1064
1064
  return response
1065
1065
 
1066
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1066
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1067
1067
  """
1068
1068
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-order-management-get-open-orders
1069
1069
  Gets all open orders, including trigger orders, for an account from the exchange api
@@ -1147,7 +1147,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1147
1147
  }
1148
1148
  return self.safe_string(statuses, status, status)
1149
1149
 
1150
- def parse_order(self, order, market=None) -> Order:
1150
+ def parse_order(self, order, market: Market = None) -> Order:
1151
1151
  #
1152
1152
  # LIMIT
1153
1153
  #
@@ -1444,7 +1444,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1444
1444
  'trades': trades,
1445
1445
  })
1446
1446
 
1447
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1447
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1448
1448
  """
1449
1449
  fetch all trades made by the user
1450
1450
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-historical-data-get-your-fills
@@ -1718,7 +1718,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1718
1718
  fundingRates.append(parsed)
1719
1719
  return self.index_by(fundingRates, 'symbol')
1720
1720
 
1721
- def parse_funding_rate(self, ticker, market=None):
1721
+ def parse_funding_rate(self, ticker, market: Market = None):
1722
1722
  #
1723
1723
  # {"ask": 26.283,
1724
1724
  # "askSize": 4.6,
@@ -1774,7 +1774,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1774
1774
  'previousFundingDatetime': None,
1775
1775
  }
1776
1776
 
1777
- async def fetch_funding_rate_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1777
+ async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1778
1778
  """
1779
1779
  fetches historical funding rate prices
1780
1780
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-historical-funding-rates-historical-funding-rates
@@ -1858,7 +1858,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1858
1858
  result.append(position)
1859
1859
  return result
1860
1860
 
1861
- def parse_position(self, position, market=None):
1861
+ def parse_position(self, position, market: Market = None):
1862
1862
  # cross
1863
1863
  # {
1864
1864
  # "side": "long",
@@ -1969,7 +1969,7 @@ class krakenfutures(Exchange, ImplicitAPI):
1969
1969
  data = self.safe_value(response, 'instruments')
1970
1970
  return self.parse_leverage_tiers(data, symbols, 'symbol')
1971
1971
 
1972
- def parse_market_leverage_tiers(self, info, market=None):
1972
+ def parse_market_leverage_tiers(self, info, market: Market = None):
1973
1973
  """
1974
1974
  * @ignore
1975
1975
  * @param info Exchange market response for 1 market
@@ -2031,7 +2031,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2031
2031
  })
2032
2032
  return tiers
2033
2033
 
2034
- def parse_transfer(self, transfer, currency=None):
2034
+ def parse_transfer(self, transfer, currency: Currency = None):
2035
2035
  #
2036
2036
  # transfer
2037
2037
  #
@@ -2130,7 +2130,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2130
2130
  'toAccount': toAccount,
2131
2131
  })
2132
2132
 
2133
- async def set_leverage(self, leverage, symbol: String = None, params={}):
2133
+ async def set_leverage(self, leverage, symbol: Str = None, params={}):
2134
2134
  """
2135
2135
  set the level of leverage for a market
2136
2136
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-set-the-leverage-setting-for-a-market
@@ -2150,7 +2150,7 @@ class krakenfutures(Exchange, ImplicitAPI):
2150
2150
  #
2151
2151
  return await self.privatePutLeveragepreferences(self.extend(request, params))
2152
2152
 
2153
- async def fetch_leverage(self, symbol: String = None, params={}):
2153
+ async def fetch_leverage(self, symbol: Str = None, params={}):
2154
2154
  """
2155
2155
  fetch the set leverage for a market
2156
2156
  :see: https://docs.futures.kraken.com/#http-api-trading-v3-api-multi-collateral-get-the-leverage-setting-for-a-market
@@ -9,7 +9,7 @@ import asyncio
9
9
  import hashlib
10
10
  import math
11
11
  import json
12
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderRequest, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
12
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderRequest, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction
13
13
  from typing import List
14
14
  from ccxt.base.errors import ExchangeError
15
15
  from ccxt.base.errors import PermissionDenied
@@ -1289,7 +1289,7 @@ class kucoin(Exchange, ImplicitAPI):
1289
1289
  data = self.safe_value(response, 'data')
1290
1290
  return self.parse_deposit_withdraw_fee(data, currency)
1291
1291
 
1292
- def parse_deposit_withdraw_fee(self, fee, currency=None):
1292
+ def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
1293
1293
  #
1294
1294
  # {
1295
1295
  # "currency": "USDT",
@@ -1350,7 +1350,7 @@ class kucoin(Exchange, ImplicitAPI):
1350
1350
  params = self.omit(params, 'type')
1351
1351
  return(type == 'contract') or (type == 'future') or (type == 'futures') # * (type == 'futures') deprecated, use(type == 'future')
1352
1352
 
1353
- def parse_ticker(self, ticker, market=None) -> Ticker:
1353
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1354
1354
  #
1355
1355
  # {
1356
1356
  # "symbol": "BTC-USDT", # symbol
@@ -1530,7 +1530,7 @@ class kucoin(Exchange, ImplicitAPI):
1530
1530
  #
1531
1531
  return self.parse_ticker(response['data'], market)
1532
1532
 
1533
- def parse_ohlcv(self, ohlcv, market=None) -> list:
1533
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
1534
1534
  #
1535
1535
  # [
1536
1536
  # "1545904980", # Start time of the candle cycle
@@ -1660,7 +1660,7 @@ class kucoin(Exchange, ImplicitAPI):
1660
1660
  raise ExchangeError(self.id + ' fetchDepositAddress() returned an empty response, you might try to run createDepositAddress() first and try again')
1661
1661
  return self.parse_deposit_address(data, currency)
1662
1662
 
1663
- def parse_deposit_address(self, depositAddress, currency=None):
1663
+ def parse_deposit_address(self, depositAddress, currency: Currency = None):
1664
1664
  address = self.safe_string(depositAddress, 'address')
1665
1665
  # BCH/BSV is returned with a "bitcoincash:" prefix, which we cut off here and only keep the address
1666
1666
  if address is not None:
@@ -2044,7 +2044,7 @@ class kucoin(Exchange, ImplicitAPI):
2044
2044
  data = self.safe_value(response, 'data', {})
2045
2045
  return self.parse_order(data, market)
2046
2046
 
2047
- async def cancel_order(self, id: str, symbol: String = None, params={}):
2047
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
2048
2048
  """
2049
2049
  cancels an open order
2050
2050
  :see: https://docs.kucoin.com/spot#cancel-an-order
@@ -2088,7 +2088,7 @@ class kucoin(Exchange, ImplicitAPI):
2088
2088
  params = self.omit(params, ['clientOid', 'clientOrderId', 'stop', 'hf'])
2089
2089
  return await getattr(self, method)(self.extend(request, params))
2090
2090
 
2091
- async def cancel_all_orders(self, symbol: String = None, params={}):
2091
+ async def cancel_all_orders(self, symbol: Str = None, params={}):
2092
2092
  """
2093
2093
  cancel all open orders
2094
2094
  :see: https://docs.kucoin.com/spot#cancel-all-orders
@@ -2124,7 +2124,7 @@ class kucoin(Exchange, ImplicitAPI):
2124
2124
  method = 'privateDeleteHfOrders'
2125
2125
  return await getattr(self, method)(self.extend(request, query))
2126
2126
 
2127
- async def fetch_orders_by_status(self, status, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2127
+ async def fetch_orders_by_status(self, status, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2128
2128
  """
2129
2129
  fetch a list of orders
2130
2130
  :see: https://docs.kucoin.com/spot#list-orders
@@ -2228,7 +2228,7 @@ class kucoin(Exchange, ImplicitAPI):
2228
2228
  orders = self.safe_value(responseData, 'items', [])
2229
2229
  return self.parse_orders(orders, market, since, limit)
2230
2230
 
2231
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2231
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2232
2232
  """
2233
2233
  fetches information on multiple closed orders made by the user
2234
2234
  :see: https://docs.kucoin.com/spot#list-orders
@@ -2255,7 +2255,7 @@ class kucoin(Exchange, ImplicitAPI):
2255
2255
  return await self.fetch_paginated_call_dynamic('fetchClosedOrders', symbol, since, limit, params)
2256
2256
  return await self.fetch_orders_by_status('done', symbol, since, limit, params)
2257
2257
 
2258
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2258
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2259
2259
  """
2260
2260
  fetch all unfilled currently open orders
2261
2261
  :see: https://docs.kucoin.com/spot#list-orders
@@ -2285,7 +2285,7 @@ class kucoin(Exchange, ImplicitAPI):
2285
2285
  return await self.fetch_paginated_call_dynamic('fetchOpenOrders', symbol, since, limit, params)
2286
2286
  return await self.fetch_orders_by_status('active', symbol, since, limit, params)
2287
2287
 
2288
- async def fetch_order(self, id: str, symbol: String = None, params={}):
2288
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
2289
2289
  """
2290
2290
  fetch an order
2291
2291
  :see: https://docs.kucoin.com/spot#get-an-order
@@ -2344,7 +2344,7 @@ class kucoin(Exchange, ImplicitAPI):
2344
2344
  responseData = self.safe_value(responseData, 0)
2345
2345
  return self.parse_order(responseData, market)
2346
2346
 
2347
- def parse_order(self, order, market=None) -> Order:
2347
+ def parse_order(self, order, market: Market = None) -> Order:
2348
2348
  #
2349
2349
  # createOrder
2350
2350
  #
@@ -2519,7 +2519,7 @@ class kucoin(Exchange, ImplicitAPI):
2519
2519
  'trades': None,
2520
2520
  }, market)
2521
2521
 
2522
- async def fetch_order_trades(self, id: str, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2522
+ async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2523
2523
  """
2524
2524
  fetch all the trades made from a single order
2525
2525
  :see: https://docs.kucoin.com/#list-fills
@@ -2536,7 +2536,7 @@ class kucoin(Exchange, ImplicitAPI):
2536
2536
  }
2537
2537
  return await self.fetch_my_trades(symbol, since, limit, self.extend(request, params))
2538
2538
 
2539
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2539
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2540
2540
  """
2541
2541
  :see: https://docs.kucoin.com/#list-fills
2542
2542
  :see: https://docs.kucoin.com/spot-hf/#transaction-details
@@ -2677,7 +2677,7 @@ class kucoin(Exchange, ImplicitAPI):
2677
2677
  trades = self.safe_value(response, 'data', [])
2678
2678
  return self.parse_trades(trades, market, since, limit)
2679
2679
 
2680
- def parse_trade(self, trade, market=None) -> Trade:
2680
+ def parse_trade(self, trade, market: Market = None) -> Trade:
2681
2681
  #
2682
2682
  # fetchTrades(public)
2683
2683
  #
@@ -2897,7 +2897,7 @@ class kucoin(Exchange, ImplicitAPI):
2897
2897
  }
2898
2898
  return self.safe_string(statuses, status, status)
2899
2899
 
2900
- def parse_transaction(self, transaction, currency=None) -> Transaction:
2900
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2901
2901
  #
2902
2902
  # fetchDeposits
2903
2903
  #
@@ -3001,7 +3001,7 @@ class kucoin(Exchange, ImplicitAPI):
3001
3001
  'updated': updated,
3002
3002
  }
3003
3003
 
3004
- async def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3004
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3005
3005
  """
3006
3006
  :see: https://docs.kucoin.com/#get-deposit-list
3007
3007
  :see: https://docs.kucoin.com/#get-v1-historical-deposits-list
@@ -3079,7 +3079,7 @@ class kucoin(Exchange, ImplicitAPI):
3079
3079
  responseData = response['data']['items']
3080
3080
  return self.parse_transactions(responseData, currency, since, limit, {'type': 'deposit'})
3081
3081
 
3082
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3082
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
3083
3083
  """
3084
3084
  fetch all withdrawals made from an account
3085
3085
  :see: https://docs.kucoin.com/#get-withdrawals-list
@@ -3382,7 +3382,7 @@ class kucoin(Exchange, ImplicitAPI):
3382
3382
  data = self.safe_value(response, 'data')
3383
3383
  return self.parse_transfer(data, currency)
3384
3384
 
3385
- def parse_transfer(self, transfer, currency=None):
3385
+ def parse_transfer(self, transfer, currency: Currency = None):
3386
3386
  #
3387
3387
  # transfer(spot)
3388
3388
  #
@@ -3487,7 +3487,7 @@ class kucoin(Exchange, ImplicitAPI):
3487
3487
  }
3488
3488
  return self.safe_string(types, type, type)
3489
3489
 
3490
- def parse_ledger_entry(self, item, currency=None):
3490
+ def parse_ledger_entry(self, item, currency: Currency = None):
3491
3491
  #
3492
3492
  # {
3493
3493
  # "id": "611a1e7c6a053300067a88d9", #unique key for each ledger entry
@@ -3565,7 +3565,7 @@ class kucoin(Exchange, ImplicitAPI):
3565
3565
  'info': item,
3566
3566
  }
3567
3567
 
3568
- async def fetch_ledger(self, code: String = None, since: Int = None, limit: Int = None, params={}):
3568
+ async def fetch_ledger(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
3569
3569
  """
3570
3570
  :see: https://docs.kucoin.com/#get-account-ledgers
3571
3571
  fetch the history of changes, actions done by the user or operations that altered balance of the user
@@ -3664,7 +3664,7 @@ class kucoin(Exchange, ImplicitAPI):
3664
3664
  sorted = self.sort_by(result, 'timestamp')
3665
3665
  return self.filter_by_currency_since_limit(sorted, code, since, limit)
3666
3666
 
3667
- def parse_borrow_rate(self, info, currency=None):
3667
+ def parse_borrow_rate(self, info, currency: Currency = None):
3668
3668
  #
3669
3669
  # {
3670
3670
  # "tradeId": "62db2dcaff219600012b56cd",
@@ -3687,7 +3687,7 @@ class kucoin(Exchange, ImplicitAPI):
3687
3687
  'info': info,
3688
3688
  }
3689
3689
 
3690
- async def fetch_borrow_interest(self, code: String = None, symbol: String = None, since: Int = None, limit: Int = None, params={}):
3690
+ async def fetch_borrow_interest(self, code: Str = None, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3691
3691
  """
3692
3692
  fetch the interest owed by the user for borrowing currency for margin trading
3693
3693
  :see: https://docs.kucoin.com/#get-repay-record
@@ -3783,7 +3783,7 @@ class kucoin(Exchange, ImplicitAPI):
3783
3783
  assets = self.safe_value(data, 'assets', []) if (marginMode == 'isolated') else self.safe_value(data, 'items', [])
3784
3784
  return self.parse_borrow_interests(assets, None)
3785
3785
 
3786
- def parse_borrow_interest(self, info, market=None):
3786
+ def parse_borrow_interest(self, info, market: Market = None):
3787
3787
  #
3788
3788
  # Cross
3789
3789
  #
@@ -3855,7 +3855,7 @@ class kucoin(Exchange, ImplicitAPI):
3855
3855
  'info': info,
3856
3856
  }
3857
3857
 
3858
- async def borrow_margin(self, code: str, amount, symbol: String = None, params={}):
3858
+ async def borrow_margin(self, code: str, amount, symbol: Str = None, params={}):
3859
3859
  """
3860
3860
  create a loan to borrow margin
3861
3861
  :see: https://docs.kucoin.com/#1-margin-borrowing
@@ -3902,7 +3902,7 @@ class kucoin(Exchange, ImplicitAPI):
3902
3902
  data = self.safe_value(response, 'data', {})
3903
3903
  return self.parse_margin_loan(data, currency)
3904
3904
 
3905
- async def repay_margin(self, code: str, amount, symbol: String = None, params={}):
3905
+ async def repay_margin(self, code: str, amount, symbol: Str = None, params={}):
3906
3906
  """
3907
3907
  repay borrowed margin and interest
3908
3908
  :see: https://docs.kucoin.com/#2-repayment
@@ -3945,7 +3945,7 @@ class kucoin(Exchange, ImplicitAPI):
3945
3945
  data = self.safe_value(response, 'data', {})
3946
3946
  return self.parse_margin_loan(data, currency)
3947
3947
 
3948
- def parse_margin_loan(self, info, currency=None):
3948
+ def parse_margin_loan(self, info, currency: Currency = None):
3949
3949
  #
3950
3950
  # {
3951
3951
  # "orderNo": "5da6dba0f943c0c81f5d5db5",