ccxt 4.3.30__py2.py3-none-any.whl → 4.3.32__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/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 +208 -175
  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 +48 -36
  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 +208 -175
  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 +20 -20
  201. ccxt/pro/coinbase.py +32 -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/test/test_async.py +1 -1
  244. ccxt/test/test_sync.py +1 -1
  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 +37 -37
  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.30.dist-info → ccxt-4.3.32.dist-info}/METADATA +4 -4
  258. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/RECORD +260 -260
  259. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/WHEEL +0 -0
  260. {ccxt-4.3.30.dist-info → ccxt-4.3.32.dist-info}/top_level.txt +0 -0
ccxt/pro/phemex.py CHANGED
@@ -111,7 +111,7 @@ class phemex(ccxt.async_support.phemex):
111
111
  change = self.parse_number(Precise.string_sub(lastString, openString))
112
112
  average = self.parse_number(Precise.string_div(Precise.string_add(lastString, openString), '2'))
113
113
  percentage = self.parse_number(Precise.string_mul(Precise.string_sub(Precise.string_div(lastString, openString), '1'), '100'))
114
- result = {
114
+ result: dict = {
115
115
  'symbol': symbol,
116
116
  'timestamp': timestamp,
117
117
  'datetime': self.iso8601(timestamp),
@@ -168,7 +168,7 @@ class phemex(ccxt.async_support.phemex):
168
168
  change = self.parse_number(Precise.string_sub(lastString, openString))
169
169
  average = self.parse_number(Precise.string_div(Precise.string_add(lastString, openString), '2'))
170
170
  percentage = self.parse_number(Precise.string_mul(Precise.string_sub(Precise.string_div(lastString, openString), '1'), '100'))
171
- result = {
171
+ result: dict = {
172
172
  'symbol': symbol,
173
173
  'timestamp': None,
174
174
  'datetime': None,
@@ -495,7 +495,7 @@ class phemex(ccxt.async_support.phemex):
495
495
  requestId = self.request_id()
496
496
  subscriptionHash = name + '.subscribe'
497
497
  messageHash = 'ticker:' + symbol
498
- subscribe = {
498
+ subscribe: dict = {
499
499
  'method': subscriptionHash,
500
500
  'id': requestId,
501
501
  'params': [],
@@ -525,7 +525,7 @@ class phemex(ccxt.async_support.phemex):
525
525
  name = 'trade_p' if (isSwap and settleIsUSDT) else 'trade'
526
526
  messageHash = 'trade:' + symbol
527
527
  method = name + '.subscribe'
528
- subscribe = {
528
+ subscribe: dict = {
529
529
  'method': method,
530
530
  'id': requestId,
531
531
  'params': [
@@ -560,7 +560,7 @@ class phemex(ccxt.async_support.phemex):
560
560
  name = 'orderbook_p' if (isSwap and settleIsUSDT) else 'orderbook'
561
561
  messageHash = 'orderbook:' + symbol
562
562
  method = name + '.subscribe'
563
- subscribe = {
563
+ subscribe: dict = {
564
564
  'method': method,
565
565
  'id': requestId,
566
566
  'params': [
@@ -594,7 +594,7 @@ class phemex(ccxt.async_support.phemex):
594
594
  name = 'kline_p' if (isSwap and settleIsUSDT) else 'kline'
595
595
  messageHash = 'kline:' + timeframe + ':' + symbol
596
596
  method = name + '.subscribe'
597
- subscribe = {
597
+ subscribe: dict = {
598
598
  'method': method,
599
599
  'id': requestId,
600
600
  'params': [
@@ -821,7 +821,7 @@ class phemex(ccxt.async_support.phemex):
821
821
  if cachedTrades is None:
822
822
  limit = self.safe_integer(self.options, 'tradesLimit', 1000)
823
823
  cachedTrades = ArrayCacheBySymbolById(limit)
824
- marketIds = {}
824
+ marketIds: dict = {}
825
825
  type = None
826
826
  for i in range(0, len(message)):
827
827
  rawTrade = message[i]
@@ -1055,7 +1055,7 @@ class phemex(ccxt.async_support.phemex):
1055
1055
  parsedOrders.append(parsedOrder)
1056
1056
  self.handle_my_trades(client, trades)
1057
1057
  limit = self.safe_integer(self.options, 'ordersLimit', 1000)
1058
- marketIds = {}
1058
+ marketIds: dict = {}
1059
1059
  if self.orders is None:
1060
1060
  self.orders = ArrayCacheBySymbolById(limit)
1061
1061
  type = None
@@ -1427,7 +1427,7 @@ class phemex(ccxt.async_support.phemex):
1427
1427
  payload = self.apiKey + str(expiration)
1428
1428
  signature = self.hmac(self.encode(payload), self.encode(self.secret), hashlib.sha256)
1429
1429
  method = 'user.auth'
1430
- request = {
1430
+ request: dict = {
1431
1431
  'method': method,
1432
1432
  'params': ['API', self.apiKey, signature, expiration],
1433
1433
  'id': requestId,
ccxt/pro/poloniex.py CHANGED
@@ -99,7 +99,7 @@ class poloniex(ccxt.async_support.poloniex):
99
99
  accessPath = '/ws'
100
100
  requestString = 'GET\n' + accessPath + '\nsignTimestamp=' + timestamp
101
101
  signature = self.hmac(self.encode(requestString), self.encode(self.secret), hashlib.sha256, 'base64')
102
- request = {
102
+ request: dict = {
103
103
  'event': 'subscribe',
104
104
  'channel': ['auth'],
105
105
  'params': {
@@ -147,7 +147,7 @@ class poloniex(ccxt.async_support.poloniex):
147
147
  """
148
148
  publicOrPrivate = 'private' if isPrivate else 'public'
149
149
  url = self.urls['api']['ws'][publicOrPrivate]
150
- subscribe = {
150
+ subscribe: dict = {
151
151
  'event': 'subscribe',
152
152
  'channel': [
153
153
  name,
@@ -175,7 +175,7 @@ class poloniex(ccxt.async_support.poloniex):
175
175
  """
176
176
  url = self.urls['api']['ws']['private']
177
177
  messageHash = str(self.nonce())
178
- subscribe = {
178
+ subscribe: dict = {
179
179
  'id': messageHash,
180
180
  'event': name,
181
181
  'params': params,
@@ -211,7 +211,7 @@ class poloniex(ccxt.async_support.poloniex):
211
211
  isPostOnly = self.is_post_only(uppercaseType == 'MARKET', uppercaseType == 'LIMIT_MAKER', params)
212
212
  if isPostOnly:
213
213
  uppercaseType = 'LIMIT_MAKER'
214
- request = {
214
+ request: dict = {
215
215
  'symbol': market['id'],
216
216
  'side': side.upper(),
217
217
  'type': type.upper(),
@@ -269,7 +269,7 @@ class poloniex(ccxt.async_support.poloniex):
269
269
  """
270
270
  await self.load_markets()
271
271
  await self.authenticate()
272
- request = {
272
+ request: dict = {
273
273
  'orderIds': ids,
274
274
  }
275
275
  return await self.trade_request('cancelOrders', self.extend(request, params))
@@ -617,7 +617,7 @@ class poloniex(ccxt.async_support.poloniex):
617
617
  }, market)
618
618
 
619
619
  def parse_status(self, status):
620
- statuses = {
620
+ statuses: dict = {
621
621
  'NEW': 'open',
622
622
  'PARTIALLY_FILLED': 'open',
623
623
  'FILLED': 'closed',
@@ -880,7 +880,7 @@ class poloniex(ccxt.async_support.poloniex):
880
880
  # }
881
881
  #
882
882
  data = self.safe_value(message, 'data', [])
883
- newTickers = {}
883
+ newTickers: dict = {}
884
884
  for i in range(0, len(data)):
885
885
  item = data[i]
886
886
  marketId = self.safe_string(item, 'symbol')
@@ -1032,7 +1032,7 @@ class poloniex(ccxt.async_support.poloniex):
1032
1032
  #
1033
1033
  firstBalance = self.safe_value(response, 0, {})
1034
1034
  timestamp = self.safe_integer(firstBalance, 'ts')
1035
- result = {
1035
+ result: dict = {
1036
1036
  'info': response,
1037
1037
  'timestamp': timestamp,
1038
1038
  'datetime': self.iso8601(timestamp),
@@ -1070,7 +1070,7 @@ class poloniex(ccxt.async_support.poloniex):
1070
1070
  event = self.safe_string(message, 'event')
1071
1071
  if event == 'pong':
1072
1072
  client.lastPong = self.milliseconds()
1073
- methods = {
1073
+ methods: dict = {
1074
1074
  'candles_minute_1': self.handle_ohlcv,
1075
1075
  'candles_minute_5': self.handle_ohlcv,
1076
1076
  'candles_minute_10': self.handle_ohlcv,
@@ -152,7 +152,7 @@ class poloniexfutures(ccxt.async_support.poloniexfutures):
152
152
  messageHash = name
153
153
  tunnelId = await self.stream(url, messageHash)
154
154
  requestId = self.request_id()
155
- subscribe = {
155
+ subscribe: dict = {
156
156
  'id': requestId,
157
157
  'type': 'subscribe',
158
158
  'topic': name, # Subscribed topic. Some topics support subscribe to the data of multiple trading pairs through ",".
@@ -160,7 +160,7 @@ class poloniexfutures(ccxt.async_support.poloniexfutures):
160
160
  'response': True, # Whether the server needs to return the receipt information of self subscription or not. Set by default.
161
161
  'tunnelId': tunnelId,
162
162
  }
163
- subscriptionRequest = {
163
+ subscriptionRequest: dict = {
164
164
  'id': requestId,
165
165
  }
166
166
  if subscription is None:
@@ -187,13 +187,13 @@ class poloniexfutures(ccxt.async_support.poloniexfutures):
187
187
  stream = 'stream-' + streamIndexString
188
188
  self.options['streamBySubscriptionsHash'][subscriptionHash] = stream
189
189
  messageHash = 'tunnel:' + stream
190
- request = {
190
+ request: dict = {
191
191
  'id': messageHash,
192
192
  'type': 'openTunnel',
193
193
  'newTunnelId': stream,
194
194
  'response': True,
195
195
  }
196
- subscription = {
196
+ subscription: dict = {
197
197
  'id': messageHash,
198
198
  'method': self.handle_new_stream,
199
199
  }
@@ -281,7 +281,7 @@ class poloniexfutures(ccxt.async_support.poloniexfutures):
281
281
  if limit != 5 and limit != 50:
282
282
  raise BadRequest(self.id + ' watchOrderBook limit argument must be none, 5 or 50 if using method /contractMarket/level2')
283
283
  name += 'Depth' + self.number_to_string(limit)
284
- subscription = {
284
+ subscription: dict = {
285
285
  'symbol': symbol,
286
286
  'limit': limit,
287
287
  'method': self.handle_order_book_subscription,
@@ -517,14 +517,14 @@ class poloniexfutures(ccxt.async_support.poloniexfutures):
517
517
  :param str type: "open", "match", "filled", "canceled", "update"
518
518
  :returns str:
519
519
  """
520
- types = {
520
+ types: dict = {
521
521
  'canceled': 'canceled',
522
522
  'cancel': 'canceled',
523
523
  'filled': 'closed',
524
524
  }
525
525
  parsedStatus = self.safe_string(types, type)
526
526
  if parsedStatus is None:
527
- statuses = {
527
+ statuses: dict = {
528
528
  'open': 'open',
529
529
  'match': 'open',
530
530
  'done': 'closed',
@@ -891,7 +891,7 @@ class poloniexfutures(ccxt.async_support.poloniexfutures):
891
891
  # }
892
892
  #
893
893
  timestamp = self.safe_integer(response, 'timestamp')
894
- result = {
894
+ result: dict = {
895
895
  'info': response,
896
896
  'timestamp': timestamp,
897
897
  'datetime': self.iso8601(timestamp),
@@ -914,7 +914,7 @@ class poloniexfutures(ccxt.async_support.poloniexfutures):
914
914
 
915
915
  def handle_subject(self, client: Client, message):
916
916
  subject = self.safe_string(message, 'subject')
917
- methods = {
917
+ methods: dict = {
918
918
  'auth': self.handle_authenticate,
919
919
  'received': self.handle_l3_order_book,
920
920
  'open': self.handle_l3_order_book,
@@ -957,7 +957,7 @@ class poloniexfutures(ccxt.async_support.poloniexfutures):
957
957
 
958
958
  def handle_message(self, client: Client, message):
959
959
  type = self.safe_string(message, 'type')
960
- methods = {
960
+ methods: dict = {
961
961
  'welcome': self.handle_system_status,
962
962
  'ack': self.handle_subscription_status,
963
963
  'message': self.handle_subject,
ccxt/pro/probit.py CHANGED
@@ -66,7 +66,7 @@ class probit(ccxt.async_support.probit):
66
66
  await self.authenticate(params)
67
67
  messageHash = 'balance'
68
68
  url = self.urls['api']['ws']
69
- subscribe = {
69
+ subscribe: dict = {
70
70
  'type': 'subscribe',
71
71
  'channel': 'balance',
72
72
  }
@@ -234,7 +234,7 @@ class probit(ccxt.async_support.probit):
234
234
  messageHash = messageHash + ':' + symbol
235
235
  url = self.urls['api']['ws']
236
236
  channel = 'trade_history'
237
- message = {
237
+ message: dict = {
238
238
  'type': 'subscribe',
239
239
  'channel': channel,
240
240
  }
@@ -276,7 +276,7 @@ class probit(ccxt.async_support.probit):
276
276
  stored = ArrayCacheBySymbolById(limit)
277
277
  self.myTrades = stored
278
278
  trades = self.parse_trades(rawTrades)
279
- tradeSymbols = {}
279
+ tradeSymbols: dict = {}
280
280
  for j in range(0, len(trades)):
281
281
  trade = trades[j]
282
282
  tradeSymbols[trade['symbol']] = True
@@ -308,7 +308,7 @@ class probit(ccxt.async_support.probit):
308
308
  messageHash = messageHash + ':' + symbol
309
309
  channel = None
310
310
  channel, params = self.handle_option_and_params(params, 'watchOrders', 'channel', 'open_order')
311
- subscribe = {
311
+ subscribe: dict = {
312
312
  'type': 'subscribe',
313
313
  'channel': channel,
314
314
  }
@@ -354,7 +354,7 @@ class probit(ccxt.async_support.probit):
354
354
  limit = self.safe_integer(self.options, 'ordersLimit', 1000)
355
355
  stored = ArrayCacheBySymbolById(limit)
356
356
  self.orders = stored
357
- orderSymbols = {}
357
+ orderSymbols: dict = {}
358
358
  for i in range(0, len(rawOrders)):
359
359
  rawOrder = rawOrders[i]
360
360
  order = self.parse_order(rawOrder)
@@ -400,7 +400,7 @@ class probit(ccxt.async_support.probit):
400
400
  del client.subscriptions[subscriptionHash]
401
401
  filters[filter] = True
402
402
  keys = list(filters.keys())
403
- message = {
403
+ message: dict = {
404
404
  'channel': 'marketdata',
405
405
  'interval': interval,
406
406
  'market_id': market['id'],
@@ -511,7 +511,7 @@ class probit(ccxt.async_support.probit):
511
511
  if type == 'authorization':
512
512
  self.handle_authenticate(client, message)
513
513
  return
514
- handlers = {
514
+ handlers: dict = {
515
515
  'marketdata': self.handle_market_data,
516
516
  'balance': self.handle_balance,
517
517
  'trade_history': self.handle_my_trades,
@@ -542,7 +542,7 @@ class probit(ccxt.async_support.probit):
542
542
  # }
543
543
  #
544
544
  accessToken = self.safe_string(response, 'access_token')
545
- request = {
545
+ request: dict = {
546
546
  'type': 'authorization',
547
547
  'token': accessToken,
548
548
  }
ccxt/pro/upbit.py CHANGED
@@ -214,7 +214,7 @@ class upbit(ccxt.async_support.upbit):
214
214
  client.resolve(stored, messageHash)
215
215
 
216
216
  def handle_message(self, client: Client, message):
217
- methods = {
217
+ methods: dict = {
218
218
  'ticker': self.handle_ticker,
219
219
  'orderbook': self.handle_order_book,
220
220
  'trade': self.handle_trades,
ccxt/pro/wazirx.py CHANGED
@@ -58,7 +58,7 @@ class wazirx(ccxt.async_support.wazirx):
58
58
  token = await self.authenticate(params)
59
59
  messageHash = 'balance'
60
60
  url = self.urls['api']['ws']
61
- subscribe = {
61
+ subscribe: dict = {
62
62
  'event': 'subscribe',
63
63
  'streams': ['outboundAccountPosition'],
64
64
  'auth_key': token,
@@ -177,7 +177,7 @@ class wazirx(ccxt.async_support.wazirx):
177
177
  messageHash = 'ticker:' + market['symbol']
178
178
  subscribeHash = 'tickers'
179
179
  stream = '!' + 'ticker@arr'
180
- subscribe = {
180
+ subscribe: dict = {
181
181
  'event': 'subscribe',
182
182
  'streams': [stream],
183
183
  }
@@ -197,7 +197,7 @@ class wazirx(ccxt.async_support.wazirx):
197
197
  url = self.urls['api']['ws']
198
198
  messageHash = 'tickers'
199
199
  stream = '!' + 'ticker@arr'
200
- subscribe = {
200
+ subscribe: dict = {
201
201
  'event': 'subscribe',
202
202
  'streams': [stream],
203
203
  }
@@ -294,7 +294,7 @@ class wazirx(ccxt.async_support.wazirx):
294
294
  symbol = market['symbol']
295
295
  messageHash = market['id'] + '@trades'
296
296
  url = self.urls['api']['ws']
297
- message = {
297
+ message: dict = {
298
298
  'event': 'subscribe',
299
299
  'streams': [messageHash],
300
300
  }
@@ -357,7 +357,7 @@ class wazirx(ccxt.async_support.wazirx):
357
357
  symbol = market['symbol']
358
358
  url = self.urls['api']['ws']
359
359
  messageHash = 'myTrades'
360
- message = {
360
+ message: dict = {
361
361
  'event': 'subscribe',
362
362
  'streams': ['ownTrade'],
363
363
  'auth_key': token,
@@ -384,7 +384,7 @@ class wazirx(ccxt.async_support.wazirx):
384
384
  url = self.urls['api']['ws']
385
385
  messageHash = 'ohlcv:' + symbol + ':' + timeframe
386
386
  stream = market['id'] + '@kline_' + timeframe
387
- message = {
387
+ message: dict = {
388
388
  'event': 'subscribe',
389
389
  'streams': [stream],
390
390
  }
@@ -467,7 +467,7 @@ class wazirx(ccxt.async_support.wazirx):
467
467
  url = self.urls['api']['ws']
468
468
  messageHash = 'orderbook:' + symbol
469
469
  stream = market['id'] + '@depth'
470
- subscribe = {
470
+ subscribe: dict = {
471
471
  'event': 'subscribe',
472
472
  'streams': [stream],
473
473
  }
@@ -528,7 +528,7 @@ class wazirx(ccxt.async_support.wazirx):
528
528
  symbol = market['symbol']
529
529
  token = await self.authenticate(params)
530
530
  messageHash = 'orders'
531
- message = {
531
+ message: dict = {
532
532
  'event': 'subscribe',
533
533
  'streams': ['orderUpdate'],
534
534
  'auth_key': token,
@@ -701,7 +701,7 @@ class wazirx(ccxt.async_support.wazirx):
701
701
  self.handle_error(client, message)
702
702
  return
703
703
  event = self.safe_string(message, 'event')
704
- eventHandlers = {
704
+ eventHandlers: dict = {
705
705
  'error': self.handle_error,
706
706
  'connected': self.handle_connected,
707
707
  'subscribed': self.handle_subscribed,
@@ -711,7 +711,7 @@ class wazirx(ccxt.async_support.wazirx):
711
711
  eventHandler(client, message)
712
712
  return
713
713
  stream = self.safe_string(message, 'stream', '')
714
- streamHandlers = {
714
+ streamHandlers: dict = {
715
715
  'ticker@arr': self.handle_ticker,
716
716
  '@depth': self.handle_order_book,
717
717
  '@kline': self.handle_ohlcv,
ccxt/pro/whitebit.py CHANGED
@@ -596,7 +596,7 @@ class whitebit(ccxt.async_support.whitebit):
596
596
  }, market)
597
597
 
598
598
  def parse_ws_order_type(self, status):
599
- statuses = {
599
+ statuses: dict = {
600
600
  '1': 'limit',
601
601
  '2': 'market',
602
602
  '202': 'market',
@@ -668,7 +668,7 @@ class whitebit(ccxt.async_support.whitebit):
668
668
  async def watch_public(self, messageHash, method, reqParams=[], params={}):
669
669
  url = self.urls['api']['ws']
670
670
  id = self.nonce()
671
- request = {
671
+ request: dict = {
672
672
  'id': id,
673
673
  'method': method,
674
674
  'params': reqParams,
@@ -684,7 +684,7 @@ class whitebit(ccxt.async_support.whitebit):
684
684
  request = None
685
685
  marketIds = []
686
686
  if client is None:
687
- subscription = {}
687
+ subscription: dict = {}
688
688
  market = self.market(symbol)
689
689
  marketId = market['id']
690
690
  subscription[marketId] = True
@@ -716,7 +716,7 @@ class whitebit(ccxt.async_support.whitebit):
716
716
  marketIdsNew = list(subscription.keys())
717
717
  if isNested:
718
718
  marketIdsNew = [marketIdsNew]
719
- resubRequest = {
719
+ resubRequest: dict = {
720
720
  'id': id,
721
721
  'method': method,
722
722
  'params': marketIdsNew,
@@ -730,7 +730,7 @@ class whitebit(ccxt.async_support.whitebit):
730
730
  await self.authenticate()
731
731
  url = self.urls['api']['ws']
732
732
  id = self.nonce()
733
- request = {
733
+ request: dict = {
734
734
  'id': id,
735
735
  'method': method,
736
736
  'params': reqParams,
@@ -754,7 +754,7 @@ class whitebit(ccxt.async_support.whitebit):
754
754
  #
755
755
  token = self.safe_string(authToken, 'websocket_token')
756
756
  id = self.nonce()
757
- request = {
757
+ request: dict = {
758
758
  'id': id,
759
759
  'method': 'authorize',
760
760
  'params': [
@@ -762,7 +762,7 @@ class whitebit(ccxt.async_support.whitebit):
762
762
  'public',
763
763
  ],
764
764
  }
765
- subscription = {
765
+ subscription: dict = {
766
766
  'id': id,
767
767
  'method': self.handle_authenticate,
768
768
  }
@@ -821,7 +821,7 @@ class whitebit(ccxt.async_support.whitebit):
821
821
  if id is not None:
822
822
  self.handle_subscription_status(client, message, id)
823
823
  return
824
- methods = {
824
+ methods: dict = {
825
825
  'market_update': self.handle_ticker,
826
826
  'trades_update': self.handle_trades,
827
827
  'depth_update': self.handle_order_book,
ccxt/pro/woo.py CHANGED
@@ -81,7 +81,7 @@ class woo(ccxt.async_support.woo):
81
81
  async def watch_public(self, messageHash, message):
82
82
  url = self.urls['api']['ws']['public'] + '/' + self.uid
83
83
  requestId = self.request_id(url)
84
- subscribe = {
84
+ subscribe: dict = {
85
85
  'id': requestId,
86
86
  }
87
87
  request = self.extend(subscribe, message)
@@ -100,7 +100,7 @@ class woo(ccxt.async_support.woo):
100
100
  name = 'orderbook'
101
101
  market = self.market(symbol)
102
102
  topic = market['id'] + '@' + name
103
- request = {
103
+ request: dict = {
104
104
  'event': 'subscribe',
105
105
  'topic': topic,
106
106
  }
@@ -155,7 +155,7 @@ class woo(ccxt.async_support.woo):
155
155
  market = self.market(symbol)
156
156
  symbol = market['symbol']
157
157
  topic = market['id'] + '@' + name
158
- request = {
158
+ request: dict = {
159
159
  'event': 'subscribe',
160
160
  'topic': topic,
161
161
  }
@@ -239,7 +239,7 @@ class woo(ccxt.async_support.woo):
239
239
  symbols = self.market_symbols(symbols)
240
240
  name = 'tickers'
241
241
  topic = name
242
- request = {
242
+ request: dict = {
243
243
  'event': 'subscribe',
244
244
  'topic': topic,
245
245
  }
@@ -307,7 +307,7 @@ class woo(ccxt.async_support.woo):
307
307
  interval = self.safe_string(self.timeframes, timeframe, timeframe)
308
308
  name = 'kline'
309
309
  topic = market['id'] + '@' + name + '_' + interval
310
- request = {
310
+ request: dict = {
311
311
  'event': 'subscribe',
312
312
  'topic': topic,
313
313
  }
@@ -374,7 +374,7 @@ class woo(ccxt.async_support.woo):
374
374
  market = self.market(symbol)
375
375
  symbol = market['symbol']
376
376
  topic = market['id'] + '@trade'
377
- request = {
377
+ request: dict = {
378
378
  'event': 'subscribe',
379
379
  'topic': topic,
380
380
  }
@@ -509,7 +509,7 @@ class woo(ccxt.async_support.woo):
509
509
  ts = str(self.nonce())
510
510
  auth = '|' + ts
511
511
  signature = self.hmac(self.encode(auth), self.encode(self.secret), hashlib.sha256)
512
- request = {
512
+ request: dict = {
513
513
  'event': event,
514
514
  'params': {
515
515
  'apikey': self.apiKey,
@@ -525,7 +525,7 @@ class woo(ccxt.async_support.woo):
525
525
  await self.authenticate(params)
526
526
  url = self.urls['api']['ws']['private'] + '/' + self.uid
527
527
  requestId = self.request_id(url)
528
- subscribe = {
528
+ subscribe: dict = {
529
529
  'id': requestId,
530
530
  }
531
531
  request = self.extend(subscribe, message)
@@ -535,7 +535,7 @@ class woo(ccxt.async_support.woo):
535
535
  await self.authenticate(params)
536
536
  url = self.urls['api']['ws']['private'] + '/' + self.uid
537
537
  requestId = self.request_id(url)
538
- subscribe = {
538
+ subscribe: dict = {
539
539
  'id': requestId,
540
540
  }
541
541
  request = self.extend(subscribe, message)
@@ -562,7 +562,7 @@ class woo(ccxt.async_support.woo):
562
562
  market = self.market(symbol)
563
563
  symbol = market['symbol']
564
564
  messageHash += ':' + symbol
565
- request = {
565
+ request: dict = {
566
566
  'event': 'subscribe',
567
567
  'topic': topic,
568
568
  }
@@ -593,7 +593,7 @@ class woo(ccxt.async_support.woo):
593
593
  market = self.market(symbol)
594
594
  symbol = market['symbol']
595
595
  messageHash += ':' + symbol
596
- request = {
596
+ request: dict = {
597
597
  'event': 'subscribe',
598
598
  'topic': topic,
599
599
  }
@@ -819,7 +819,7 @@ class woo(ccxt.async_support.woo):
819
819
  if fetchPositionsSnapshot and awaitPositionsSnapshot and self.positions is None:
820
820
  snapshot = await client.future('fetchPositionsSnapshot')
821
821
  return self.filter_by_symbols_since_limit(snapshot, symbols, since, limit, True)
822
- request = {
822
+ request: dict = {
823
823
  'event': 'subscribe',
824
824
  'topic': 'position',
825
825
  }
@@ -906,7 +906,7 @@ class woo(ccxt.async_support.woo):
906
906
  await self.load_markets()
907
907
  topic = 'balance'
908
908
  messageHash = topic
909
- request = {
909
+ request: dict = {
910
910
  'event': 'subscribe',
911
911
  'topic': topic,
912
912
  }
@@ -991,7 +991,7 @@ class woo(ccxt.async_support.woo):
991
991
  def handle_message(self, client: Client, message):
992
992
  if self.handle_error_message(client, message):
993
993
  return
994
- methods = {
994
+ methods: dict = {
995
995
  'ping': self.handle_ping,
996
996
  'pong': self.handle_pong,
997
997
  'subscribe': self.handle_subscribe,