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
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.phemex import ImplicitAPI
8
8
  import hashlib
9
9
  import numbers
10
- from ccxt.base.types import Balances, Int, Order, OrderBook, OrderSide, OrderType, String, Strings, Ticker, Tickers, Trade, Transaction
10
+ from ccxt.base.types import Balances, Currency, Int, Market, Order, OrderBook, OrderSide, OrderType, Num, Str, Strings, Ticker, Tickers, Trade, Transaction
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
13
13
  from ccxt.base.errors import PermissionDenied
@@ -551,9 +551,9 @@ class phemex(Exchange, ImplicitAPI):
551
551
  takerFeeRateEr = self.safe_string(market, 'takerFeeRateEr')
552
552
  status = self.safe_string(market, 'status')
553
553
  contractSizeString = self.safe_string(market, 'contractSize', ' ')
554
- contractSize = None
554
+ contractSize: Num = None
555
555
  if settle == 'USDT':
556
- contractSize = 1
556
+ contractSize = self.parse_number('1')
557
557
  elif contractSizeString.find(' '):
558
558
  # "1 USD"
559
559
  # "0.005 ETH"
@@ -904,9 +904,9 @@ class phemex(Exchange, ImplicitAPI):
904
904
  valueScale = int(valueScaleString)
905
905
  minValueEv = self.safe_string(currency, 'minValueEv')
906
906
  maxValueEv = self.safe_string(currency, 'maxValueEv')
907
- minAmount = None
908
- maxAmount = None
909
- precision = None
907
+ minAmount: Num = None
908
+ maxAmount: Num = None
909
+ precision: Num = None
910
910
  if valueScale is not None:
911
911
  precisionString = self.parse_precision(valueScaleString)
912
912
  precision = self.parse_number(precisionString)
@@ -937,7 +937,7 @@ class phemex(Exchange, ImplicitAPI):
937
937
  }
938
938
  return result
939
939
 
940
- def custom_parse_bid_ask(self, bidask, priceKey=0, amountKey=1, market=None):
940
+ def custom_parse_bid_ask(self, bidask, priceKey=0, amountKey=1, market: Market = None):
941
941
  if market is None:
942
942
  raise ArgumentsRequired(self.id + ' customParseBidAsk() requires a market argument')
943
943
  amount = self.safe_string(bidask, amountKey)
@@ -948,7 +948,7 @@ class phemex(Exchange, ImplicitAPI):
948
948
  self.parse_number(amount),
949
949
  ]
950
950
 
