ccxt 4.3.30__py2.py3-none-any.whl → 4.3.31__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +2 -0
  3. ccxt/abstract/binancecoinm.py +2 -0
  4. ccxt/abstract/binanceus.py +2 -0
  5. ccxt/abstract/binanceusdm.py +2 -0
  6. ccxt/ace.py +14 -14
  7. ccxt/alpaca.py +16 -16
  8. ccxt/ascendex.py +46 -46
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +14 -14
  11. ccxt/async_support/alpaca.py +16 -16
  12. ccxt/async_support/ascendex.py +46 -46
  13. ccxt/async_support/base/exchange.py +23 -23
  14. ccxt/async_support/bigone.py +32 -32
  15. ccxt/async_support/binance.py +105 -96
  16. ccxt/async_support/bingx.py +21 -21
  17. ccxt/async_support/bit2c.py +13 -13
  18. ccxt/async_support/bitbank.py +19 -19
  19. ccxt/async_support/bitbns.py +17 -17
  20. ccxt/async_support/bitfinex.py +24 -24
  21. ccxt/async_support/bitfinex2.py +142 -109
  22. ccxt/async_support/bitflyer.py +23 -23
  23. ccxt/async_support/bitget.py +76 -76
  24. ccxt/async_support/bithumb.py +20 -20
  25. ccxt/async_support/bitmart.py +55 -55
  26. ccxt/async_support/bitmex.py +41 -41
  27. ccxt/async_support/bitopro.py +30 -30
  28. ccxt/async_support/bitrue.py +37 -37
  29. ccxt/async_support/bitso.py +30 -30
  30. ccxt/async_support/bitstamp.py +31 -31
  31. ccxt/async_support/bitteam.py +26 -26
  32. ccxt/async_support/bitvavo.py +27 -27
  33. ccxt/async_support/bl3p.py +8 -8
  34. ccxt/async_support/blockchaincom.py +24 -24
  35. ccxt/async_support/blofin.py +37 -37
  36. ccxt/async_support/btcalpha.py +19 -19
  37. ccxt/async_support/btcbox.py +11 -11
  38. ccxt/async_support/btcmarkets.py +22 -22
  39. ccxt/async_support/btcturk.py +13 -13
  40. ccxt/async_support/bybit.py +96 -96
  41. ccxt/async_support/cex.py +21 -21
  42. ccxt/async_support/coinbase.py +53 -53
  43. ccxt/async_support/coinbaseexchange.py +29 -29
  44. ccxt/async_support/coinbaseinternational.py +32 -32
  45. ccxt/async_support/coincheck.py +14 -14
  46. ccxt/async_support/coinex.py +168 -139
  47. ccxt/async_support/coinlist.py +35 -35
  48. ccxt/async_support/coinmate.py +22 -22
  49. ccxt/async_support/coinmetro.py +22 -22
  50. ccxt/async_support/coinone.py +18 -18
  51. ccxt/async_support/coinsph.py +32 -32
  52. ccxt/async_support/coinspot.py +8 -8
  53. ccxt/async_support/cryptocom.py +43 -43
  54. ccxt/async_support/currencycom.py +33 -33
  55. ccxt/async_support/delta.py +35 -35
  56. ccxt/async_support/deribit.py +54 -54
  57. ccxt/async_support/digifinex.py +56 -56
  58. ccxt/async_support/exmo.py +34 -34
  59. ccxt/async_support/gate.py +60 -60
  60. ccxt/async_support/gemini.py +24 -24
  61. ccxt/async_support/hitbtc.py +51 -51
  62. ccxt/async_support/hollaex.py +29 -29
  63. ccxt/async_support/htx.py +73 -73
  64. ccxt/async_support/huobijp.py +30 -30
  65. ccxt/async_support/hyperliquid.py +58 -58
  66. ccxt/async_support/idex.py +33 -33
  67. ccxt/async_support/independentreserve.py +12 -12
  68. ccxt/async_support/indodax.py +21 -21
  69. ccxt/async_support/kraken.py +46 -51
  70. ccxt/async_support/krakenfutures.py +29 -29
  71. ccxt/async_support/kucoin.py +51 -51
  72. ccxt/async_support/kucoinfutures.py +33 -33
  73. ccxt/async_support/kuna.py +27 -27
  74. ccxt/async_support/latoken.py +27 -27
  75. ccxt/async_support/lbank.py +35 -35
  76. ccxt/async_support/luno.py +19 -19
  77. ccxt/async_support/lykke.py +20 -20
  78. ccxt/async_support/mercado.py +17 -17
  79. ccxt/async_support/mexc.py +64 -64
  80. ccxt/async_support/ndax.py +38 -38
  81. ccxt/async_support/novadax.py +26 -26
  82. ccxt/async_support/oceanex.py +21 -21
  83. ccxt/async_support/okcoin.py +35 -35
  84. ccxt/async_support/okx.py +85 -85
  85. ccxt/async_support/onetrading.py +32 -32
  86. ccxt/async_support/p2b.py +14 -14
  87. ccxt/async_support/paymium.py +12 -12
  88. ccxt/async_support/phemex.py +50 -50
  89. ccxt/async_support/poloniex.py +35 -35
  90. ccxt/async_support/poloniexfutures.py +25 -21
  91. ccxt/async_support/probit.py +30 -30
  92. ccxt/async_support/timex.py +22 -22
  93. ccxt/async_support/tokocrypto.py +26 -26
  94. ccxt/async_support/tradeogre.py +12 -12
  95. ccxt/async_support/upbit.py +28 -28
  96. ccxt/async_support/wavesexchange.py +33 -33
  97. ccxt/async_support/wazirx.py +21 -21
  98. ccxt/async_support/whitebit.py +37 -37
  99. ccxt/async_support/woo.py +51 -51
  100. ccxt/async_support/woofipro.py +46 -46
  101. ccxt/async_support/yobit.py +20 -20
  102. ccxt/async_support/zaif.py +12 -12
  103. ccxt/async_support/zonda.py +22 -22
  104. ccxt/base/exchange.py +35 -35
  105. ccxt/base/types.py +13 -0
  106. ccxt/bigone.py +32 -32
  107. ccxt/binance.py +105 -96
  108. ccxt/bingx.py +21 -21
  109. ccxt/bit2c.py +13 -13
  110. ccxt/bitbank.py +19 -19
  111. ccxt/bitbns.py +17 -17
  112. ccxt/bitfinex.py +24 -24
  113. ccxt/bitfinex2.py +142 -109
  114. ccxt/bitflyer.py +23 -23
  115. ccxt/bitget.py +76 -76
  116. ccxt/bithumb.py +20 -20
  117. ccxt/bitmart.py +55 -55
  118. ccxt/bitmex.py +41 -41
  119. ccxt/bitopro.py +30 -30
  120. ccxt/bitrue.py +37 -37
  121. ccxt/bitso.py +30 -30
  122. ccxt/bitstamp.py +31 -31
  123. ccxt/bitteam.py +26 -26
  124. ccxt/bitvavo.py +27 -27
  125. ccxt/bl3p.py +8 -8
  126. ccxt/blockchaincom.py +24 -24
  127. ccxt/blofin.py +37 -37
  128. ccxt/btcalpha.py +19 -19
  129. ccxt/btcbox.py +11 -11
  130. ccxt/btcmarkets.py +22 -22
  131. ccxt/btcturk.py +13 -13
  132. ccxt/bybit.py +96 -96
  133. ccxt/cex.py +21 -21
  134. ccxt/coinbase.py +53 -53
  135. ccxt/coinbaseexchange.py +29 -29
  136. ccxt/coinbaseinternational.py +32 -32
  137. ccxt/coincheck.py +14 -14
  138. ccxt/coinex.py +168 -139
  139. ccxt/coinlist.py +35 -35
  140. ccxt/coinmate.py +22 -22
  141. ccxt/coinmetro.py +22 -22
  142. ccxt/coinone.py +18 -18
  143. ccxt/coinsph.py +32 -32
  144. ccxt/coinspot.py +8 -8
  145. ccxt/cryptocom.py +43 -43
  146. ccxt/currencycom.py +33 -33
  147. ccxt/delta.py +35 -35
  148. ccxt/deribit.py +54 -54
  149. ccxt/digifinex.py +56 -56
  150. ccxt/exmo.py +34 -34
  151. ccxt/gate.py +60 -60
  152. ccxt/gemini.py +24 -24
  153. ccxt/hitbtc.py +51 -51
  154. ccxt/hollaex.py +29 -29
  155. ccxt/htx.py +73 -73
  156. ccxt/huobijp.py +30 -30
  157. ccxt/hyperliquid.py +58 -58
  158. ccxt/idex.py +33 -33
  159. ccxt/independentreserve.py +12 -12
  160. ccxt/indodax.py +21 -21
  161. ccxt/kraken.py +46 -51
  162. ccxt/krakenfutures.py +29 -29
  163. ccxt/kucoin.py +51 -51
  164. ccxt/kucoinfutures.py +33 -33
  165. ccxt/kuna.py +27 -27
  166. ccxt/latoken.py +27 -27
  167. ccxt/lbank.py +35 -35
  168. ccxt/luno.py +19 -19
  169. ccxt/lykke.py +20 -20
  170. ccxt/mercado.py +17 -17
  171. ccxt/mexc.py +64 -64
  172. ccxt/ndax.py +38 -38
  173. ccxt/novadax.py +26 -26
  174. ccxt/oceanex.py +21 -21
  175. ccxt/okcoin.py +35 -35
  176. ccxt/okx.py +85 -85
  177. ccxt/onetrading.py +32 -32
  178. ccxt/p2b.py +14 -14
  179. ccxt/paymium.py +12 -12
  180. ccxt/phemex.py +50 -50
  181. ccxt/poloniex.py +35 -35
  182. ccxt/poloniexfutures.py +25 -21
  183. ccxt/pro/__init__.py +1 -1
  184. ccxt/pro/alpaca.py +8 -8
  185. ccxt/pro/ascendex.py +4 -4
  186. ccxt/pro/binance.py +56 -56
  187. ccxt/pro/bingx.py +5 -5
  188. ccxt/pro/bitfinex.py +6 -6
  189. ccxt/pro/bitfinex2.py +10 -10
  190. ccxt/pro/bitget.py +17 -17
  191. ccxt/pro/bithumb.py +6 -6
  192. ccxt/pro/bitmart.py +8 -8
  193. ccxt/pro/bitmex.py +16 -16
  194. ccxt/pro/bitopro.py +4 -4
  195. ccxt/pro/bitrue.py +8 -8
  196. ccxt/pro/bitstamp.py +5 -5
  197. ccxt/pro/bitvavo.py +14 -14
  198. ccxt/pro/blockchaincom.py +7 -7
  199. ccxt/pro/bybit.py +12 -12
  200. ccxt/pro/cex.py +19 -19
  201. ccxt/pro/coinbase.py +2 -2
  202. ccxt/pro/coinbaseexchange.py +10 -10
  203. ccxt/pro/coinbaseinternational.py +4 -4
  204. ccxt/pro/coincheck.py +2 -2
  205. ccxt/pro/coinex.py +15 -15
  206. ccxt/pro/coinone.py +4 -4
  207. ccxt/pro/cryptocom.py +11 -11
  208. ccxt/pro/currencycom.py +4 -4
  209. ccxt/pro/deribit.py +9 -9
  210. ccxt/pro/exmo.py +9 -9
  211. ccxt/pro/gate.py +12 -12
  212. ccxt/pro/gemini.py +11 -11
  213. ccxt/pro/hitbtc.py +13 -13
  214. ccxt/pro/hollaex.py +6 -6
  215. ccxt/pro/htx.py +15 -15
  216. ccxt/pro/huobijp.py +16 -16
  217. ccxt/pro/hyperliquid.py +9 -9
  218. ccxt/pro/idex.py +12 -12
  219. ccxt/pro/independentreserve.py +2 -2
  220. ccxt/pro/kraken.py +14 -14
  221. ccxt/pro/krakenfutures.py +12 -12
  222. ccxt/pro/kucoin.py +12 -12
  223. ccxt/pro/kucoinfutures.py +16 -16
  224. ccxt/pro/lbank.py +12 -12
  225. ccxt/pro/luno.py +4 -4
  226. ccxt/pro/mexc.py +14 -14
  227. ccxt/pro/ndax.py +12 -12
  228. ccxt/pro/okcoin.py +6 -6
  229. ccxt/pro/okx.py +30 -30
  230. ccxt/pro/onetrading.py +13 -13
  231. ccxt/pro/p2b.py +2 -2
  232. ccxt/pro/phemex.py +9 -9
  233. ccxt/pro/poloniex.py +9 -9
  234. ccxt/pro/poloniexfutures.py +10 -10
  235. ccxt/pro/probit.py +8 -8
  236. ccxt/pro/upbit.py +1 -1
  237. ccxt/pro/wazirx.py +10 -10
  238. ccxt/pro/whitebit.py +8 -8
  239. ccxt/pro/woo.py +14 -14
  240. ccxt/pro/woofipro.py +14 -14
  241. ccxt/probit.py +30 -30
  242. ccxt/test/base/test_shared_methods.py +1 -0
  243. ccxt/timex.py +22 -22
  244. ccxt/tokocrypto.py +26 -26
  245. ccxt/tradeogre.py +12 -12
  246. ccxt/upbit.py +28 -28
  247. ccxt/wavesexchange.py +33 -33
  248. ccxt/wazirx.py +21 -21
  249. ccxt/whitebit.py +37 -37
  250. ccxt/woo.py +51 -51
  251. ccxt/woofipro.py +46 -46
  252. ccxt/yobit.py +20 -20
  253. ccxt/zaif.py +12 -12
  254. ccxt/zonda.py +22 -22
  255. {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
  256. {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/RECORD +258 -258
  257. {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
  258. {ccxt-4.3.30.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
@@ -441,7 +441,7 @@ class poloniex(Exchange, ImplicitAPI):
441
441
  if paginate:
442
442
  return await self.fetch_paginated_call_deterministic('fetchOHLCV', symbol, since, limit, timeframe, params, 500)
443
443
  market = self.market(symbol)
444
- request = {
444
+ request: dict = {
445
445
  'symbol': market['id'],
446
446
  'interval': self.safe_string(self.timeframes, timeframe, timeframe),
447
447
  }
@@ -705,7 +705,7 @@ class poloniex(Exchange, ImplicitAPI):
705
705
  # }
706
706
  # ]
707
707
  #
708
- result = {}
708
+ result: dict = {}
709
709
  for i in range(0, len(response)):
710
710
  item = self.safe_value(response, i)
711
711
  ids = list(item.keys())
@@ -789,7 +789,7 @@ class poloniex(Exchange, ImplicitAPI):
789
789
  }
790
790
  result[code]['networks'] = networks
791
791
  info = self.safe_value(result[code], 'info', [])
792
- rawInfo = {}
792
+ rawInfo: dict = {}
793
793
  rawInfo[id] = currency
794
794
  info.append(rawInfo)
795
795
  result[code]['info'] = info
@@ -812,7 +812,7 @@ class poloniex(Exchange, ImplicitAPI):
812
812
  """
813
813
  await self.load_markets()
814
814
  market = self.market(symbol)
815
- request = {
815
+ request: dict = {
816
816
  'symbol': market['id'],
817
817
  }
818
818
  response = await self.publicGetMarketsSymbolTicker24h(self.extend(request, params))
@@ -840,7 +840,7 @@ class poloniex(Exchange, ImplicitAPI):
840
840
  #
841
841
  return self.parse_ticker(response, market)
842
842
 
843
- def parse_trade(self, trade, market: Market = None) -> Trade:
843
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
844
844
  #
845
845
  # fetchTrades
846
846
  #
@@ -942,7 +942,7 @@ class poloniex(Exchange, ImplicitAPI):
942
942
  """
943
943
  await self.load_markets()
944
944
  market = self.market(symbol)
945
- request = {
945
+ request: dict = {
946
946
  'symbol': market['id'],
947
947
  }
948
948
  if limit is not None:
@@ -983,7 +983,7 @@ class poloniex(Exchange, ImplicitAPI):
983
983
  market: Market = None
984
984
  if symbol is not None:
985
985
  market = self.market(symbol)
986
- request = {
986
+ request: dict = {
987
987
  # 'from': 12345678, # A 'trade Id'. The query begins at ‘from'.
988
988
  # 'direction': 'PRE', # PRE, NEXT The direction before or after ‘from'.
989
989
  }
@@ -1017,8 +1017,8 @@ class poloniex(Exchange, ImplicitAPI):
1017
1017
  result = self.parse_trades(response, market, since, limit)
1018
1018
  return result
1019
1019
 
1020
- def parse_order_status(self, status):
1021
- statuses = {
1020
+ def parse_order_status(self, status: Str):
1021
+ statuses: dict = {
1022
1022
  'NEW': 'open',
1023
1023
  'PARTIALLY_FILLED': 'open',
1024
1024
  'FILLED': 'closed',
@@ -1029,7 +1029,7 @@ class poloniex(Exchange, ImplicitAPI):
1029
1029
  }
1030
1030
  return self.safe_string(statuses, status, status)
1031
1031
 
1032
- def parse_order(self, order, market: Market = None) -> Order:
1032
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1033
1033
  #
1034
1034
  # fetchOpenOrder
1035
1035
  #
@@ -1142,7 +1142,7 @@ class poloniex(Exchange, ImplicitAPI):
1142
1142
  }, market)
1143
1143
 
1144
1144
  def parse_order_type(self, status):
1145
- statuses = {
1145
+ statuses: dict = {
1146
1146
  'MARKET': 'market',
1147
1147
  'LIMIT': 'limit',
1148
1148
  'STOP-LIMIT': 'limit',
@@ -1176,7 +1176,7 @@ class poloniex(Exchange, ImplicitAPI):
1176
1176
  """
1177
1177
  await self.load_markets()
1178
1178
  market: Market = None
1179
- request = {}
1179
+ request: dict = {}
1180
1180
  if symbol is not None:
1181
1181
  market = self.market(symbol)
1182
1182
  request['symbol'] = market['id']
@@ -1212,7 +1212,7 @@ class poloniex(Exchange, ImplicitAPI):
1212
1212
  # }
1213
1213
  # ]
1214
1214
  #
1215
- extension = {'status': 'open'}
1215
+ extension: dict = {'status': 'open'}
1216
1216
  return self.parse_orders(response, market, since, limit, extension)
1217
1217
 
1218
1218
  async def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
@@ -1234,7 +1234,7 @@ class poloniex(Exchange, ImplicitAPI):
1234
1234
  market = self.market(symbol)
1235
1235
  if not market['spot']:
1236
1236
  raise NotSupported(self.id + ' createOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted')
1237
- request = {
1237
+ request: dict = {
1238
1238
  'symbol': market['id'],
1239
1239
  'side': side,
1240
1240
  # 'timeInForce': timeInForce,
@@ -1322,7 +1322,7 @@ class poloniex(Exchange, ImplicitAPI):
1322
1322
  market = self.market(symbol)
1323
1323
  if not market['spot']:
1324
1324
  raise NotSupported(self.id + ' editOrder() does not support ' + market['type'] + ' orders, only spot orders are accepted')
1325
- request = {
1325
+ request: dict = {
1326
1326
  'id': id,
1327
1327
  # 'timeInForce': timeInForce,
1328
1328
  }
@@ -1358,7 +1358,7 @@ class poloniex(Exchange, ImplicitAPI):
1358
1358
  # @returns {object} An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1359
1359
  #
1360
1360
  await self.load_markets()
1361
- request = {}
1361
+ request: dict = {}
1362
1362
  clientOrderId = self.safe_value(params, 'clientOrderId')
1363
1363
  if clientOrderId is not None:
1364
1364
  id = clientOrderId
@@ -1392,7 +1392,7 @@ class poloniex(Exchange, ImplicitAPI):
1392
1392
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1393
1393
  """
1394
1394
  await self.load_markets()
1395
- request = {
1395
+ request: dict = {
1396
1396
  # 'accountTypes': 'SPOT',
1397
1397
  'symbols': [],
1398
1398
  }
@@ -1441,7 +1441,7 @@ class poloniex(Exchange, ImplicitAPI):
1441
1441
  """
1442
1442
  await self.load_markets()
1443
1443
  id = str(id)
1444
- request = {
1444
+ request: dict = {
1445
1445
  'id': id,
1446
1446
  }
1447
1447
  isTrigger = self.safe_value_2(params, 'trigger', 'stop')
@@ -1495,7 +1495,7 @@ class poloniex(Exchange, ImplicitAPI):
1495
1495
  :returns dict[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
1496
1496
  """
1497
1497
  await self.load_markets()
1498
- request = {
1498
+ request: dict = {
1499
1499
  'id': id,
1500
1500
  }
1501
1501
  trades = await self.privateGetOrdersIdTrades(self.extend(request, params))
@@ -1523,7 +1523,7 @@ class poloniex(Exchange, ImplicitAPI):
1523
1523
  return self.parse_trades(trades)
1524
1524
 
1525
1525
  def parse_balance(self, response) -> Balances:
1526
- result = {
1526
+ result: dict = {
1527
1527
  'info': response,
1528
1528
  'timestamp': None,
1529
1529
  'datetime': None,
@@ -1549,7 +1549,7 @@ class poloniex(Exchange, ImplicitAPI):
1549
1549
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
1550
1550
  """
1551
1551
  await self.load_markets()
1552
- request = {
1552
+ request: dict = {
1553
1553
  'accountType': 'SPOT',
1554
1554
  }
1555
1555
  response = await self.privateGetAccountsBalances(self.extend(request, params))
@@ -1588,7 +1588,7 @@ class poloniex(Exchange, ImplicitAPI):
1588
1588
  # "volume30D" : "0.00"
1589
1589
  # }
1590
1590
  #
1591
- result = {}
1591
+ result: dict = {}
1592
1592
  for i in range(0, len(self.symbols)):
1593
1593
  symbol = self.symbols[i]
1594
1594
  result[symbol] = {
@@ -1612,7 +1612,7 @@ class poloniex(Exchange, ImplicitAPI):
1612
1612
  """
1613
1613
  await self.load_markets()
1614
1614
  market = self.market(symbol)
1615
- request = {
1615
+ request: dict = {
1616
1616
  'symbol': market['id'],
1617
1617
  }
1618
1618
  if limit is not None:
@@ -1661,7 +1661,7 @@ class poloniex(Exchange, ImplicitAPI):
1661
1661
  """
1662
1662
  await self.load_markets()
1663
1663
  currency = self.currency(code)
1664
- request = {
1664
+ request: dict = {
1665
1665
  'currency': currency['id'],
1666
1666
  }
1667
1667
  networks = self.safe_value(self.options, 'networks', {})
@@ -1705,7 +1705,7 @@ class poloniex(Exchange, ImplicitAPI):
1705
1705
  """
1706
1706
  await self.load_markets()
1707
1707
  currency = self.currency(code)
1708
- request = {
1708
+ request: dict = {
1709
1709
  'currency': currency['id'],
1710
1710
  }
1711
1711
  networks = self.safe_value(self.options, 'networks', {})
@@ -1755,7 +1755,7 @@ class poloniex(Exchange, ImplicitAPI):
1755
1755
  accountsByType = self.safe_value(self.options, 'accountsByType', {})
1756
1756
  fromId = self.safe_string(accountsByType, fromAccount, fromAccount)
1757
1757
  toId = self.safe_string(accountsByType, toAccount, fromAccount)
1758
- request = {
1758
+ request: dict = {
1759
1759
  'amount': self.currency_to_precision(code, amount),
1760
1760
  'currency': currency['id'],
1761
1761
  'fromAccount': fromId,
@@ -1802,7 +1802,7 @@ class poloniex(Exchange, ImplicitAPI):
1802
1802
  self.check_address(address)
1803
1803
  await self.load_markets()
1804
1804
  currency = self.currency(code)
1805
- request = {
1805
+ request: dict = {
1806
1806
  'currency': currency['id'],
1807
1807
  'amount': amount,
1808
1808
  'address': address,
@@ -1830,7 +1830,7 @@ class poloniex(Exchange, ImplicitAPI):
1830
1830
  year = 31104000 # 60 * 60 * 24 * 30 * 12 = one year of history, why not
1831
1831
  now = self.seconds()
1832
1832
  start = self.parse_to_int(since / 1000) if (since is not None) else now - 10 * year
1833
- request = {
1833
+ request: dict = {
1834
1834
  'start': start, # UNIX timestamp, required
1835
1835
  'end': now, # UNIX timestamp, required
1836
1836
  }
@@ -1981,7 +1981,7 @@ class poloniex(Exchange, ImplicitAPI):
1981
1981
  # }
1982
1982
  # ]
1983
1983
  #
1984
- data = {}
1984
+ data: dict = {}
1985
1985
  for i in range(0, len(response)):
1986
1986
  entry = response[i]
1987
1987
  currencies = list(entry.keys())
@@ -2011,7 +2011,7 @@ class poloniex(Exchange, ImplicitAPI):
2011
2011
  # },
2012
2012
  # }
2013
2013
  #
2014
- depositWithdrawFees = {}
2014
+ depositWithdrawFees: dict = {}
2015
2015
  codes = self.market_codes(codes)
2016
2016
  responseKeys = list(response.keys())
2017
2017
  for i in range(0, len(responseKeys)):
@@ -2029,7 +2029,7 @@ class poloniex(Exchange, ImplicitAPI):
2029
2029
  networkId = networkId.replace(code, '')
2030
2030
  networkCode = self.network_id_to_code(networkId)
2031
2031
  networkInfo = self.safe_value(response, networkId)
2032
- networkObject = {}
2032
+ networkObject: dict = {}
2033
2033
  withdrawFee = self.safe_number(networkInfo, 'withdrawalFee')
2034
2034
  networkObject[networkCode] = {
2035
2035
  'withdraw': {
@@ -2049,11 +2049,11 @@ class poloniex(Exchange, ImplicitAPI):
2049
2049
  depositWithdrawFee['info'][currency['code']] = fee
2050
2050
  networkId = self.safe_string(fee, 'blockchain')
2051
2051
  withdrawFee = self.safe_number(fee, 'withdrawalFee')
2052
- withdrawResult = {
2052
+ withdrawResult: dict = {
2053
2053
  'fee': withdrawFee,
2054
2054
  'percentage': False if (withdrawFee is not None) else None,
2055
2055
  }
2056
- depositResult = {
2056
+ depositResult: dict = {
2057
2057
  'fee': None,
2058
2058
  'percentage': None,
2059
2059
  }
@@ -2085,7 +2085,7 @@ class poloniex(Exchange, ImplicitAPI):
2085
2085
  return self.filter_by_currency_since_limit(transactions, code, since, limit)
2086
2086
 
2087
2087
  def parse_transaction_status(self, status):
2088
- statuses = {
2088
+ statuses: dict = {
2089
2089
  'COMPLETE': 'ok',
2090
2090
  'COMPLETED': 'ok',
2091
2091
  'AWAITING APPROVAL': 'pending',
@@ -2097,7 +2097,7 @@ class poloniex(Exchange, ImplicitAPI):
2097
2097
  }
2098
2098
  return self.safe_string(statuses, status, status)
2099
2099
 
2100
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
2100
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
2101
2101
  #
2102
2102
  # deposits
2103
2103
  #
@@ -383,9 +383,12 @@ class poloniexfutures(Exchange, ImplicitAPI):
383
383
  marketId = self.safe_string(ticker, 'symbol')
384
384
  symbol = self.safe_symbol(marketId, market)
385
385
  timestampString = self.safe_string(ticker, 'ts')
386
- # check timestamp bcz bug: https://app.travis-ci.com/github/ccxt/ccxt/builds/269959181#L4011 and also 17 digits occured
387
386
  multiplier = None
388
- if len(timestampString) == 17:
387
+ if len(timestampString) == 16:
388
+ # 16 digits: https://app.travis-ci.com/github/ccxt/ccxt/builds/270587157#L5454
389
+ multiplier = 0.001
390
+ elif len(timestampString) == 17:
391
+ # 17 digits: https://app.travis-ci.com/github/ccxt/ccxt/builds/269959181#L4011
389
392
  multiplier = 0.0001
390
393
  elif len(timestampString) == 18:
391
394
  multiplier = 0.00001
@@ -428,7 +431,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
428
431
  """
429
432
  await self.load_markets()
430
433
  market = self.market(symbol)
431
- request = {
434
+ request: dict = {
432
435
  'symbol': market['id'],
433
436
  }
434
437
  response = await self.publicGetTicker(self.extend(request, params))
@@ -462,7 +465,8 @@ class poloniexfutures(Exchange, ImplicitAPI):
462
465
  """
463
466
  await self.load_markets()
464
467
  response = await self.publicGetTickers(params)
465
- return self.parse_tickers(self.safe_value(response, 'data', []), symbols)
468
+ data = self.safe_list(response, 'data', [])
469
+ return self.parse_tickers(data, symbols)
466
470
 
467
471
  async def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
468
472
  """
@@ -480,7 +484,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
480
484
  if level is not None and level != 2 and level != 3:
481
485
  raise BadRequest(self.id + ' fetchOrderBook() can only return level 2 & 3')
482
486
  market = self.market(symbol)
483
- request = {
487
+ request: dict = {
484
488
  'symbol': market['id'],
485
489
  }
486
490
  response = None
@@ -557,7 +561,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
557
561
  market = self.market(symbol)
558
562
  return self.fetch_order_book(market['id'], None, {'level': 3})
559
563
 
560
- def parse_trade(self, trade, market: Market = None) -> Trade:
564
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
561
565
  #
562
566
  # fetchTrades(public)
563
567
  #
@@ -655,7 +659,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
655
659
  """
656
660
  await self.load_markets()
657
661
  market = self.market(symbol)
658
- request = {
662
+ request: dict = {
659
663
  'symbol': market['id'],
660
664
  }
661
665
  response = await self.publicGetTradeHistory(self.extend(request, params))
@@ -710,7 +714,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
710
714
  market = self.market(symbol)
711
715
  marketId = market['id']
712
716
  parsedTimeframe = self.safe_integer(self.timeframes, timeframe)
713
- request = {
717
+ request: dict = {
714
718
  'symbol': marketId,
715
719
  }
716
720
  if parsedTimeframe is not None:
@@ -743,7 +747,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
743
747
  return self.parse_ohlcvs(data, market, timeframe, since, limit)
744
748
 
745
749
  def parse_balance(self, response) -> Balances:
746
- result = {
750
+ result: dict = {
747
751
  'info': response,
748
752
  'timestamp': None,
749
753
  'datetime': None,
@@ -766,7 +770,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
766
770
  """
767
771
  await self.load_markets()
768
772
  currencyId = self.safe_string(params, 'currency')
769
- request = {}
773
+ request: dict = {}
770
774
  if currencyId is not None:
771
775
  currency = self.currency(currencyId)
772
776
  request = {
@@ -821,7 +825,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
821
825
  if amount < 1:
822
826
  raise InvalidOrder(self.id + ' createOrder() minimum contract order amount is 1')
823
827
  preciseAmount = int(self.amount_to_precision(symbol, amount))
824
- request = {
828
+ request: dict = {
825
829
  'clientOid': clientOrderId,
826
830
  'side': side,
827
831
  'symbol': market['id'],
@@ -897,7 +901,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
897
901
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
898
902
  """
899
903
  await self.load_markets()
900
- request = {
904
+ request: dict = {
901
905
  'order-id': id,
902
906
  }
903
907
  response = await self.privateDeleteOrdersOrderId(self.extend(request, params))
@@ -983,7 +987,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
983
987
  data = self.safe_list(response, 'data')
984
988
  return self.parse_positions(data, symbols)
985
989
 
986
- def parse_position(self, position, market: Market = None):
990
+ def parse_position(self, position: dict, market: Market = None):
987
991
  #
988
992
  # {
989
993
  # "code": "200000",
@@ -1088,7 +1092,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1088
1092
  raise ArgumentsRequired(self.id + ' fetchFundingHistory() requires a symbol argument')
1089
1093
  await self.load_markets()
1090
1094
  market = self.market(symbol)
1091
- request = {
1095
+ request: dict = {
1092
1096
  'symbol': market['id'],
1093
1097
  }
1094
1098
  if since is not None:
@@ -1150,7 +1154,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1150
1154
  :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1151
1155
  """
1152
1156
  await self.load_markets()
1153
- request = {}
1157
+ request: dict = {}
1154
1158
  if symbol is not None:
1155
1159
  request['symbol'] = self.market_id(symbol)
1156
1160
  stop = self.safe_value_2(params, 'stop', 'trigger')
@@ -1223,7 +1227,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1223
1227
  params = self.omit(params, ['trigger', 'stop', 'until'])
1224
1228
  if status == 'closed':
1225
1229
  status = 'done'
1226
- request = {}
1230
+ request: dict = {}
1227
1231
  if not stop:
1228
1232
  request['status'] = 'active' if (status == 'open') else 'done'
1229
1233
  elif status != 'open':
@@ -1341,7 +1345,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1341
1345
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
1342
1346
  """
1343
1347
  await self.load_markets()
1344
- request = {}
1348
+ request: dict = {}
1345
1349
  response = None
1346
1350
  if id is None:
1347
1351
  clientOrderId = self.safe_string_2(params, 'clientOid', 'clientOrderId')
@@ -1402,7 +1406,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1402
1406
  responseData = self.safe_dict(response, 'data')
1403
1407
  return self.parse_order(responseData, market)
1404
1408
 
1405
- def parse_order(self, order, market: Market = None) -> Order:
1409
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1406
1410
  #
1407
1411
  # createOrder
1408
1412
  #
@@ -1532,7 +1536,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1532
1536
  """
1533
1537
  await self.load_markets()
1534
1538
  market = self.market(symbol)
1535
- request = {
1539
+ request: dict = {
1536
1540
  'symbol': market['id'],
1537
1541
  }
1538
1542
  response = await self.publicGetFundingRateSymbolCurrent(self.extend(request, params))
@@ -1583,7 +1587,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1583
1587
  :returns Trade[]: a list of `trade structures <https://docs.ccxt.com/#/?id=trade-structure>`
1584
1588
  """
1585
1589
  await self.load_markets()
1586
- request = {
1590
+ request: dict = {
1587
1591
  }
1588
1592
  market = None
1589
1593
  if symbol is not None:
@@ -1648,7 +1652,7 @@ class poloniexfutures(Exchange, ImplicitAPI):
1648
1652
  if marginMode == 'cross':
1649
1653
  marginMode = '1'
1650
1654
  market = self.market(symbol)
1651
- request = {
1655
+ request: dict = {
1652
1656
  'symbol': market['id'],
1653
1657
  'marginType': self.parse_to_int(marginMode),
1654
1658
  }