ccxt 4.3.29__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 (260) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/binance.py +2 -0
  3. ccxt/abstract/binancecoinm.py +2 -0
  4. ccxt/abstract/binanceus.py +2 -0
  5. ccxt/abstract/binanceusdm.py +2 -0
  6. ccxt/ace.py +14 -14
  7. ccxt/alpaca.py +16 -16
  8. ccxt/ascendex.py +46 -46
  9. ccxt/async_support/__init__.py +1 -1
  10. ccxt/async_support/ace.py +14 -14
  11. ccxt/async_support/alpaca.py +16 -16
  12. ccxt/async_support/ascendex.py +46 -46
  13. ccxt/async_support/base/exchange.py +23 -23
  14. ccxt/async_support/base/ws/aiohttp_client.py +1 -0
  15. ccxt/async_support/base/ws/future.py +27 -29
  16. ccxt/async_support/bigone.py +32 -32
  17. ccxt/async_support/binance.py +105 -96
  18. ccxt/async_support/bingx.py +22 -22
  19. ccxt/async_support/bit2c.py +13 -13
  20. ccxt/async_support/bitbank.py +19 -19
  21. ccxt/async_support/bitbns.py +17 -17
  22. ccxt/async_support/bitfinex.py +24 -24
  23. ccxt/async_support/bitfinex2.py +142 -109
  24. ccxt/async_support/bitflyer.py +23 -23
  25. ccxt/async_support/bitget.py +76 -76
  26. ccxt/async_support/bithumb.py +20 -20
  27. ccxt/async_support/bitmart.py +55 -55
  28. ccxt/async_support/bitmex.py +41 -41
  29. ccxt/async_support/bitopro.py +30 -30
  30. ccxt/async_support/bitrue.py +37 -37
  31. ccxt/async_support/bitso.py +30 -30
  32. ccxt/async_support/bitstamp.py +31 -31
  33. ccxt/async_support/bitteam.py +26 -26
  34. ccxt/async_support/bitvavo.py +27 -27
  35. ccxt/async_support/bl3p.py +8 -8
  36. ccxt/async_support/blockchaincom.py +24 -24
  37. ccxt/async_support/blofin.py +37 -37
  38. ccxt/async_support/btcalpha.py +19 -19
  39. ccxt/async_support/btcbox.py +11 -11
  40. ccxt/async_support/btcmarkets.py +22 -22
  41. ccxt/async_support/btcturk.py +13 -13
  42. ccxt/async_support/bybit.py +96 -96
  43. ccxt/async_support/cex.py +21 -21
  44. ccxt/async_support/coinbase.py +53 -53
  45. ccxt/async_support/coinbaseexchange.py +29 -29
  46. ccxt/async_support/coinbaseinternational.py +32 -32
  47. ccxt/async_support/coincheck.py +14 -14
  48. ccxt/async_support/coinex.py +424 -448
  49. ccxt/async_support/coinlist.py +35 -35
  50. ccxt/async_support/coinmate.py +22 -22
  51. ccxt/async_support/coinmetro.py +22 -22
  52. ccxt/async_support/coinone.py +18 -18
  53. ccxt/async_support/coinsph.py +32 -32
  54. ccxt/async_support/coinspot.py +8 -8
  55. ccxt/async_support/cryptocom.py +43 -43
  56. ccxt/async_support/currencycom.py +33 -33
  57. ccxt/async_support/delta.py +35 -35
  58. ccxt/async_support/deribit.py +54 -54
  59. ccxt/async_support/digifinex.py +56 -56
  60. ccxt/async_support/exmo.py +34 -34
  61. ccxt/async_support/gate.py +60 -60
  62. ccxt/async_support/gemini.py +24 -24
  63. ccxt/async_support/hitbtc.py +51 -51
  64. ccxt/async_support/hollaex.py +29 -29
  65. ccxt/async_support/htx.py +73 -73
  66. ccxt/async_support/huobijp.py +30 -30
  67. ccxt/async_support/hyperliquid.py +58 -58
  68. ccxt/async_support/idex.py +33 -33
  69. ccxt/async_support/independentreserve.py +12 -12
  70. ccxt/async_support/indodax.py +21 -21
  71. ccxt/async_support/kraken.py +46 -51
  72. ccxt/async_support/krakenfutures.py +29 -29
  73. ccxt/async_support/kucoin.py +51 -51
  74. ccxt/async_support/kucoinfutures.py +33 -33
  75. ccxt/async_support/kuna.py +27 -27
  76. ccxt/async_support/latoken.py +27 -27
  77. ccxt/async_support/lbank.py +35 -35
  78. ccxt/async_support/luno.py +19 -19
  79. ccxt/async_support/lykke.py +20 -20
  80. ccxt/async_support/mercado.py +17 -17
  81. ccxt/async_support/mexc.py +64 -64
  82. ccxt/async_support/ndax.py +38 -38
  83. ccxt/async_support/novadax.py +26 -26
  84. ccxt/async_support/oceanex.py +21 -21
  85. ccxt/async_support/okcoin.py +35 -35
  86. ccxt/async_support/okx.py +85 -85
  87. ccxt/async_support/onetrading.py +32 -32
  88. ccxt/async_support/p2b.py +14 -14
  89. ccxt/async_support/paymium.py +12 -12
  90. ccxt/async_support/phemex.py +50 -50
  91. ccxt/async_support/poloniex.py +35 -35
  92. ccxt/async_support/poloniexfutures.py +25 -21
  93. ccxt/async_support/probit.py +30 -30
  94. ccxt/async_support/timex.py +22 -22
  95. ccxt/async_support/tokocrypto.py +26 -26
  96. ccxt/async_support/tradeogre.py +12 -12
  97. ccxt/async_support/upbit.py +28 -28
  98. ccxt/async_support/wavesexchange.py +33 -33
  99. ccxt/async_support/wazirx.py +21 -21
  100. ccxt/async_support/whitebit.py +80 -40
  101. ccxt/async_support/woo.py +51 -51
  102. ccxt/async_support/woofipro.py +46 -46
  103. ccxt/async_support/yobit.py +20 -20
  104. ccxt/async_support/zaif.py +12 -12
  105. ccxt/async_support/zonda.py +22 -22
  106. ccxt/base/exchange.py +39 -35
  107. ccxt/base/types.py +13 -0
  108. ccxt/bigone.py +32 -32
  109. ccxt/binance.py +105 -96
  110. ccxt/bingx.py +22 -22
  111. ccxt/bit2c.py +13 -13
  112. ccxt/bitbank.py +19 -19
  113. ccxt/bitbns.py +17 -17
  114. ccxt/bitfinex.py +24 -24
  115. ccxt/bitfinex2.py +142 -109
  116. ccxt/bitflyer.py +23 -23
  117. ccxt/bitget.py +76 -76
  118. ccxt/bithumb.py +20 -20
  119. ccxt/bitmart.py +55 -55
  120. ccxt/bitmex.py +41 -41
  121. ccxt/bitopro.py +30 -30
  122. ccxt/bitrue.py +37 -37
  123. ccxt/bitso.py +30 -30
  124. ccxt/bitstamp.py +31 -31
  125. ccxt/bitteam.py +26 -26
  126. ccxt/bitvavo.py +27 -27
  127. ccxt/bl3p.py +8 -8
  128. ccxt/blockchaincom.py +24 -24
  129. ccxt/blofin.py +37 -37
  130. ccxt/btcalpha.py +19 -19
  131. ccxt/btcbox.py +11 -11
  132. ccxt/btcmarkets.py +22 -22
  133. ccxt/btcturk.py +13 -13
  134. ccxt/bybit.py +96 -96
  135. ccxt/cex.py +21 -21
  136. ccxt/coinbase.py +53 -53
  137. ccxt/coinbaseexchange.py +29 -29
  138. ccxt/coinbaseinternational.py +32 -32
  139. ccxt/coincheck.py +14 -14
  140. ccxt/coinex.py +424 -448
  141. ccxt/coinlist.py +35 -35
  142. ccxt/coinmate.py +22 -22
  143. ccxt/coinmetro.py +22 -22
  144. ccxt/coinone.py +18 -18
  145. ccxt/coinsph.py +32 -32
  146. ccxt/coinspot.py +8 -8
  147. ccxt/cryptocom.py +43 -43
  148. ccxt/currencycom.py +33 -33
  149. ccxt/delta.py +35 -35
  150. ccxt/deribit.py +54 -54
  151. ccxt/digifinex.py +56 -56
  152. ccxt/exmo.py +34 -34
  153. ccxt/gate.py +60 -60
  154. ccxt/gemini.py +24 -24
  155. ccxt/hitbtc.py +51 -51
  156. ccxt/hollaex.py +29 -29
  157. ccxt/htx.py +73 -73
  158. ccxt/huobijp.py +30 -30
  159. ccxt/hyperliquid.py +58 -58
  160. ccxt/idex.py +33 -33
  161. ccxt/independentreserve.py +12 -12
  162. ccxt/indodax.py +21 -21
  163. ccxt/kraken.py +46 -51
  164. ccxt/krakenfutures.py +29 -29
  165. ccxt/kucoin.py +51 -51
  166. ccxt/kucoinfutures.py +33 -33
  167. ccxt/kuna.py +27 -27
  168. ccxt/latoken.py +27 -27
  169. ccxt/lbank.py +35 -35
  170. ccxt/luno.py +19 -19
  171. ccxt/lykke.py +20 -20
  172. ccxt/mercado.py +17 -17
  173. ccxt/mexc.py +64 -64
  174. ccxt/ndax.py +38 -38
  175. ccxt/novadax.py +26 -26
  176. ccxt/oceanex.py +21 -21
  177. ccxt/okcoin.py +35 -35
  178. ccxt/okx.py +85 -85
  179. ccxt/onetrading.py +32 -32
  180. ccxt/p2b.py +14 -14
  181. ccxt/paymium.py +12 -12
  182. ccxt/phemex.py +50 -50
  183. ccxt/poloniex.py +35 -35
  184. ccxt/poloniexfutures.py +25 -21
  185. ccxt/pro/__init__.py +1 -1
  186. ccxt/pro/alpaca.py +8 -8
  187. ccxt/pro/ascendex.py +4 -4
  188. ccxt/pro/binance.py +56 -56
  189. ccxt/pro/bingx.py +5 -5
  190. ccxt/pro/bitfinex.py +6 -6
  191. ccxt/pro/bitfinex2.py +10 -10
  192. ccxt/pro/bitget.py +17 -17
  193. ccxt/pro/bithumb.py +6 -6
  194. ccxt/pro/bitmart.py +8 -8
  195. ccxt/pro/bitmex.py +16 -16
  196. ccxt/pro/bitopro.py +4 -4
  197. ccxt/pro/bitrue.py +8 -8
  198. ccxt/pro/bitstamp.py +5 -5
  199. ccxt/pro/bitvavo.py +14 -14
  200. ccxt/pro/blockchaincom.py +7 -7
  201. ccxt/pro/bybit.py +12 -12
  202. ccxt/pro/cex.py +19 -19
  203. ccxt/pro/coinbase.py +2 -2
  204. ccxt/pro/coinbaseexchange.py +10 -10
  205. ccxt/pro/coinbaseinternational.py +4 -4
  206. ccxt/pro/coincheck.py +2 -2
  207. ccxt/pro/coinex.py +15 -15
  208. ccxt/pro/coinone.py +4 -4
  209. ccxt/pro/cryptocom.py +11 -11
  210. ccxt/pro/currencycom.py +4 -4
  211. ccxt/pro/deribit.py +9 -9
  212. ccxt/pro/exmo.py +9 -9
  213. ccxt/pro/gate.py +12 -12
  214. ccxt/pro/gemini.py +11 -11
  215. ccxt/pro/hitbtc.py +13 -13
  216. ccxt/pro/hollaex.py +6 -6
  217. ccxt/pro/htx.py +15 -15
  218. ccxt/pro/huobijp.py +16 -16
  219. ccxt/pro/hyperliquid.py +9 -9
  220. ccxt/pro/idex.py +12 -12
  221. ccxt/pro/independentreserve.py +2 -2
  222. ccxt/pro/kraken.py +14 -14
  223. ccxt/pro/krakenfutures.py +12 -12
  224. ccxt/pro/kucoin.py +12 -12
  225. ccxt/pro/kucoinfutures.py +16 -16
  226. ccxt/pro/lbank.py +12 -12
  227. ccxt/pro/luno.py +4 -4
  228. ccxt/pro/mexc.py +14 -14
  229. ccxt/pro/ndax.py +12 -12
  230. ccxt/pro/okcoin.py +6 -6
  231. ccxt/pro/okx.py +30 -30
  232. ccxt/pro/onetrading.py +13 -13
  233. ccxt/pro/p2b.py +2 -2
  234. ccxt/pro/phemex.py +9 -9
  235. ccxt/pro/poloniex.py +9 -9
  236. ccxt/pro/poloniexfutures.py +10 -10
  237. ccxt/pro/probit.py +8 -8
  238. ccxt/pro/upbit.py +1 -1
  239. ccxt/pro/wazirx.py +10 -10
  240. ccxt/pro/whitebit.py +8 -8
  241. ccxt/pro/woo.py +14 -14
  242. ccxt/pro/woofipro.py +14 -14
  243. ccxt/probit.py +30 -30
  244. ccxt/test/base/test_shared_methods.py +1 -0
  245. ccxt/timex.py +22 -22
  246. ccxt/tokocrypto.py +26 -26
  247. ccxt/tradeogre.py +12 -12
  248. ccxt/upbit.py +28 -28
  249. ccxt/wavesexchange.py +33 -33
  250. ccxt/wazirx.py +21 -21
  251. ccxt/whitebit.py +80 -40
  252. ccxt/woo.py +51 -51
  253. ccxt/woofipro.py +46 -46
  254. ccxt/yobit.py +20 -20
  255. ccxt/zaif.py +12 -12
  256. ccxt/zonda.py +22 -22
  257. {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/METADATA +4 -4
  258. {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/RECORD +260 -260
  259. {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/WHEEL +0 -0
  260. {ccxt-4.3.29.dist-info → ccxt-4.3.31.dist-info}/top_level.txt +0 -0
ccxt/pro/kraken.py CHANGED
@@ -222,7 +222,7 @@ class kraken(ccxt.async_support.kraken):
222
222
  url = self.urls['api']['ws']['private']
223
223
  requestId = self.request_id()
224
224
  messageHash = requestId
225
- request = {
225
+ request: dict = {
226
226
  'event': 'cancelOrder',
227
227
  'token': token,
228
228
  'reqid': requestId,
@@ -246,7 +246,7 @@ class kraken(ccxt.async_support.kraken):
246
246
  messageHash = requestId
247
247
  clientOrderId = self.safe_value_2(params, 'userref', 'clientOrderId', id)
248
248
  params = self.omit(params, ['userref', 'clientOrderId'])
249
- request = {
249
+ request: dict = {
250
250
  'event': 'cancelOrder',
251
251
  'token': token,
252
252
  'reqid': requestId,
@@ -281,7 +281,7 @@ class kraken(ccxt.async_support.kraken):
281
281
  url = self.urls['api']['ws']['private']
282
282
  requestId = self.request_id()
283
283
  messageHash = requestId
284
- request = {
284
+ request: dict = {
285
285
  'event': 'cancelAll',
286
286
  'token': token,
287
287
  'reqid': requestId,
@@ -446,7 +446,7 @@ class kraken(ccxt.async_support.kraken):
446
446
  messageHash = name + ':' + wsName
447
447
  url = self.urls['api']['ws']['public']
448
448
  requestId = self.request_id()
449
- subscribe = {
449
+ subscribe: dict = {
450
450
  'event': 'subscribe',
451
451
  'reqid': requestId,
452
452
  'pair': [
@@ -482,7 +482,7 @@ class kraken(ccxt.async_support.kraken):
482
482
  symbols = self.market_symbols(symbols, None, False)
483
483
  ticker = await self.watch_multi_helper('ticker', 'ticker', symbols, None, params)
484
484
  if self.newUpdates:
485
- result = {}
485
+ result: dict = {}
486
486
  result[ticker['symbol']] = ticker
487
487
  return result
488
488
  return self.filter_by_array(self.tickers, 'symbol', symbols)
@@ -536,7 +536,7 @@ class kraken(ccxt.async_support.kraken):
536
536
  :param dict [params]: extra parameters specific to the exchange API endpoint
537
537
  :returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
538
538
  """
539
- request = {}
539
+ request: dict = {}
540
540
  if limit is not None:
541
541
  if self.in_array(limit, [10, 25, 100, 500, 1000]):
542
542
  request['subscription'] = {
@@ -565,7 +565,7 @@ class kraken(ccxt.async_support.kraken):
565
565
  messageHash = name + ':' + timeframe + ':' + wsName
566
566
  url = self.urls['api']['ws']['public']
567
567
  requestId = self.request_id()
568
- subscribe = {
568
+ subscribe: dict = {
569
569
  'event': 'subscribe',
570
570
  'reqid': requestId,
571
571
  'pair': [
@@ -672,7 +672,7 @@ class kraken(ccxt.async_support.kraken):
672
672
  # todo get depth from marketsByWsName
673
673
  self.orderbooks[symbol] = self.order_book({}, depth)
674
674
  orderbook = self.orderbooks[symbol]
675
- sides = {
675
+ sides: dict = {
676
676
  'as': 'asks',
677
677
  'bs': 'bids',
678
678
  }
@@ -814,7 +814,7 @@ class kraken(ccxt.async_support.kraken):
814
814
  messageHash += ':' + symbol
815
815
  url = self.urls['api']['ws']['private']
816
816
  requestId = self.request_id()
817
- subscribe = {
817
+ subscribe: dict = {
818
818
  'event': 'subscribe',
819
819
  'reqid': requestId,
820
820
  'subscription': {
@@ -885,7 +885,7 @@ class kraken(ccxt.async_support.kraken):
885
885
  limit = self.safe_integer(self.options, 'tradesLimit', 1000)
886
886
  self.myTrades = ArrayCache(limit)
887
887
  stored = self.myTrades
888
- symbols = {}
888
+ symbols: dict = {}
889
889
  for i in range(0, len(allTrades)):
890
890
  trades = self.safe_value(allTrades, i, {})
891
891
  ids = list(trades.keys())
@@ -1074,7 +1074,7 @@ class kraken(ccxt.async_support.kraken):
1074
1074
  if self.orders is None:
1075
1075
  self.orders = ArrayCacheBySymbolById(limit)
1076
1076
  stored = self.orders
1077
- symbols = {}
1077
+ symbols: dict = {}
1078
1078
  for i in range(0, len(allOrders)):
1079
1079
  orders = self.safe_value(allOrders, i, {})
1080
1080
  ids = list(orders.keys())
@@ -1236,7 +1236,7 @@ class kraken(ccxt.async_support.kraken):
1236
1236
  for i in range(0, len(markets)):
1237
1237
  wsMarketId = self.safe_string(markets[i]['info'], 'wsname')
1238
1238
  wsMarketIds.append(wsMarketId)
1239
- request = {
1239
+ request: dict = {
1240
1240
  'event': 'subscribe',
1241
1241
  'reqid': self.request_id(),
1242
1242
  'pair': wsMarketIds,
@@ -1326,7 +1326,7 @@ class kraken(ccxt.async_support.kraken):
1326
1326
  messageLength = len(message)
1327
1327
  channelName = self.safe_string(message, messageLength - 2)
1328
1328
  name = self.safe_string(info, 'name')
1329
- methods = {
1329
+ methods: dict = {
1330
1330
  # public
1331
1331
  'book': self.handle_order_book,
1332
1332
  'ohlc': self.handle_ohlcv,
@@ -1342,7 +1342,7 @@ class kraken(ccxt.async_support.kraken):
1342
1342
  else:
1343
1343
  if self.handle_error_message(client, message):
1344
1344
  event = self.safe_string(message, 'event')
1345
- methods = {
1345
+ methods: dict = {
1346
1346
  'heartbeat': self.handle_heartbeat,
1347
1347
  'systemStatus': self.handle_system_status,
1348
1348
  'subscriptionStatus': self.handle_subscription_status,
ccxt/pro/krakenfutures.py CHANGED
@@ -84,7 +84,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
84
84
  client = self.client(url)
85
85
  future = self.safe_value(client.subscriptions, messageHash)
86
86
  if future is None:
87
- request = {
87
+ request: dict = {
88
88
  'event': 'challenge',
89
89
  'api_key': self.apiKey,
90
90
  }
@@ -116,7 +116,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
116
116
  """
117
117
  await self.load_markets()
118
118
  url = self.urls['api']['ws']
119
- subscribe = {
119
+ subscribe: dict = {
120
120
  'event': 'subscribe',
121
121
  'feed': name,
122
122
  }
@@ -147,7 +147,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
147
147
  await self.load_markets()
148
148
  await self.authenticate()
149
149
  url = self.urls['api']['ws']
150
- subscribe = {
150
+ subscribe: dict = {
151
151
  'event': 'subscribe',
152
152
  'feed': name,
153
153
  'api_key': self.apiKey,
@@ -182,7 +182,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
182
182
  symbols = self.market_symbols(symbols, None, False)
183
183
  ticker = await self.watch_multi_helper('ticker', 'ticker', symbols, None, params)
184
184
  if self.newUpdates:
185
- result = {}
185
+ result: dict = {}
186
186
  result[ticker['symbol']] = ticker
187
187
  return result
188
188
  return self.filter_by_array(self.tickers, 'symbol', symbols)
@@ -197,7 +197,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
197
197
  """
198
198
  ticker = await self.watch_multi_helper('bidask', 'ticker_lite', symbols, None, params)
199
199
  if self.newUpdates:
200
- result = {}
200
+ result: dict = {}
201
201
  result[ticker['symbol']] = ticker
202
202
  return result
203
203
  return self.filter_by_array(self.bidsasks, 'symbol', symbols)
@@ -763,7 +763,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
763
763
  orders = self.safe_value(message, 'orders', [])
764
764
  limit = self.safe_integer(self.options, 'ordersLimit')
765
765
  self.orders = ArrayCacheBySymbolById(limit)
766
- symbols = {}
766
+ symbols: dict = {}
767
767
  cachedOrders = self.orders
768
768
  for i in range(0, len(orders)):
769
769
  order = orders[i]
@@ -1242,7 +1242,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
1242
1242
  timestamp = self.safe_integer(message, 'timestamp')
1243
1243
  if holding is not None:
1244
1244
  holdingKeys = list(holding.keys()) # cashAccount
1245
- holdingResult = {
1245
+ holdingResult: dict = {
1246
1246
  'info': message,
1247
1247
  'timestamp': timestamp,
1248
1248
  'datetime': self.iso8601(timestamp),
@@ -1258,7 +1258,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
1258
1258
  client.resolve(holdingResult, messageHash)
1259
1259
  if futures is not None:
1260
1260
  futuresKeys = list(futures.keys()) # marginAccount
1261
- futuresResult = {
1261
+ futuresResult: dict = {
1262
1262
  'info': message,
1263
1263
  'timestamp': timestamp,
1264
1264
  'datetime': self.iso8601(timestamp),
@@ -1281,7 +1281,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
1281
1281
  if flexFutures is not None:
1282
1282
  flexFutureCurrencies = self.safe_value(flexFutures, 'currencies', {})
1283
1283
  flexFuturesKeys = list(flexFutureCurrencies.keys()) # multi-collateral margin account
1284
- flexFuturesResult = {
1284
+ flexFuturesResult: dict = {
1285
1285
  'info': message,
1286
1286
  'timestamp': timestamp,
1287
1287
  'datetime': self.iso8601(timestamp),
@@ -1332,7 +1332,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
1332
1332
  limit = self.safe_integer(self.options, 'tradesLimit', 1000)
1333
1333
  stored = ArrayCacheBySymbolById(limit)
1334
1334
  self.myTrades = stored
1335
- tradeSymbols = {}
1335
+ tradeSymbols: dict = {}
1336
1336
  for i in range(0, len(trades)):
1337
1337
  trade = trades[i]
1338
1338
  parsedTrade = self.parse_ws_my_trade(trade)
@@ -1397,7 +1397,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
1397
1397
  for i in range(0, len(symbols)):
1398
1398
  messageHashes.append(self.get_message_hash(unifiedName, None, self.symbol(symbols[i])))
1399
1399
  marketIds = self.market_ids(symbols)
1400
- request = {
1400
+ request: dict = {
1401
1401
  'event': 'subscribe',
1402
1402
  'feed': channelName,
1403
1403
  'product_ids': marketIds,
@@ -1441,7 +1441,7 @@ class krakenfutures(ccxt.async_support.krakenfutures):
1441
1441
  client.lastPong = self.milliseconds()
1442
1442
  elif event is None:
1443
1443
  feed = self.safe_string(message, 'feed')
1444
- methods = {
1444
+ methods: dict = {
1445
1445
  'ticker': self.handle_ticker,
1446
1446
  'ticker_lite': self.handle_bid_ask,
1447
1447
  'trade': self.handle_trade,
ccxt/pro/kucoin.py CHANGED
@@ -122,7 +122,7 @@ class kucoin(ccxt.async_support.kucoin):
122
122
 
123
123
  async def subscribe(self, url, messageHash, subscriptionHash, params={}, subscription=None):
124
124
  requestId = str(self.request_id())
125
- request = {
125
+ request: dict = {
126
126
  'id': requestId,
127
127
  'type': 'subscribe',
128
128
  'topic': subscriptionHash,
@@ -136,7 +136,7 @@ class kucoin(ccxt.async_support.kucoin):
136
136
 
137
137
  async def subscribe_multiple(self, url, messageHashes, topic, subscriptionHashes, params={}, subscription=None):
138
138
  requestId = str(self.request_id())
139
- request = {
139
+ request: dict = {
140
140
  'id': requestId,
141
141
  'type': 'subscribe',
142
142
  'topic': topic,
@@ -200,7 +200,7 @@ class kucoin(ccxt.async_support.kucoin):
200
200
  symbolsTopic = method + ':' + ','.join(marketIds)
201
201
  tickers = await self.subscribe_multiple(url, messageHashes, symbolsTopic, topics, params)
202
202
  if self.newUpdates:
203
- newDict = {}
203
+ newDict: dict = {}
204
204
  newDict[tickers['symbol']] = tickers
205
205
  return newDict
206
206
  return self.filter_by_array(self.tickers, 'symbol', symbols)
@@ -279,7 +279,7 @@ class kucoin(ccxt.async_support.kucoin):
279
279
  messageHash = 'ticker:' + symbol
280
280
  client.resolve(ticker, messageHash)
281
281
  # watchTickers
282
- allTickers = {}
282
+ allTickers: dict = {}
283
283
  allTickers[symbol] = ticker
284
284
  client.resolve(allTickers, 'tickers')
285
285
 
@@ -293,7 +293,7 @@ class kucoin(ccxt.async_support.kucoin):
293
293
  """
294
294
  ticker = await self.watch_multi_helper('watchBidsAsks', '/spotMarket/level1:', symbols, params)
295
295
  if self.newUpdates:
296
- tickers = {}
296
+ tickers: dict = {}
297
297
  tickers[ticker['symbol']] = ticker
298
298
  return tickers
299
299
  return self.filter_by_array(self.bidsasks, 'symbol', symbols)
@@ -313,7 +313,7 @@ class kucoin(ccxt.async_support.kucoin):
313
313
  marketIds = self.market_ids(symbols)
314
314
  joined = ','.join(marketIds)
315
315
  requestId = str(self.request_id())
316
- request = {
316
+ request: dict = {
317
317
  'id': requestId,
318
318
  'type': 'subscribe',
319
319
  'topic': channelName + joined,
@@ -753,7 +753,7 @@ class kucoin(ccxt.async_support.kucoin):
753
753
  params = self.omit(params, ['stop', 'trigger'])
754
754
  url = await self.negotiate(True)
755
755
  topic = '/spotMarket/advancedOrders' if stop else '/spotMarket/tradeOrders'
756
- request = {
756
+ request: dict = {
757
757
  'privateChannel': True,
758
758
  }
759
759
  messageHash = 'orders'
@@ -767,7 +767,7 @@ class kucoin(ccxt.async_support.kucoin):
767
767
  return self.filter_by_symbol_since_limit(orders, symbol, since, limit, True)
768
768
 
769
769
  def parse_ws_order_status(self, status):
770
- statuses = {
770
+ statuses: dict = {
771
771
  'open': 'open',
772
772
  'filled': 'closed',
773
773
  'match': 'open',
@@ -907,7 +907,7 @@ class kucoin(ccxt.async_support.kucoin):
907
907
  await self.load_markets()
908
908
  url = await self.negotiate(True)
909
909
  topic = '/spot/tradeFills'
910
- request = {
910
+ request: dict = {
911
911
  'privateChannel': True,
912
912
  }
913
913
  messageHash = 'myTrades'
@@ -991,7 +991,7 @@ class kucoin(ccxt.async_support.kucoin):
991
991
  await self.load_markets()
992
992
  url = await self.negotiate(True)
993
993
  topic = '/account/balance'
994
- request = {
994
+ request: dict = {
995
995
  'privateChannel': True,
996
996
  }
997
997
  messageHash = 'balance'
@@ -1070,7 +1070,7 @@ class kucoin(ccxt.async_support.kucoin):
1070
1070
  self.handle_ticker(client, message)
1071
1071
  return
1072
1072
  subject = self.safe_string(message, 'subject')
1073
- methods = {
1073
+ methods: dict = {
1074
1074
  'level1': self.handle_bid_ask,
1075
1075
  'level2': self.handle_order_book,
1076
1076
  'trade.l2update': self.handle_order_book,
@@ -1120,7 +1120,7 @@ class kucoin(ccxt.async_support.kucoin):
1120
1120
 
1121
1121
  def handle_message(self, client: Client, message):
1122
1122
  type = self.safe_string(message, 'type')
1123
- methods = {
1123
+ methods: dict = {
1124
1124
  # 'heartbeat': self.handleHeartbeat,
1125
1125
  'welcome': self.handle_system_status,
1126
1126
  'ack': self.handle_subscription_status,
ccxt/pro/kucoinfutures.py CHANGED
@@ -145,14 +145,14 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
145
145
 
146
146
  async def subscribe(self, url, messageHash, subscriptionHash, subscription, params={}):
147
147
  requestId = str(self.request_id())
148
- request = {
148
+ request: dict = {
149
149
  'id': requestId,
150
150
  'type': 'subscribe',
151
151
  'topic': subscriptionHash,
152
152
  'response': True,
153
153
  }
154
154
  message = self.extend(request, params)
155
- subscriptionRequest = {
155
+ subscriptionRequest: dict = {
156
156
  'id': requestId,
157
157
  }
158
158
  if subscription is None:
@@ -163,7 +163,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
163
163
 
164
164
  async def subscribe_multiple(self, url, messageHashes, topic, subscriptionHashes, subscriptionArgs, params={}):
165
165
  requestId = str(self.request_id())
166
- request = {
166
+ request: dict = {
167
167
  'id': requestId,
168
168
  'type': 'subscribe',
169
169
  'topic': topic,
@@ -196,7 +196,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
196
196
  await self.load_markets()
197
197
  ticker = await self.watch_multi_request('watchTickers', '/contractMarket/ticker:', symbols, params)
198
198
  if self.newUpdates:
199
- tickers = {}
199
+ tickers: dict = {}
200
200
  tickers[ticker['symbol']] = ticker
201
201
  return tickers
202
202
  return self.filter_by_array(self.tickers, 'symbol', symbols)
@@ -240,7 +240,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
240
240
  """
241
241
  ticker = await self.watch_multi_request('watchBidsAsks', '/contractMarket/tickerV2:', symbols, params)
242
242
  if self.newUpdates:
243
- tickers = {}
243
+ tickers: dict = {}
244
244
  tickers[ticker['symbol']] = ticker
245
245
  return tickers
246
246
  return self.filter_by_array(self.bidsasks, 'symbol', symbols)
@@ -263,13 +263,13 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
263
263
  marketIds = self.market_ids(symbols)
264
264
  joined = ','.join(marketIds)
265
265
  requestId = str(self.request_id())
266
- request = {
266
+ request: dict = {
267
267
  'id': requestId,
268
268
  'type': 'subscribe',
269
269
  'topic': channelName + joined,
270
270
  'response': True,
271
271
  }
272
- subscription = {
272
+ subscription: dict = {
273
273
  'id': requestId,
274
274
  }
275
275
  return await self.watch_multiple(url, messageHashes, self.extend(request, params), messageHashes, subscription)
@@ -327,7 +327,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
327
327
  url = await self.negotiate(True)
328
328
  market = self.market(symbol)
329
329
  topic = '/contract/position:' + market['id']
330
- request = {
330
+ request: dict = {
331
331
  'privateChannel': True,
332
332
  }
333
333
  messageHash = 'position:' + market['symbol']
@@ -663,7 +663,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
663
663
  marketIds = self.market_ids(symbols)
664
664
  url = await self.negotiate(False)
665
665
  topic = '/contractMarket/level2:' + ','.join(marketIds)
666
- subscriptionArgs = {
666
+ subscriptionArgs: dict = {
667
667
  'limit': limit,
668
668
  }
669
669
  subscriptionHashes = []
@@ -790,7 +790,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
790
790
  await self.load_markets()
791
791
  url = await self.negotiate(True)
792
792
  topic = '/contractMarket/tradeOrders'
793
- request = {
793
+ request: dict = {
794
794
  'privateChannel': True,
795
795
  }
796
796
  messageHash = 'orders'
@@ -804,7 +804,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
804
804
  return self.filter_by_symbol_since_limit(orders, symbol, since, limit, True)
805
805
 
806
806
  def parse_ws_order_status(self, status):
807
- statuses = {
807
+ statuses: dict = {
808
808
  'open': 'open',
809
809
  'filled': 'closed',
810
810
  'match': 'open',
@@ -903,10 +903,10 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
903
903
  await self.load_markets()
904
904
  url = await self.negotiate(True)
905
905
  topic = '/contractAccount/wallet'
906
- request = {
906
+ request: dict = {
907
907
  'privateChannel': True,
908
908
  }
909
- subscription = {
909
+ subscription: dict = {
910
910
  'method': self.handle_balance_subscription,
911
911
  }
912
912
  messageHash = 'balance'
@@ -948,7 +948,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
948
948
  self.check_required_credentials()
949
949
  messageHash = 'balance'
950
950
  selectedType = self.safe_string_2(self.options, 'watchBalance', 'defaultType', 'swap') # spot, margin, main, funding, future, mining, trade, contract, pool
951
- params = {
951
+ params: dict = {
952
952
  'type': selectedType,
953
953
  }
954
954
  snapshot = await self.fetch_balance(params)
@@ -1007,7 +1007,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
1007
1007
  # }
1008
1008
  #
1009
1009
  subject = self.safe_string(message, 'subject')
1010
- methods = {
1010
+ methods: dict = {
1011
1011
  'level2': self.handle_order_book,
1012
1012
  'ticker': self.handle_ticker,
1013
1013
  'candle.stick': self.handle_ohlcv,
@@ -1065,7 +1065,7 @@ class kucoinfutures(ccxt.async_support.kucoinfutures):
1065
1065
 
1066
1066
  def handle_message(self, client: Client, message):
1067
1067
  type = self.safe_string(message, 'type')
1068
- methods = {
1068
+ methods: dict = {
1069
1069
  # 'heartbeat': self.handleHeartbeat,
1070
1070
  'welcome': self.handle_system_status,
1071
1071
  'message': self.handle_subject,
ccxt/pro/lbank.py CHANGED
@@ -82,7 +82,7 @@ class lbank(ccxt.async_support.lbank):
82
82
  timeframes = self.safe_value(watchOHLCVOptions, 'timeframes', {})
83
83
  timeframeId = self.safe_string(timeframes, timeframe, timeframe)
84
84
  messageHash = 'fetchOHLCV:' + market['symbol'] + ':' + timeframeId
85
- message = {
85
+ message: dict = {
86
86
  'action': 'request',
87
87
  'request': 'kbar',
88
88
  'kbar': timeframeId,
@@ -114,7 +114,7 @@ class lbank(ccxt.async_support.lbank):
114
114
  timeframeId = self.safe_string(timeframes, timeframe, timeframe)
115
115
  messageHash = 'ohlcv:' + market['symbol'] + ':' + timeframeId
116
116
  url = self.urls['api']['ws']
117
- subscribe = {
117
+ subscribe: dict = {
118
118
  'action': 'subscribe',
119
119
  'subscribe': 'kbar',
120
120
  'kbar': timeframeId,
@@ -239,7 +239,7 @@ class lbank(ccxt.async_support.lbank):
239
239
  market = self.market(symbol)
240
240
  url = self.urls['api']['ws']
241
241
  messageHash = 'fetchTicker:' + market['symbol']
242
- message = {
242
+ message: dict = {
243
243
  'action': 'request',
244
244
  'request': 'tick',
245
245
  'pair': market['id'],
@@ -260,7 +260,7 @@ class lbank(ccxt.async_support.lbank):
260
260
  market = self.market(symbol)
261
261
  url = self.urls['api']['ws']
262
262
  messageHash = 'ticker:' + market['symbol']
263
- message = {
263
+ message: dict = {
264
264
  'action': 'subscribe',
265
265
  'subscribe': 'tick',
266
266
  'pair': market['id'],
@@ -365,7 +365,7 @@ class lbank(ccxt.async_support.lbank):
365
365
  messageHash = 'fetchTrades:' + market['symbol']
366
366
  if limit is None:
367
367
  limit = 10
368
- message = {
368
+ message: dict = {
369
369
  'action': 'request',
370
370
  'request': 'trade',
371
371
  'pair': market['id'],
@@ -389,7 +389,7 @@ class lbank(ccxt.async_support.lbank):
389
389
  market = self.market(symbol)
390
390
  url = self.urls['api']['ws']
391
391
  messageHash = 'trades:' + market['symbol']
392
- message = {
392
+ message: dict = {
393
393
  'action': 'subscribe',
394
394
  'subscribe': 'trade',
395
395
  'pair': market['id'],
@@ -502,7 +502,7 @@ class lbank(ccxt.async_support.lbank):
502
502
  symbol = self.symbol(symbol)
503
503
  messageHash = 'orders:' + market['symbol']
504
504
  pair = market['id']
505
- message = {
505
+ message: dict = {
506
506
  'action': 'subscribe',
507
507
  'subscribe': 'orderUpdate',
508
508
  'subscribeKey': key,
@@ -628,7 +628,7 @@ class lbank(ccxt.async_support.lbank):
628
628
  }, market)
629
629
 
630
630
  def parse_ws_order_status(self, status):
631
- statuses = {
631
+ statuses: dict = {
632
632
  '-1': 'canceled', # Withdrawn
633
633
  '0': 'open', # Unsettled
634
634
  '1': 'open', # Partial sale
@@ -652,7 +652,7 @@ class lbank(ccxt.async_support.lbank):
652
652
  messageHash = 'fetchOrderbook:' + market['symbol']
653
653
  if limit is None:
654
654
  limit = 100
655
- subscribe = {
655
+ subscribe: dict = {
656
656
  'action': 'request',
657
657
  'request': 'depth',
658
658
  'depth': limit,
@@ -679,7 +679,7 @@ class lbank(ccxt.async_support.lbank):
679
679
  params = self.omit(params, 'aggregation')
680
680
  if limit is None:
681
681
  limit = 100
682
- subscribe = {
682
+ subscribe: dict = {
683
683
  'action': 'subscribe',
684
684
  'subscribe': 'depth',
685
685
  'depth': limit,
@@ -794,7 +794,7 @@ class lbank(ccxt.async_support.lbank):
794
794
  if type == 'ping':
795
795
  self.spawn(self.handle_ping, client, message)
796
796
  return
797
- handlers = {
797
+ handlers: dict = {
798
798
  'kbar': self.handle_ohlcv,
799
799
  'depth': self.handle_order_book,
800
800
  'trade': self.handle_trades,
@@ -829,7 +829,7 @@ class lbank(ccxt.async_support.lbank):
829
829
  else:
830
830
  expires = self.safe_integer(authenticated, 'expires', 0)
831
831
  if expires < now:
832
- request = {
832
+ request: dict = {
833
833
  'subscribeKey': authenticated['key'],
834
834
  }
835
835
  response = await self.spotPrivatePostSubscribeRefreshKey(self.extend(request, params))
ccxt/pro/luno.py CHANGED
@@ -53,10 +53,10 @@ class luno(ccxt.async_support.luno):
53
53
  market = self.market(symbol)
54
54
  symbol = market['symbol']
55
55
  subscriptionHash = '/stream/' + market['id']
56
- subscription = {'symbol': symbol}
56
+ subscription: dict = {'symbol': symbol}
57
57
  url = self.urls['api']['ws'] + subscriptionHash
58
58
  messageHash = 'trades:' + symbol
59
- subscribe = {
59
+ subscribe: dict = {
60
60
  'api_key_id': self.apiKey,
61
61
  'api_key_secret': self.secret,
62
62
  }
@@ -144,10 +144,10 @@ class luno(ccxt.async_support.luno):
144
144
  market = self.market(symbol)
145
145
  symbol = market['symbol']
146
146
  subscriptionHash = '/stream/' + market['id']
147
- subscription = {'symbol': symbol}
147
+ subscription: dict = {'symbol': symbol}
148
148
  url = self.urls['api']['ws'] + subscriptionHash
149
149
  messageHash = 'orderbook:' + symbol
150
- subscribe = {
150
+ subscribe: dict = {
151
151
  'api_key_id': self.apiKey,
152
152
  'api_key_secret': self.secret,
153
153
  }