951
- def custom_parse_order_book(self, orderbook, symbol, timestamp=None, bidsKey='bids', asksKey='asks', priceKey=0, amountKey=1, market=None):
951
+ def custom_parse_order_book(self, orderbook, symbol, timestamp=None, bidsKey='bids', asksKey='asks', priceKey=0, amountKey=1, market: Market = None):
952
952
  result = {
953
953
  'symbol': symbol,
954
954
  'timestamp': timestamp,
@@ -1026,12 +1026,12 @@ class phemex(Exchange, ImplicitAPI):
1026
1026
  preciseString = str(precise)
1027
1027
  return self.parse_to_int(preciseString)
1028
1028
 
1029
- def to_ev(self, amount, market=None):
1029
+ def to_ev(self, amount, market: Market = None):
1030
1030
  if (amount is None) or (market is None):
1031
1031
  return amount
1032
1032
  return self.to_en(amount, market['valueScale'])
1033
1033
 
1034
- def to_ep(self, price, market=None):
1034
+ def to_ep(self, price, market: Market = None):
1035
1035
  if (price is None) or (market is None):
1036
1036
  return price
1037
1037
  return self.to_en(price, market['priceScale'])
@@ -1044,22 +1044,22 @@ class phemex(Exchange, ImplicitAPI):
1044
1044
  precise.reduce()
1045
1045
  return str(precise)
1046
1046
 
1047
- def from_ep(self, ep, market=None):
1047
+ def from_ep(self, ep, market: Market = None):
1048
1048
  if (ep is None) or (market is None):
1049
1049
  return ep
1050
1050
  return self.from_en(ep, self.safe_integer(market, 'priceScale'))
1051
1051
 
1052
- def from_ev(self, ev, market=None):
1052
+ def from_ev(self, ev, market: Market = None):
1053
1053
  if (ev is None) or (market is None):
1054
1054
  return ev
1055
1055
  return self.from_en(ev, self.safe_integer(market, 'valueScale'))
1056
1056
 
1057
- def from_er(self, er, market=None):
1057
+ def from_er(self, er, market: Market = None):
1058
1058
  if (er is None) or (market is None):
1059
1059
  return er
1060
1060
  return self.from_en(er, self.safe_integer(market, 'ratioScale'))
1061
1061
 
1062
- def parse_ohlcv(self, ohlcv, market=None) -> list:
1062
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
1063
1063
  #
1064
1064
  # [
1065
1065
  # 1592467200, # timestamp
@@ -1073,7 +1073,7 @@ class phemex(Exchange, ImplicitAPI):
1073
1073
  # 48759063370, # quote volume
1074
1074
  # ]
1075
1075
  #
1076
- baseVolume = None
1076
+ baseVolume: Num
1077
1077
  if (market is not None) and market['spot']:
1078
1078
  baseVolume = self.parse_number(self.from_ev(self.safe_string(ohlcv, 7), market))
1079
1079
  else:
@@ -1164,7 +1164,7 @@ class phemex(Exchange, ImplicitAPI):
1164
1164
  rows = self.safe_value(data, 'rows', [])
1165
1165
  return self.parse_ohlcvs(rows, market, timeframe, since, userLimit)
1166
1166
 
1167
- def parse_ticker(self, ticker, market=None) -> Ticker:
1167
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
1168
1168
  #
1169
1169
  # spot
1170
1170
  #
@@ -1330,7 +1330,7 @@ class phemex(Exchange, ImplicitAPI):
1330
1330
  :returns dict: a dictionary of `ticker structures <https://github.com/ccxt/ccxt/wiki/Manual#ticker-structure>`
1331
1331
  """
1332
1332
  await self.load_markets()
1333
- market = None
1333
+ market: Market = None
1334
1334
  if symbols is not None:
1335
1335
  first = self.safe_value(symbols, 0)
1336
1336
  market = self.market(first)
@@ -1339,7 +1339,7 @@ class phemex(Exchange, ImplicitAPI):
1339
1339
  subType = None
1340
1340
  subType, params = self.handle_sub_type_and_params('fetchTickers', market, params)
1341
1341
  query = self.omit(params, 'type')
1342
- defaultMethod = None
1342
+ defaultMethod: str
1343
1343
  if type == 'spot':
1344
1344
  defaultMethod = 'v1GetMdSpotTicker24hrAll'
1345
1345
  elif subType == 'inverse':
@@ -1391,7 +1391,7 @@ class phemex(Exchange, ImplicitAPI):
1391
1391
  trades = self.safe_value_2(result, 'trades', 'trades_p', [])
1392
1392
  return self.parse_trades(trades, market, since, limit)
1393
1393
 
1394
- def parse_trade(self, trade, market=None) -> Trade:
1394
+ def parse_trade(self, trade, market: Market = None) -> Trade:
1395
1395
  #
1396
1396
  # fetchTrades(public) spot & contract
1397
1397
  #
@@ -1553,22 +1553,22 @@ class phemex(Exchange, ImplicitAPI):
1553
1553
  # "execStatus": 6
1554
1554
  # }
1555
1555
  #
1556
- priceString = None
1557
- amountString = None
1558
- timestamp = None
1559
- id = None
1560
- side = None
1561
- costString = None
1562
- type = None
1556
+ priceString: Str
1557
+ amountString: Str
1558
+ timestamp: Int
1559
+ id: Str = None
1560
+ side: Str = None
1561
+ costString: Str = None
1562
+ type: Str = None
1563
1563
  fee = None
1564
- feeCostString = None
1565
- feeRateString = None
1566
- feeCurrencyCode = None
1564
+ feeCostString: Str = None
1565
+ feeRateString: Str = None
1566
+ feeCurrencyCode: Str = None
1567
1567
  marketId = self.safe_string(trade, 'symbol')
1568
1568
  market = self.safe_market(marketId, market)
1569
1569
  symbol = market['symbol']
1570
- orderId = None
1571
- takerOrMaker = None
1570
+ orderId: Str = None
1571
+ takerOrMaker: Str = None
1572
1572
  if isinstance(trade, list):
1573
1573
  tradeLength = len(trade)
1574
1574
  timestamp = self.safe_integer_product(trade, 0, 0.000001)
@@ -1947,7 +1947,7 @@ class phemex(Exchange, ImplicitAPI):
1947
1947
  }
1948
1948
  return self.safe_string(timeInForces, timeInForce, timeInForce)
1949
1949
 
1950
- def parse_spot_order(self, order, market=None):
1950
+ def parse_spot_order(self, order, market: Market = None):
1951
1951
  #
1952
1952
  # spot
1953
1953
  #
@@ -2029,7 +2029,7 @@ class phemex(Exchange, ImplicitAPI):
2029
2029
  'currency': None,
2030
2030
  }
2031
2031
  timeInForce = self.parse_time_in_force(self.safe_string(order, 'timeInForce'))
2032
- stopPrice = self.parse_number(self.omit_zero(self.from_ep(self.safe_string(order, 'stopPxEp', market))))
2032
+ stopPrice = self.parse_number(self.omit_zero(self.from_ep(self.safe_string(order, 'stopPxEp'))))
2033
2033
  postOnly = (timeInForce == 'PO')
2034
2034
  return self.safe_order({
2035
2035
  'info': order,
@@ -2063,7 +2063,7 @@ class phemex(Exchange, ImplicitAPI):
2063
2063
  }
2064
2064
  return self.safe_string(sides, side, side)
2065
2065
 
2066
- def parse_swap_order(self, order, market=None):
2066
+ def parse_swap_order(self, order, market: Market = None):
2067
2067
  #
2068
2068
  # {
2069
2069
  # "bizError":0,
@@ -2224,7 +2224,7 @@ class phemex(Exchange, ImplicitAPI):
2224
2224
  'trades': None,
2225
2225
  })
2226
2226
 
2227
- def parse_order(self, order, market=None) -> Order:
2227
+ def parse_order(self, order, market: Market = None) -> Order:
2228
2228
  isSwap = self.safe_value(market, 'swap', False)
2229
2229
  hasPnl = ('closedPnl' in order)
2230
2230
  if isSwap or hasPnl:
@@ -2538,7 +2538,7 @@ class phemex(Exchange, ImplicitAPI):
2538
2538
  data = self.safe_value(response, 'data', {})
2539
2539
  return self.parse_order(data, market)
2540
2540
 
2541
- async def cancel_order(self, id: str, symbol: String = None, params={}):
2541
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
2542
2542
  """
2543
2543
  cancels an open order
2544
2544
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#cancel-single-order-by-orderid
@@ -2572,7 +2572,7 @@ class phemex(Exchange, ImplicitAPI):
2572
2572
  data = self.safe_value(response, 'data', {})
2573
2573
  return self.parse_order(data, market)
2574
2574
 
2575
- async def cancel_all_orders(self, symbol: String = None, params={}):
2575
+ async def cancel_all_orders(self, symbol: Str = None, params={}):
2576
2576
  """
2577
2577
  cancel all open orders in a market
2578
2578
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#cancelall
@@ -2596,7 +2596,7 @@ class phemex(Exchange, ImplicitAPI):
2596
2596
  request['symbol'] = market['id']
2597
2597
  return await getattr(self, method)(self.extend(request, params))
2598
2598
 
2599
- async def fetch_order(self, id: str, symbol: String = None, params={}):
2599
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
2600
2600
  """
2601
2601
  fetches information on an order made by the user
2602
2602
  :param str symbol: unified symbol of the market the order was made in
@@ -2631,7 +2631,7 @@ class phemex(Exchange, ImplicitAPI):
2631
2631
  order = self.safe_value(data, 0, {})
2632
2632
  return self.parse_order(order, market)
2633
2633
 
2634
- async def fetch_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2634
+ async def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2635
2635
  """
2636
2636
  fetches information on multiple orders made by the user
2637
2637
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#queryorder
@@ -2662,7 +2662,7 @@ class phemex(Exchange, ImplicitAPI):
2662
2662
  rows = self.safe_value(data, 'rows', data)
2663
2663
  return self.parse_orders(rows, market, since, limit)
2664
2664
 
2665
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2665
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2666
2666
  """
2667
2667
  fetch all unfilled currently open orders
2668
2668
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#queryopenorder
@@ -2698,7 +2698,7 @@ class phemex(Exchange, ImplicitAPI):
2698
2698
  rows = self.safe_value(data, 'rows', [])
2699
2699
  return self.parse_orders(rows, market, since, limit)
2700
2700
 
2701
- async def fetch_closed_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2701
+ async def fetch_closed_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
2702
2702
  """
2703
2703
  fetches information on multiple closed orders made by the user
2704
2704
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#queryorder
@@ -2768,7 +2768,7 @@ class phemex(Exchange, ImplicitAPI):
2768
2768
  rows = self.safe_value(data, 'rows', [])
2769
2769
  return self.parse_orders(rows, market, since, limit)
2770
2770
 
2771
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
2771
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
2772
2772
  """
2773
2773
  fetch all trades made by the user
2774
2774
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Contract-API-en.md#query-user-trade
@@ -2957,7 +2957,7 @@ class phemex(Exchange, ImplicitAPI):
2957
2957
  'info': response,
2958
2958
  }
