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/coinex.py CHANGED
@@ -238,7 +238,7 @@ class coinex(ccxt.async_support.coinex):
238
238
  type, params = self.handle_market_type_and_params('watchBalance', None, params)
239
239
  url = self.urls['api']['ws'][type]
240
240
  currencies = list(self.currencies_by_id.keys())
241
- subscribe = {
241
+ subscribe: dict = {
242
242
  'method': 'asset.subscribe',
243
243
  'params': currencies,
244
244
  'id': self.request_id(),
@@ -425,7 +425,7 @@ class coinex(ccxt.async_support.coinex):
425
425
  messageHash = 'tickers'
426
426
  if symbols is not None:
427
427
  messageHash = 'tickers::' + ','.join(symbols)
428
- subscribe = {
428
+ subscribe: dict = {
429
429
  'method': 'state.subscribe',
430
430
  'id': self.request_id(),
431
431
  'params': [],
@@ -456,7 +456,7 @@ class coinex(ccxt.async_support.coinex):
456
456
  subscriptionHash = 'trades'
457
457
  subscribedSymbols = self.safe_value(self.options, 'watchTradesSubscriptions', [])
458
458
  subscribedSymbols.append(market['id'])
459
- message = {
459
+ message: dict = {
460
460
  'method': 'deals.subscribe',
461
461
  'params': subscribedSymbols,
462
462
  'id': self.request_id(),
@@ -498,7 +498,7 @@ class coinex(ccxt.async_support.coinex):
498
498
  params = self.omit(params, 'aggregation')
499
499
  watchOrderBookSubscriptions = self.safe_value(self.options, 'watchOrderBookSubscriptions', {})
500
500
  watchOrderBookSubscriptions[symbol] = [market['id'], limit, aggregation, True]
501
- subscribe = {
501
+ subscribe: dict = {
502
502
  'method': 'depth.subscribe_multi',
503
503
  'id': self.request_id(),
504
504
  'params': list(watchOrderBookSubscriptions.values()),
@@ -539,7 +539,7 @@ class coinex(ccxt.async_support.coinex):
539
539
  if watchOHLCVWarning and existingSubscription is not None and (subSymbol != symbol or subTimeframe != timeframe):
540
540
  raise ExchangeError(self.id + ' watchOHLCV() can only watch one symbol and timeframe at a time. To supress self warning set watchOHLCVWarning to False in options')
541
541
  timeframes = self.safe_value(self.options, 'timeframes', {})
542
- subscribe = {
542
+ subscribe: dict = {
543
543
  'method': 'kline.subscribe',
544
544
  'id': self.request_id(),
545
545
  'params': [
@@ -547,7 +547,7 @@ class coinex(ccxt.async_support.coinex):
547
547
  self.safe_integer(timeframes, timeframe),
548
548
  ],
549
549
  }
550
- subscription = {
550
+ subscription: dict = {
551
551
  'symbol': symbol,
552
552
  'timeframe': timeframe,
553
553
  }
@@ -580,7 +580,7 @@ class coinex(ccxt.async_support.coinex):
580
580
  if since is None:
581
581
  since = 1640995200 # January 1, 2022
582
582
  id = self.request_id()
583
- subscribe = {
583
+ subscribe: dict = {
584
584
  'method': 'kline.query',
585
585
  'params': [
586
586
  market['id'],
@@ -590,7 +590,7 @@ class coinex(ccxt.async_support.coinex):
590
590
  ],
591
591
  'id': id,
592
592
  }
593
- subscription = {
593
+ subscription: dict = {
594
594
  'id': id,
595
595
  'future': messageHash,
596
596
  }
@@ -668,7 +668,7 @@ class coinex(ccxt.async_support.coinex):
668
668
  messageHash = 'orders'
669
669
  market = None
670
670
  type, query = self.handle_market_type_and_params('watchOrders', market, params)
671
- message = {
671
+ message: dict = {
672
672
  'method': 'order.subscribe',
673
673
  'id': self.request_id(),
674
674
  }
@@ -943,7 +943,7 @@ class coinex(ccxt.async_support.coinex):
943
943
  }, market)
944
944
 
945
945
  def parse_ws_order_status(self, status):
946
- statuses = {
946
+ statuses: dict = {
947
947
  '0': 'pending',
948
948
  '1': 'ok',
949
949
  }
@@ -954,7 +954,7 @@ class coinex(ccxt.async_support.coinex):
954
954
  if error is not None:
955
955
  raise ExchangeError(self.id + ' ' + self.json(error))
956
956
  method = self.safe_string(message, 'method')
957
- handlers = {
957
+ handlers: dict = {
958
958
  'state.update': self.handle_ticker,
959
959
  'asset.update': self.handle_balance,
960
960
  'deals.update': self.handle_trades,
@@ -1018,13 +1018,13 @@ class coinex(ccxt.async_support.coinex):
1018
1018
  if authenticated is not None:
1019
1019
  return await future
1020
1020
  requestId = self.request_id()
1021
- subscribe = {
1021
+ subscribe: dict = {
1022
1022
  'id': requestId,
1023
1023
  'future': spotMessageHash,
1024
1024
  }
1025
1025
  signData = 'access_id=' + self.apiKey + '&tonce=' + self.number_to_string(time) + '&secret_key=' + self.secret
1026
1026
  hash = self.hash(self.encode(signData), 'md5')
1027
- request = {
1027
+ request: dict = {
1028
1028
  'method': 'server.sign',
1029
1029
  'params': [
1030
1030
  self.apiKey,
@@ -1040,13 +1040,13 @@ class coinex(ccxt.async_support.coinex):
1040
1040
  if authenticated is not None:
1041
1041
  return await future
1042
1042
  requestId = self.request_id()
1043
- subscribe = {
1043
+ subscribe: dict = {
1044
1044
  'id': requestId,
1045
1045
  'future': swapMessageHash,
1046
1046
  }
1047
1047
  signData = 'access_id=' + self.apiKey + '&timestamp=' + self.number_to_string(time) + '&secret_key=' + self.secret
1048
1048
  hash = self.hash(self.encode(signData), 'sha256', 'hex')
1049
- request = {
1049
+ request: dict = {
1050
1050
  'method': 'server.sign',
1051
1051
  'params': [
1052
1052
  self.apiKey,
ccxt/pro/coinone.py CHANGED
@@ -64,7 +64,7 @@ class coinone(ccxt.async_support.coinone):
64
64
  market = self.market(symbol)
65
65
  messageHash = 'orderbook:' + market['symbol']
66
66
  url = self.urls['api']['ws']
67
- request = {
67
+ request: dict = {
68
68
  'request_type': 'SUBSCRIBE',
69
69
  'channel': 'ORDERBOOK',
70
70
  'topic': {
@@ -140,7 +140,7 @@ class coinone(ccxt.async_support.coinone):
140
140
  market = self.market(symbol)
141
141
  messageHash = 'ticker:' + market['symbol']
142
142
  url = self.urls['api']['ws']
143
- request = {
143
+ request: dict = {
144
144
  'request_type': 'SUBSCRIBE',
145
145
  'channel': 'TICKER',
146
146
  'topic': {
@@ -258,7 +258,7 @@ class coinone(ccxt.async_support.coinone):
258
258
  market = self.market(symbol)
259
259
  messageHash = 'trade:' + market['symbol']
260
260
  url = self.urls['api']['ws']
261
- request = {
261
+ request: dict = {
262
262
  'request_type': 'SUBSCRIBE',
263
263
  'channel': 'TRADE',
264
264
  'topic': {
@@ -363,7 +363,7 @@ class coinone(ccxt.async_support.coinone):
363
363
  return
364
364
  if type == 'DATA':
365
365
  topic = self.safe_string(message, 'channel', '')
366
- methods = {
366
+ methods: dict = {
367
367
  'ORDERBOOK': self.handle_order_book,
368
368
  'TICKER': self.handle_ticker,
369
369
  'TRADE': self.handle_trades,
ccxt/pro/cryptocom.py CHANGED
@@ -504,7 +504,7 @@ class cryptocom(ccxt.async_support.cryptocom):
504
504
  await self.authenticate()
505
505
  url = self.urls['api']['ws']['private']
506
506
  id = self.nonce()
507
- request = {
507
+ request: dict = {
508
508
  'method': 'subscribe',
509
509
  'params': {
510
510
  'channels': ['user.position_balance'],
@@ -688,7 +688,7 @@ class cryptocom(ccxt.async_support.cryptocom):
688
688
  """
689
689
  await self.load_markets()
690
690
  params = self.create_order_request(symbol, type, side, amount, price, params)
691
- request = {
691
+ request: dict = {
692
692
  'method': 'private/create-order',
693
693
  'params': params,
694
694
  }
@@ -725,7 +725,7 @@ class cryptocom(ccxt.async_support.cryptocom):
725
725
  params = self.extend({
726
726
  'order_id': id,
727
727
  }, params)
728
- request = {
728
+ request: dict = {
729
729
  'method': 'private/cancel-order',
730
730
  'params': params,
731
731
  }
@@ -742,7 +742,7 @@ class cryptocom(ccxt.async_support.cryptocom):
742
742
  """
743
743
  await self.load_markets()
744
744
  market = None
745
- request = {
745
+ request: dict = {
746
746
  'method': 'private/cancel-all-orders',
747
747
  'params': self.extend({}, params),
748
748
  }
@@ -766,7 +766,7 @@ class cryptocom(ccxt.async_support.cryptocom):
766
766
  async def watch_public(self, messageHash, params={}):
767
767
  url = self.urls['api']['ws']['public']
768
768
  id = self.nonce()
769
- request = {
769
+ request: dict = {
770
770
  'method': 'subscribe',
771
771
  'params': {
772
772
  'channels': [messageHash],
@@ -779,7 +779,7 @@ class cryptocom(ccxt.async_support.cryptocom):
779
779
  async def watch_public_multiple(self, messageHashes, topics, params={}):
780
780
  url = self.urls['api']['ws']['public']
781
781
  id = self.nonce()
782
- request = {
782
+ request: dict = {
783
783
  'method': 'subscribe',
784
784
  'params': {
785
785
  'channels': topics,
@@ -792,7 +792,7 @@ class cryptocom(ccxt.async_support.cryptocom):
792
792
  async def watch_private_request(self, nonce, params={}):
793
793
  await self.authenticate()
794
794
  url = self.urls['api']['ws']['private']
795
- request = {
795
+ request: dict = {
796
796
  'id': nonce,
797
797
  'nonce': nonce,
798
798
  }
@@ -803,7 +803,7 @@ class cryptocom(ccxt.async_support.cryptocom):
803
803
  await self.authenticate()
804
804
  url = self.urls['api']['ws']['private']
805
805
  id = self.nonce()
806
- request = {
806
+ request: dict = {
807
807
  'method': 'subscribe',
808
808
  'params': {
809
809
  'channels': [messageHash],
@@ -842,7 +842,7 @@ class cryptocom(ccxt.async_support.cryptocom):
842
842
  return True
843
843
 
844
844
  def handle_subscribe(self, client: Client, message):
845
- methods = {
845
+ methods: dict = {
846
846
  'candlestick': self.handle_ohlcv,
847
847
  'ticker': self.handle_ticker,
848
848
  'trade': self.handle_trades,
@@ -899,7 +899,7 @@ class cryptocom(ccxt.async_support.cryptocom):
899
899
  if self.handle_error_message(client, message):
900
900
  return
901
901
  method = self.safe_string(message, 'method')
902
- methods = {
902
+ methods: dict = {
903
903
  '': self.handle_ping,
904
904
  'public/heartbeat': self.handle_ping,
905
905
  'public/auth': self.handle_authenticate,
@@ -925,7 +925,7 @@ class cryptocom(ccxt.async_support.cryptocom):
925
925
  nonce = str(self.nonce())
926
926
  auth = method + nonce + self.apiKey + nonce
927
927
  signature = self.hmac(self.encode(auth), self.encode(self.secret), hashlib.sha256)
928
- request = {
928
+ request: dict = {
929
929
  'id': nonce,
930
930
  'nonce': nonce,
931
931
  'method': method,
ccxt/pro/currencycom.py CHANGED
@@ -306,7 +306,7 @@ class currencycom(ccxt.async_support.currencycom):
306
306
  messageHash = '/api/v1/account'
307
307
  url = self.urls['api']['ws']
308
308
  requestId = str(self.request_id())
309
- payload = {
309
+ payload: dict = {
310
310
  'timestamp': self.milliseconds(),
311
311
  'apiKey': self.apiKey,
312
312
  }
@@ -402,7 +402,7 @@ class currencycom(ccxt.async_support.currencycom):
402
402
  destination = 'OHLCMarketData.subscribe'
403
403
  messageHash = destination + ':' + timeframe
404
404
  timeframes = self.safe_value(self.options, 'timeframes')
405
- request = {
405
+ request: dict = {
406
406
  'destination': destination,
407
407
  'payload': {
408
408
  'intervals': [
@@ -512,7 +512,7 @@ class currencycom(ccxt.async_support.currencycom):
512
512
  if status == 'OK':
513
513
  subscriptionDestination = self.safe_string(subscription, 'destination')
514
514
  if subscriptionDestination is not None:
515
- methods = {
515
+ methods: dict = {
516
516
  '/api/v1/ticker/24hr': self.handle_ticker,
517
517
  '/api/v1/account': self.handle_balance,
518
518
  }
@@ -524,7 +524,7 @@ class currencycom(ccxt.async_support.currencycom):
524
524
  return
525
525
  destination = self.safe_string(message, 'destination')
526
526
  if destination is not None:
527
- methods = {
527
+ methods: dict = {
528
528
  'marketdepth.event': self.handle_order_book,
529
529
  'internal.trade': self.handle_trades,
530
530
  'ohlc.event': self.handle_ohlcv,
ccxt/pro/deribit.py CHANGED
@@ -95,7 +95,7 @@ class deribit(ccxt.async_support.deribit):
95
95
  for i in range(0, len(currencies)):
96
96
  currencyCode = currencies[i]
97
97
  channels.append('user.portfolio.' + currencyCode)
98
- subscribe = {
98
+ subscribe: dict = {
99
99
  'jsonrpc': '2.0',
100
100
  'method': 'private/subscribe',
101
101
  'params': {
@@ -178,7 +178,7 @@ class deribit(ccxt.async_support.deribit):
178
178
  if interval == 'raw':
179
179
  await self.authenticate()
180
180
  channel = 'ticker.' + market['id'] + '.' + interval
181
- message = {
181
+ message: dict = {
182
182
  'jsonrpc': '2.0',
183
183
  'method': 'public/subscribe',
184
184
  'params': {
@@ -324,7 +324,7 @@ class deribit(ccxt.async_support.deribit):
324
324
  interval = self.safe_string(params, 'interval', 'raw')
325
325
  params = self.omit(params, 'interval')
326
326
  channel = 'user.trades.any.any.' + interval
327
- message = {
327
+ message: dict = {
328
328
  'jsonrpc': '2.0',
329
329
  'method': 'private/subscribe',
330
330
  'params': {
@@ -377,7 +377,7 @@ class deribit(ccxt.async_support.deribit):
377
377
  limit = self.safe_integer(self.options, 'tradesLimit', 1000)
378
378
  cachedTrades = ArrayCacheBySymbolById(limit)
379
379
  parsed = self.parse_trades(trades)
380
- marketIds = {}
380
+ marketIds: dict = {}
381
381
  for i in range(0, len(parsed)):
382
382
  trade = parsed[i]
383
383
  cachedTrades.append(trade)
@@ -549,7 +549,7 @@ class deribit(ccxt.async_support.deribit):
549
549
  kind = self.safe_string(params, 'kind', 'any')
550
550
  params = self.omit(params, 'interval', 'currency', 'kind')
551
551
  channel = 'user.orders.' + kind + '.' + currency + '.' + interval
552
- message = {
552
+ message: dict = {
553
553
  'jsonrpc': '2.0',
554
554
  'method': 'private/subscribe',
555
555
  'params': {
@@ -735,7 +735,7 @@ class deribit(ccxt.async_support.deribit):
735
735
  message = channelName + '.' + market['id'] + '.' + channelDescriptor
736
736
  rawSubscriptions.append(message)
737
737
  messageHashes.append(channelName + '|' + market['symbol'] + '|' + channelDescriptor)
738
- request = {
738
+ request: dict = {
739
739
  'jsonrpc': '2.0',
740
740
  'method': 'public/subscribe',
741
741
  'params': {
@@ -818,12 +818,12 @@ class deribit(ccxt.async_support.deribit):
818
818
  if channel is not None:
819
819
  parts = channel.split('.')
820
820
  channelId = self.safe_string(parts, 0)
821
- userHandlers = {
821
+ userHandlers: dict = {
822
822
  'trades': self.handle_my_trades,
823
823
  'portfolio': self.handle_balance,
824
824
  'orders': self.handle_orders,
825
825
  }
826
- handlers = {
826
+ handlers: dict = {
827
827
  'ticker': self.handle_ticker,
828
828
  'book': self.handle_order_book,
829
829
  'trades': self.handle_trades,
@@ -874,7 +874,7 @@ class deribit(ccxt.async_support.deribit):
874
874
  self.check_required_credentials()
875
875
  requestId = self.request_id()
876
876
  signature = self.hmac(self.encode(timeString + '\n' + nonce + '\n'), self.encode(self.secret), hashlib.sha256)
877
- request = {
877
+ request: dict = {
878
878
  'jsonrpc': '2.0',
879
879
  'id': requestId,
880
880
  'method': 'public/auth',
ccxt/pro/exmo.py CHANGED
@@ -59,7 +59,7 @@ class exmo(ccxt.async_support.exmo):
59
59
  type, query = self.handle_market_type_and_params('watchBalance', None, params)
60
60
  messageHash = 'balance:' + type
61
61
  url = self.urls['api']['ws'][type]
62
- subscribe = {
62
+ subscribe: dict = {
63
63
  'method': 'subscribe',
64
64
  'topics': [type + '/wallet'],
65
65
  'id': self.request_id(),
@@ -208,7 +208,7 @@ class exmo(ccxt.async_support.exmo):
208
208
  symbol = market['symbol']
209
209
  url = self.urls['api']['ws']['public']
210
210
  messageHash = 'ticker:' + symbol
211
- message = {
211
+ message: dict = {
212
212
  'method': 'subscribe',
213
213
  'topics': [
214
214
  'spot/ticker:' + market['id'],
@@ -263,7 +263,7 @@ class exmo(ccxt.async_support.exmo):
263
263
  symbol = market['symbol']
264
264
  url = self.urls['api']['ws']['public']
265
265
  messageHash = 'trades:' + symbol
266
- message = {
266
+ message: dict = {
267
267
  'method': 'subscribe',
268
268
  'topics': [
269
269
  'spot/trades:' + market['id'],
@@ -329,7 +329,7 @@ class exmo(ccxt.async_support.exmo):
329
329
  market = self.market(symbol)
330
330
  symbol = market['symbol']
331
331
  messageHash = 'myTrades:' + market['symbol']
332
- message = {
332
+ message: dict = {
333
333
  'method': 'subscribe',
334
334
  'topics': [
335
335
  type + '/user_trades',
@@ -417,7 +417,7 @@ class exmo(ccxt.async_support.exmo):
417
417
  rawTrade = self.safe_value(message, 'data', {})
418
418
  rawTrades = [rawTrade]
419
419
  trades = self.parse_trades(rawTrades)
420
- symbols = {}
420
+ symbols: dict = {}
421
421
  for j in range(0, len(trades)):
422
422
  trade = trades[j]
423
423
  myTrades.append(trade)
@@ -443,7 +443,7 @@ class exmo(ccxt.async_support.exmo):
443
443
  url = self.urls['api']['ws']['public']
444
444
  messageHash = 'orderbook:' + symbol
445
445
  params = self.omit(params, 'aggregation')
446
- subscribe = {
446
+ subscribe: dict = {
447
447
  'method': 'subscribe',
448
448
  'id': self.request_id(),
449
449
  'topics': [
@@ -537,7 +537,7 @@ class exmo(ccxt.async_support.exmo):
537
537
  # "topic": "spot/ticker:BTC_USDT"
538
538
  # }
539
539
  event = self.safe_string(message, 'event')
540
- events = {
540
+ events: dict = {
541
541
  'logged_in': self.handle_authentication_message,
542
542
  'info': self.handle_info,
543
543
  'subscribed': self.handle_subscribed,
@@ -551,7 +551,7 @@ class exmo(ccxt.async_support.exmo):
551
551
  if topic is not None:
552
552
  parts = topic.split(':')
553
553
  channel = self.safe_string(parts, 0)
554
- handlers = {
554
+ handlers: dict = {
555
555
  'spot/ticker': self.handle_ticker,
556
556
  'spot/wallet': self.handle_balance,
557
557
  'margin/wallet': self.handle_balance,
@@ -617,7 +617,7 @@ class exmo(ccxt.async_support.exmo):
617
617
  requestId = self.request_id()
618
618
  signData = self.apiKey + str(time)
619
619
  sign = self.hmac(self.encode(signData), self.encode(self.secret), hashlib.sha512, 'base64')
620
- request = {
620
+ request: dict = {
621
621
  'method': 'login',
622
622
  'id': requestId,
623
623
  'api_key': self.apiKey,
ccxt/pro/gate.py CHANGED
@@ -122,7 +122,7 @@ class gate(ccxt.async_support.gate):
122
122
  if market['contract']:
123
123
  stringLimit = str(limit)
124
124
  payload.append(stringLimit)
125
- subscription = {
125
+ subscription: dict = {
126
126
  'symbol': symbol,
127
127
  'limit': limit,
128
128
  }
@@ -357,7 +357,7 @@ class gate(ccxt.async_support.gate):
357
357
  messageHashes.append(prefix + ':' + symbol)
358
358
  tickerOrBidAsk = await self.subscribe_public_multiple(url, messageHashes, marketIds, channel, params)
359
359
  if self.newUpdates:
360
- items = {}
360
+ items: dict = {}
361
361
  items[tickerOrBidAsk['symbol']] = tickerOrBidAsk
362
362
  return items
363
363
  result = self.tickers if isWatchTickers else self.bidsasks
@@ -509,7 +509,7 @@ class gate(ccxt.async_support.gate):
509
509
  result = self.safe_value(message, 'result')
510
510
  if not isinstance(result, list):
511
511
  result = [result]
512
- marketIds = {}
512
+ marketIds: dict = {}
513
513
  for i in range(0, len(result)):
514
514
  ohlcv = result[i]
515
515
  subscription = self.safe_string(ohlcv, 'n', '')
@@ -608,7 +608,7 @@ class gate(ccxt.async_support.gate):
608
608
  cachedTrades = ArrayCacheBySymbolById(limit)
609
609
  self.myTrades = cachedTrades
610
610
  parsed = self.parse_trades(result)
611
- marketIds = {}
611
+ marketIds: dict = {}
612
612
  for i in range(0, len(parsed)):
613
613
  trade = parsed[i]
614
614
  cachedTrades.append(trade)
@@ -939,7 +939,7 @@ class gate(ccxt.async_support.gate):
939
939
  if self.orders is None:
940
940
  self.orders = ArrayCacheBySymbolById(limit)
941
941
  stored = self.orders
942
- marketIds = {}
942
+ marketIds: dict = {}
943
943
  parsedOrders = self.parse_orders(orders)
944
944
  for i in range(0, len(parsedOrders)):
945
945
  parsed = parsedOrders[i]
@@ -1003,7 +1003,7 @@ class gate(ccxt.async_support.gate):
1003
1003
 
1004
1004
  def handle_subscription_status(self, client: Client, message):
1005
1005
  channel = self.safe_string(message, 'channel')
1006
- methods = {
1006
+ methods: dict = {
1007
1007
  'balance': self.handle_balance_subscription,
1008
1008
  'spot.order_book_update': self.handle_order_book_subscription,
1009
1009
  'futures.order_book_update': self.handle_order_book_subscription,
@@ -1116,7 +1116,7 @@ class gate(ccxt.async_support.gate):
1116
1116
  channel = self.safe_string(message, 'channel', '')
1117
1117
  channelParts = channel.split('.')
1118
1118
  channelType = self.safe_value(channelParts, 1)
1119
- v4Methods = {
1119
+ v4Methods: dict = {
1120
1120
  'usertrades': self.handle_my_trades,
1121
1121
  'candlesticks': self.handle_ohlcv,
1122
1122
  'orders': self.handle_order,
@@ -1155,7 +1155,7 @@ class gate(ccxt.async_support.gate):
1155
1155
  return url
1156
1156
 
1157
1157
  def get_market_type_by_url(self, url: str):
1158
- findBy = {
1158
+ findBy: dict = {
1159
1159
  'op-': 'option',
1160
1160
  'delivery': 'future',
1161
1161
  'fx': 'swap',
@@ -1177,7 +1177,7 @@ class gate(ccxt.async_support.gate):
1177
1177
  async def subscribe_public(self, url, messageHash, payload, channel, params={}, subscription=None):
1178
1178
  requestId = self.request_id()
1179
1179
  time = self.seconds()
1180
- request = {
1180
+ request: dict = {
1181
1181
  'id': requestId,
1182
1182
  'time': time,
1183
1183
  'channel': channel,
@@ -1195,7 +1195,7 @@ class gate(ccxt.async_support.gate):
1195
1195
  async def subscribe_public_multiple(self, url, messageHashes, payload, channel, params={}):
1196
1196
  requestId = self.request_id()
1197
1197
  time = self.seconds()
1198
- request = {
1198
+ request: dict = {
1199
1199
  'id': requestId,
1200
1200
  'time': time,
1201
1201
  'channel': channel,
@@ -1220,13 +1220,13 @@ class gate(ccxt.async_support.gate):
1220
1220
  event = 'subscribe'
1221
1221
  signaturePayload = 'channel=' + channel + '&' + 'event=' + event + '&' + 'time=' + str(time)
1222
1222
  signature = self.hmac(self.encode(signaturePayload), self.encode(self.secret), hashlib.sha512, 'hex')
1223
- auth = {
1223
+ auth: dict = {
1224
1224
  'method': 'api_key',
1225
1225
  'KEY': self.apiKey,
1226
1226
  'SIGN': signature,
1227
1227
  }
1228
1228
  requestId = self.request_id()
1229
- request = {
1229
+ request: dict = {
1230
1230
  'id': requestId,
1231
1231
  'time': time,
1232
1232
  'channel': channel,
ccxt/pro/gemini.py CHANGED
@@ -56,7 +56,7 @@ class gemini(ccxt.async_support.gemini):
56
56
  market = self.market(symbol)
57
57
  messageHash = 'trades:' + market['symbol']
58
58
  marketId = market['id']
59
- request = {
59
+ request: dict = {
60
60
  'type': 'subscribe',
61
61
  'subscriptions': [
62
62
  {
@@ -225,7 +225,7 @@ class gemini(ccxt.async_support.gemini):
225
225
  def handle_trades_for_multidata(self, client: Client, trades, timestamp: Int):
226
226
  if trades is not None:
227
227
  tradesLimit = self.safe_integer(self.options, 'tradesLimit', 1000)
228
- storesForSymbols = {}
228
+ storesForSymbols: dict = {}
229
229
  for i in range(0, len(trades)):
230
230
  marketId = trades[i]['symbol']
231
231
  market = self.safe_market(marketId.lower())
@@ -260,7 +260,7 @@ class gemini(ccxt.async_support.gemini):
260
260
  await self.load_markets()
261
261
  market = self.market(symbol)
262
262
  timeframeId = self.safe_string(self.timeframes, timeframe, timeframe)
263
- request = {
263
+ request: dict = {
264
264
  'type': 'subscribe',
265
265
  'subscriptions': [
266
266
  {
@@ -344,7 +344,7 @@ class gemini(ccxt.async_support.gemini):
344
344
  market = self.market(symbol)
345
345
  messageHash = 'orderbook:' + market['symbol']
346
346
  marketId = market['id']
347
- request = {
347
+ request: dict = {
348
348
  'type': 'subscribe',
349
349
  'subscriptions': [
350
350
  {
@@ -580,7 +580,7 @@ class gemini(ccxt.async_support.gemini):
580
580
  """
581
581
  url = self.urls['api']['ws'] + '/v1/order/events?eventTypeFilter=initial&eventTypeFilter=accepted&eventTypeFilter=rejected&eventTypeFilter=fill&eventTypeFilter=cancelled&eventTypeFilter=booked'
582
582
  await self.load_markets()
583
- authParams = {
583
+ authParams: dict = {
584
584
  'url': url,
585
585
  }
586
586
  await self.authenticate(authParams)
@@ -714,7 +714,7 @@ class gemini(ccxt.async_support.gemini):
714
714
  }, market)
715
715
 
716
716
  def parse_ws_order_status(self, status):
717
- statuses = {
717
+ statuses: dict = {
718
718
  'accepted': 'open',
719
719
  'booked': 'open',
720
720
  'fill': 'closed',
@@ -725,7 +725,7 @@ class gemini(ccxt.async_support.gemini):
725
725
  return self.safe_string(statuses, status, status)
726
726
 
727
727
  def parse_ws_order_type(self, type):
728
- types = {
728
+ types: dict = {
729
729
  'exchange limit': 'limit',
730
730
  'market buy': 'market',
731
731
  'market sell': 'market',
@@ -784,7 +784,7 @@ class gemini(ccxt.async_support.gemini):
784
784
  reason = self.safe_string(message, 'reason')
785
785
  if reason == 'error':
786
786
  self.handle_error(client, message)
787
- methods = {
787
+ methods: dict = {
788
788
  'l2_updates': self.handle_l2_updates,
789
789
  'trade': self.handle_trade,
790
790
  'subscription_ack': self.handle_subscription,
@@ -838,13 +838,13 @@ class gemini(ccxt.async_support.gemini):
838
838
  urlLength = len(url)
839
839
  endIndex = urlParamsIndex if (urlParamsIndex >= 0) else urlLength
840
840
  request = url[startIndex:endIndex]
841
- payload = {
841
+ payload: dict = {
842
842
  'request': request,
843
843
  'nonce': self.nonce(),
844
844
  }
845
845
  b64 = self.string_to_base64(self.json(payload))
846
846
  signature = self.hmac(self.encode(b64), self.encode(self.secret), hashlib.sha384, 'hex')
847
- defaultOptions = {
847
+ defaultOptions: dict = {
848
848
  'ws': {
849
849
  'options': {
850
850
  'headers': {},
@@ -854,7 +854,7 @@ class gemini(ccxt.async_support.gemini):
854
854
  # self.options = self.extend(defaultOptions, self.options)
855
855
  self.extend_exchange_options(defaultOptions)
856
856
  originalHeaders = self.options['ws']['options']['headers']
857
- headers = {
857
+ headers: dict = {
858
858
  'X-GEMINI-APIKEY': self.apiKey,
859
859
  'X-GEMINI-PAYLOAD': b64,
860
860
  'X-GEMINI-SIGNATURE': signature,