2959
2959
 
2960
- async def fetch_deposits(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2960
+ async def fetch_deposits(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2961
2961
  """
2962
2962
  fetch all deposits made to an account
2963
2963
  :param str code: unified currency code
@@ -2994,7 +2994,7 @@ class phemex(Exchange, ImplicitAPI):
2994
2994
  data = self.safe_value(response, 'data', {})
2995
2995
  return self.parse_transactions(data, currency, since, limit)
2996
2996
 
2997
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2997
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
2998
2998
  """
2999
2999
  fetch all withdrawals made from an account
3000
3000
  :param str code: unified currency code
@@ -3038,7 +3038,7 @@ class phemex(Exchange, ImplicitAPI):
3038
3038
  }
3039
3039
  return self.safe_string(statuses, status, status)
3040
3040
 
3041
- def parse_transaction(self, transaction, currency=None) -> Transaction:
3041
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
3042
3042
  #
3043
3043
  # withdraw
3044
3044
  #
@@ -3236,7 +3236,7 @@ class phemex(Exchange, ImplicitAPI):
3236
3236
  result.append(self.parse_position(position))
3237
3237
  return self.filter_by_array_positions(result, 'symbol', symbols, False)
3238
3238
 
3239
- def parse_position(self, position, market=None):
3239
+ def parse_position(self, position, market: Market = None):
3240
3240
  #
3241
3241
  # {
3242
3242
  # "userID": "811370",
@@ -3374,7 +3374,7 @@ class phemex(Exchange, ImplicitAPI):
3374
3374
  'takeProfitPrice': None,
3375
3375
  })
3376
3376
 
3377
- async def fetch_funding_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
3377
+ async def fetch_funding_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3378
3378
  """
3379
3379
  fetch the history of funding payments paid and received on self account
3380
3380
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#futureDataFundingFeesHist
@@ -3485,7 +3485,7 @@ class phemex(Exchange, ImplicitAPI):
3485
3485
  result = self.safe_value(response, 'result', {})
3486
3486
  return self.parse_funding_rate(result, market)
3487
3487
 
3488
- def parse_funding_rate(self, contract, market=None):
3488
+ def parse_funding_rate(self, contract, market: Market = None):
3489
3489
  #
3490
3490
  # {
3491
3491
  # "askEp": 2332500,
@@ -3579,7 +3579,7 @@ class phemex(Exchange, ImplicitAPI):
3579
3579
  }
3580
3580
  return self.safe_string(statuses, status, status)
3581
3581
 
3582
- def parse_margin_modification(self, data, market=None):
3582
+ def parse_margin_modification(self, data, market: Market = None):
3583
3583
  #
3584
3584
  # {
3585
3585
  # "code": 0,
@@ -3600,7 +3600,7 @@ class phemex(Exchange, ImplicitAPI):
3600
3600
  'status': self.parse_margin_status(self.safe_string(data, 'code')),
3601
3601
  }
3602
3602
 
3603
- async def set_margin_mode(self, marginMode, symbol: String = None, params={}):
3603
+ async def set_margin_mode(self, marginMode, symbol: Str = None, params={}):
3604
3604
  """
3605
3605
  set margin mode to 'cross' or 'isolated'
3606
3606
  :param str marginMode: 'cross' or 'isolated'
@@ -3627,7 +3627,7 @@ class phemex(Exchange, ImplicitAPI):
3627
3627
  }
3628
3628
  return await self.privatePutPositionsLeverage(self.extend(request, params))
3629
3629
 
3630
- async def set_position_mode(self, hedged, symbol: String = None, params={}):
3630
+ async def set_position_mode(self, hedged, symbol: Str = None, params={}):
3631
3631
  """
3632
3632
  set hedged to True or False for a market
3633
3633
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#switch-position-mode-synchronously
@@ -3746,7 +3746,7 @@ class phemex(Exchange, ImplicitAPI):
3746
3746
  riskLimits = self.safe_value(data, 'riskLimits')
3747
3747
  return self.parse_leverage_tiers(riskLimits, symbols, 'symbol')
3748
3748
 
3749
- def parse_market_leverage_tiers(self, info, market=None):
3749
+ def parse_market_leverage_tiers(self, info, market: Market = None):
3750
3750
  """
3751
3751
  :param dict info: Exchange market response for 1 market
3752
3752
  :param dict market: CCXT market
@@ -3810,7 +3810,7 @@ class phemex(Exchange, ImplicitAPI):
3810
3810
  url = self.implode_hostname(self.urls['api'][api]) + url
3811
3811
  return {'url': url, 'method': method, 'body': body, 'headers': headers}
3812
3812
 
3813
- async def set_leverage(self, leverage, symbol: String = None, params={}):
3813
+ async def set_leverage(self, leverage, symbol: Str = None, params={}):
3814
3814
  """
3815
3815
  set the level of leverage for a market
3816
3816
  :see: https://github.com/phemex/phemex-api-docs/blob/master/Public-Hedged-Perpetual-API.md#set-leverage
@@ -3926,7 +3926,7 @@ class phemex(Exchange, ImplicitAPI):
3926
3926
  transfer['currency'] = code
3927
3927
  return transfer
3928
3928
 
3929
- async def fetch_transfers(self, code: String = None, since: Int = None, limit: Int = None, params={}):
3929
+ async def fetch_transfers(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
3930
3930
  """
3931
3931
  fetch a history of internal transfers made on an account
3932
3932
  :param str code: unified currency code of the currency transferred
@@ -3971,7 +3971,7 @@ class phemex(Exchange, ImplicitAPI):
3971
3971
  transfers = self.safe_value(data, 'rows', [])
3972
3972
  return self.parse_transfers(transfers, currency, since, limit)
3973
3973
 
3974
- def parse_transfer(self, transfer, currency=None):
3974
+ def parse_transfer(self, transfer, currency: Currency = None):
3975
3975
  #
3976
3976
  # transfer
3977
3977
  #
@@ -4000,7 +4000,7 @@ class phemex(Exchange, ImplicitAPI):
4000
4000
  id = self.safe_string(transfer, 'linkKey')
4001
4001
  status = self.safe_string(transfer, 'status')
4002
4002
  amountEv = self.safe_string(transfer, 'amountEv')
4003
- amountTransfered = self.from_ev(amountEv, currency)
4003
+ amountTransfered = self.from_ev(amountEv)
4004
4004
  currencyId = self.safe_string(transfer, 'currency')
4005
4005
  code = self.safe_currency_code(currencyId, currency)
4006
4006
  side = self.safe_integer(transfer, 'side')
@@ -4034,7 +4034,7 @@ class phemex(Exchange, ImplicitAPI):
4034
4034
  }
4035
4035
  return self.safe_string(statuses, status, status)
4036
4036
 
4037
- async def fetch_funding_rate_history(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
4037
+ async def fetch_funding_rate_history(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
4038
4038
  """
4039
4039
  fetches historical funding rate prices
4040
4040
  :see: https://phemex-docs.github.io/#query-funding-rate-history-2
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.poloniex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Int, Market, 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
@@ -386,7 +386,7 @@ class poloniex(Exchange, ImplicitAPI):
386
386
  },
387
387
  })
388
388
 
389
- def parse_ohlcv(self, ohlcv, market=None) -> list:
389
+ def parse_ohlcv(self, ohlcv, market: Market = None) -> list:
390
390
  #
391
391
  # [
392
392
  # [
@@ -574,7 +574,7 @@ class poloniex(Exchange, ImplicitAPI):
574
574
  response = await self.publicGetTimestamp(params)
575
575
  return self.safe_integer(response, 'serverTime')
576
576
 
577
- def parse_ticker(self, ticker, market=None) -> Ticker:
577
+ def parse_ticker(self, ticker, market: Market = None) -> Ticker:
578
578
  #
579
579
  # {
580
580
  # "symbol" : "BTC_USDT",
@@ -831,7 +831,7 @@ class poloniex(Exchange, ImplicitAPI):
831
831
  #
832
832
  return self.parse_ticker(response, market)
833
833
 
834
- def parse_trade(self, trade, market=None) -> Trade:
834
+ def parse_trade(self, trade, market: Market = None) -> Trade:
835
835
  #
836
836
  # fetchTrades
837
837
  #
@@ -954,7 +954,7 @@ class poloniex(Exchange, ImplicitAPI):
954
954
  #
955
955
  return self.parse_trades(trades, market, since, limit)
956
956
 
957
- async def fetch_my_trades(self, symbol: String = None, since: Int = None, limit: Int = None, params={}):
957
+ async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
958
958
  """
959
959
  fetch all trades made by the user
960
960
  :see: https://docs.poloniex.com/#authenticated-endpoints-trades-trade-history
@@ -971,7 +971,7 @@ class poloniex(Exchange, ImplicitAPI):
971
971
  paginate, params = self.handle_option_and_params(params, 'fetchMyTrades', 'paginate')
972
972
  if paginate:
973
973
  return await self.fetch_paginated_call_dynamic('fetchMyTrades', symbol, since, limit, params)
974
- market = None
974
+ market: Market = None
975
975
  if symbol is not None:
976
976
  market = self.market(symbol)
977
977
  request = {
@@ -1020,7 +1020,7 @@ class poloniex(Exchange, ImplicitAPI):
1020
1020
  }
1021
1021
  return self.safe_string(statuses, status, status)
1022
1022
 
1023
- def parse_order(self, order, market=None) -> Order:
1023
+ def parse_order(self, order, market: Market = None) -> Order:
1024
1024
  #
1025
1025
  # fetchOpenOrder
1026
1026
  #
@@ -1090,8 +1090,8 @@ class poloniex(Exchange, ImplicitAPI):
1090
1090
  id = self.safe_string_n(order, ['orderNumber', 'id', 'orderId'])
1091
1091
  fee = None
1092
1092
  feeCurrency = self.safe_string(order, 'tokenFeeCurrency')
1093
- feeCost = None
1094
- feeCurrencyCode = None
1093
+ feeCost: Str = None
1094
+ feeCurrencyCode: Str = None
1095
1095
  rate = self.safe_string(order, 'fee')
1096
1096
  if feeCurrency is None:
1097
1097
  feeCurrencyCode = market['base'] if (side == 'buy') else market['quote']
@@ -1153,7 +1153,7 @@ class poloniex(Exchange, ImplicitAPI):
1153
1153
  result.append(self.parse_order(extended, market))
1154
1154
  return result
1155
1155
 
1156
- async def fetch_open_orders(self, symbol: String = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1156
+ async def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
1157
1157
  """
1158
1158
  fetch all unfilled currently open orders
1159
1159
  :see: https://docs.poloniex.com/#authenticated-endpoints-orders-open-orders
@@ -1166,7 +1166,7 @@ class poloniex(Exchange, ImplicitAPI):
1166
1166
  :returns Order[]: a list of `order structures <https://github.com/ccxt/ccxt/wiki/Manual#order-structure>`
1167
1167
  """
1168
1168
  await self.load_markets()
1169
- market = None
1169
+ market: Market = None
1170
1170
  request = {}
1171
1171
  if symbol is not None:
1172
1172
  market = self.market(symbol)
@@ -1318,7 +1318,7 @@ class poloniex(Exchange, ImplicitAPI):
1318
1318
  })
1319
1319
  return self.parse_order(response, market)
1320
1320
 
1321
- async def cancel_order(self, id: str, symbol: String = None, params={}):
1321
+ async def cancel_order(self, id: str, symbol: Str = None, params={}):
1322
1322
  #
1323
1323
  # @method
1324
1324
  # @name poloniex#cancelOrder
@@ -1355,7 +1355,7 @@ class poloniex(Exchange, ImplicitAPI):
1355
1355
  #
1356
1356
  return self.parse_order(response)
1357
1357
 
1358
- async def cancel_all_orders(self, symbol: String = None, params={}):
1358
+ async def cancel_all_orders(self, symbol: Str = None, params={}):
1359
1359
  """
1360
1360
  cancel all open orders
1361
1361
  :see: https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
@@ -1370,7 +1370,7 @@ class poloniex(Exchange, ImplicitAPI):
1370
1370
  # 'accountTypes': 'SPOT',
1371
1371
  'symbols': [],
1372
1372
  }
1373
- market = None
1373
+ market: Market = None
1374
1374
  if symbol is not None:
1375
1375
  market = self.market(symbol)
1376
1376
  request['symbols'] = [
@@ -1402,7 +1402,7 @@ class poloniex(Exchange, ImplicitAPI):
1402
1402
  #
1403
1403
  return self.parse_orders(response, market)
1404
1404
 
1405
- async def fetch_order(self, id: str, symbol: String = None, params={}):
1405
+ async def fetch_order(self, id: str, symbol: Str = None, params={}):
1406
1406
  """
1407
1407
  fetch an order by it's id
1408
1408
  :see: https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
@@ -1451,13 +1451,13 @@ class poloniex(Exchange, ImplicitAPI):
1451
1451
  order['id'] = id
1452
1452
  return order
1453
1453
 
1454
- async def fetch_order_status(self, id: str, symbol: String = None, params={}):
1454
+ async def fetch_order_status(self, id: str, symbol: Str = None, params={}):
1455
1455
  await self.load_markets()
1456
1456
  orders = await self.fetch_open_orders(symbol, None, None, params)
1457
1457
  indexed = self.index_by(orders, 'id')
1458
1458
  return 'open' if (id in indexed) else 'closed'
1459
1459
 
1460
- async def fetch_order_trades(self, id: str, symbol: String = None, since: Int = None, limit: Int = None, params={}):
1460
+ async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1461
1461
  """
1462
1462
  fetch all the trades made from a single order
1463
1463
  :see: https://docs.poloniex.com/#authenticated-endpoints-trades-trades-by-order-id
@@ -1654,7 +1654,7 @@ class poloniex(Exchange, ImplicitAPI):
1654
1654
  # }
1655
1655
  #
1656
1656
  address = self.safe_string(response, 'address')
1657
- tag = None
1657
+ tag: Str = None
1658
1658
  self.check_address(address)
1659
1659
  if currency is not None:
1660
1660
  depositAddress = self.safe_string(currency['info'], 'depositAddress')
@@ -1698,7 +1698,7 @@ class poloniex(Exchange, ImplicitAPI):
1698
1698
  # }
1699
1699
  #
1700
1700
  address = self.safe_string(response, request['currency'])
1701
- tag = None
1701
+ tag: Str = None
1702
1702
  self.check_address(address)
1703
1703
  if currency is not None:
1704
1704
  depositAddress = self.safe_string(currency['info'], 'depositAddress')
@@ -1744,7 +1744,7 @@ class poloniex(Exchange, ImplicitAPI):
1744
1744
  #
1745
1745
  return self.parse_transfer(response, currency)
1746
1746
 
1747
- def parse_transfer(self, transfer, currency=None):
1747
+ def parse_transfer(self, transfer, currency: Currency = None):
1748
1748
  #
1749
1749
  # {
1750
1750
  # "transferId" : "168041074"
@@ -1800,7 +1800,7 @@ class poloniex(Exchange, ImplicitAPI):
1800
1800
  #
1801
1801
  return self.parse_transaction(response, currency)
1802
1802
 
1803
- async def fetch_transactions_helper(self, code: String = None, since: Int = None, limit: Int = None, params={}):
1803
+ async def fetch_transactions_helper(self, code: Str = None, since: Int = None, limit: Int = None, params={}):
1804
1804
  await self.load_markets()
1805
1805
  year = 31104000 # 60 * 60 * 24 * 30 * 12 = one year of history, why not
1806
1806
  now = self.seconds()
@@ -1883,7 +1883,7 @@ class poloniex(Exchange, ImplicitAPI):
1883
1883
  #
1884
1884
  return response
1885
1885
 
1886
- async def fetch_deposits_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1886
+ async def fetch_deposits_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1887
1887
  """
1888
1888
  fetch history of deposits and withdrawals
1889
1889
  :see: https://docs.poloniex.com/#authenticated-endpoints-wallets-wallets-activity-records
@@ -1895,7 +1895,7 @@ class poloniex(Exchange, ImplicitAPI):
1895
1895
  """
1896
1896
  await self.load_markets()
1897
1897
  response = await self.fetch_transactions_helper(code, since, limit, params)
1898
- currency = None
1898
+ currency: Currency = None
1899
1899
  if code is not None:
1900
1900
  currency = self.currency(code)
1901
1901
  withdrawals = self.safe_value(response, 'withdrawals', [])
@@ -1905,7 +1905,7 @@ class poloniex(Exchange, ImplicitAPI):
1905
1905
  transactions = self.array_concat(depositTransactions, withdrawalTransactions)
1906
1906
  return self.filter_by_currency_since_limit(self.sort_by(transactions, 'timestamp'), code, since, limit)
1907
1907
 
1908
- async def fetch_withdrawals(self, code: String = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1908
+ async def fetch_withdrawals(self, code: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Transaction]:
1909
1909
  """
1910
1910
  fetch all withdrawals made from an account
1911
1911
  :see: https://docs.poloniex.com/#authenticated-endpoints-wallets-wallets-activity-records
@@ -1916,7 +1916,7 @@ class poloniex(Exchange, ImplicitAPI):
1916
1916
  :returns dict[]: a list of `transaction structures <https://github.com/ccxt/ccxt/wiki/Manual#transaction-structure>`
1917
1917
  """
1918
1918
  response = await self.fetch_transactions_helper(code, since, limit, params)
1919
- currency = None
1919
+ currency: Currency = None
1920
1920
  if code is not None:
1921
1921
  currency = self.currency(code)
1922
1922
  withdrawals = self.safe_value(response, 'withdrawals', [])
@@ -1994,7 +1994,8 @@ class poloniex(Exchange, ImplicitAPI):
1994
1994
  code = self.safe_currency_code(currencyId)
1995
1995
  feeInfo = response[currencyId]
1996
1996
  if (codes is None) or (self.in_array(code, codes)):
1997
- depositWithdrawFees[code] = self.parse_deposit_withdraw_fee(feeInfo, code)
1997
+ currency = self.currency(code)
1998
+ depositWithdrawFees[code] = self.parse_deposit_withdraw_fee(feeInfo, currency)
1998
1999
  childChains = self.safe_value(feeInfo, 'childChains')
1999
2000
  chainsLength = len(childChains)
2000
2001
  if chainsLength > 0:
@@ -2018,9 +2019,9 @@ class poloniex(Exchange, ImplicitAPI):
2018
2019
  depositWithdrawFees[code]['networks'] = self.extend(depositWithdrawFees[code]['networks'], networkObject)
2019
2020
  return depositWithdrawFees
2020
2021
 
2021
- def parse_deposit_withdraw_fee(self, fee, currency=None):
2022
+ def parse_deposit_withdraw_fee(self, fee, currency: Currency = None):
2022
2023
  depositWithdrawFee = self.deposit_withdraw_fee({})
2023
- depositWithdrawFee['info'][currency] = fee
2024
+ depositWithdrawFee['info'][currency['code']] = fee
2024
2025
  networkId = self.safe_string(fee, 'blockchain')
2025
2026
  withdrawFee = self.safe_number(fee, 'withdrawalFee')
2026
2027
  withdrawResult = {
@@ -2040,7 +2041,7 @@ class poloniex(Exchange, ImplicitAPI):
2040
2041
  }
2041
2042
  return depositWithdrawFee
2042
2043
 
2043
- 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]:
2044
2045
  """
2045
2046
  fetch all deposits made to an account
2046
2047
  :see: https://docs.poloniex.com/#authenticated-endpoints-wallets-wallets-activity-records
@@ -2071,7 +2072,7 @@ class poloniex(Exchange, ImplicitAPI):
2071
2072
  }
2072
2073
  return self.safe_string(statuses, status, status)
2073
2074
 
2074
- def parse_transaction(self, transaction, currency=None) -> Transaction:
2075
+ def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2075
2076
  #
2076
2077
  # deposits
2077
2078
  #