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/woofipro.py CHANGED
@@ -84,7 +84,7 @@ class woofipro(ccxt.async_support.woofipro):
84
84
  id = self.accountId
85
85
  url = self.urls['api']['ws']['public'] + '/' + id
86
86
  requestId = self.request_id(url)
87
- subscribe = {
87
+ subscribe: dict = {
88
88
  'id': requestId,
89
89
  }
90
90
  request = self.extend(subscribe, message)
@@ -103,7 +103,7 @@ class woofipro(ccxt.async_support.woofipro):
103
103
  name = 'orderbook'
104
104
  market = self.market(symbol)
105
105
  topic = market['id'] + '@' + name
106
- request = {
106
+ request: dict = {
107
107
  'event': 'subscribe',
108
108
  'topic': topic,
109
109
  }
@@ -159,7 +159,7 @@ class woofipro(ccxt.async_support.woofipro):
159
159
  market = self.market(symbol)
160
160
  symbol = market['symbol']
161
161
  topic = market['id'] + '@' + name
162
- request = {
162
+ request: dict = {
163
163
  'event': 'subscribe',
164
164
  'topic': topic,
165
165
  }
@@ -243,7 +243,7 @@ class woofipro(ccxt.async_support.woofipro):
243
243
  symbols = self.market_symbols(symbols)
244
244
  name = 'tickers'
245
245
  topic = name
246
- request = {
246
+ request: dict = {
247
247
  'event': 'subscribe',
248
248
  'topic': topic,
249
249
  }
@@ -301,7 +301,7 @@ class woofipro(ccxt.async_support.woofipro):
301
301
  interval = self.safe_string(self.timeframes, timeframe, timeframe)
302
302
  name = 'kline'
303
303
  topic = market['id'] + '@' + name + '_' + interval
304
- request = {
304
+ request: dict = {
305
305
  'event': 'subscribe',
306
306
  'topic': topic,
307
307
  }
@@ -369,7 +369,7 @@ class woofipro(ccxt.async_support.woofipro):
369
369
  market = self.market(symbol)
370
370
  symbol = market['symbol']
371
371
  topic = market['id'] + '@trade'
372
- request = {
372
+ request: dict = {
373
373
  'event': 'subscribe',
374
374
  'topic': topic,
375
375
  }
@@ -517,7 +517,7 @@ class woofipro(ccxt.async_support.woofipro):
517
517
  parts = secret.split('ed25519:')
518
518
  secret = parts[1]
519
519
  signature = self.eddsa(self.encode(auth), self.base58_to_binary(secret), 'ed25519')
520
- request = {
520
+ request: dict = {
521
521
  'event': event,
522
522
  'params': {
523
523
  'orderly_key': self.apiKey,
@@ -533,7 +533,7 @@ class woofipro(ccxt.async_support.woofipro):
533
533
  await self.authenticate(params)
534
534
  url = self.urls['api']['ws']['private'] + '/' + self.accountId
535
535
  requestId = self.request_id(url)
536
- subscribe = {
536
+ subscribe: dict = {
537
537
  'id': requestId,
538
538
  }
539
539
  request = self.extend(subscribe, message)
@@ -543,7 +543,7 @@ class woofipro(ccxt.async_support.woofipro):
543
543
  await self.authenticate(params)
544
544
  url = self.urls['api']['ws']['private'] + '/' + self.accountId
545
545
  requestId = self.request_id(url)
546
- subscribe = {
546
+ subscribe: dict = {
547
547
  'id': requestId,
548
548
  }
549
549
  request = self.extend(subscribe, message)
@@ -570,7 +570,7 @@ class woofipro(ccxt.async_support.woofipro):
570
570
  market = self.market(symbol)
571
571
  symbol = market['symbol']
572
572
  messageHash += ':' + symbol
573
- request = {
573
+ request: dict = {
574
574
  'event': 'subscribe',
575
575
  'topic': topic,
576
576
  }
@@ -601,7 +601,7 @@ class woofipro(ccxt.async_support.woofipro):
601
601
  market = self.market(symbol)
602
602
  symbol = market['symbol']
603
603
  messageHash += ':' + symbol
604
- request = {
604
+ request: dict = {
605
605
  'event': 'subscribe',
606
606
  'topic': topic,
607
607
  }
@@ -869,7 +869,7 @@ class woofipro(ccxt.async_support.woofipro):
869
869
  if fetchPositionsSnapshot and awaitPositionsSnapshot and self.positions is None:
870
870
  snapshot = await client.future('fetchPositionsSnapshot')
871
871
  return self.filter_by_symbols_since_limit(snapshot, symbols, since, limit, True)
872
- request = {
872
+ request: dict = {
873
873
  'event': 'subscribe',
874
874
  'topic': 'position',
875
875
  }
@@ -1033,7 +1033,7 @@ class woofipro(ccxt.async_support.woofipro):
1033
1033
  await self.load_markets()
1034
1034
  topic = 'balance'
1035
1035
  messageHash = topic
1036
- request = {
1036
+ request: dict = {
1037
1037
  'event': 'subscribe',
1038
1038
  'topic': topic,
1039
1039
  }
@@ -1117,7 +1117,7 @@ class woofipro(ccxt.async_support.woofipro):
1117
1117
  def handle_message(self, client: Client, message):
1118
1118
  if self.handle_error_message(client, message):
1119
1119
  return
1120
- methods = {
1120
+ methods: dict = {
1121
1121
  'ping': self.handle_ping,
1122
1122
  'pong': self.handle_pong,
1123
1123
  'subscribe': self.handle_subscribe,
ccxt/probit.py CHANGED
@@ -405,7 +405,7 @@ class probit(Exchange, ImplicitAPI):
405
405
  # }
406
406
  #
407
407
  currencies = self.safe_value(response, 'data', [])
408
- result = {}
408
+ result: dict = {}
409
409
  for i in range(0, len(currencies)):
410
410
  currency = currencies[i]
411
411
  id = self.safe_string(currency, 'id')
@@ -415,7 +415,7 @@ class probit(Exchange, ImplicitAPI):
415
415
  platforms = self.safe_value(currency, 'platform', [])
416
416
  platformsByPriority = self.sort_by(platforms, 'priority')
417
417
  platform = None
418
- networkList = {}
418
+ networkList: dict = {}
419
419
  for j in range(0, len(platformsByPriority)):
420
420
  network = platformsByPriority[j]
421
421
  idInner = self.safe_string(network, 'id')
@@ -505,7 +505,7 @@ class probit(Exchange, ImplicitAPI):
505
505
  return result
506
506
 
507
507
  def parse_balance(self, response) -> Balances:
508
- result = {
508
+ result: dict = {
509
509
  'info': response,
510
510
  'timestamp': None,
511
511
  'datetime': None,
@@ -554,7 +554,7 @@ class probit(Exchange, ImplicitAPI):
554
554
  """
555
555
  self.load_markets()
556
556
  market = self.market(symbol)
557
- request = {
557
+ request: dict = {
558
558
  'market_id': market['id'],
559
559
  }
560
560
  response = self.publicGetOrderBook(self.extend(request, params))
@@ -580,7 +580,7 @@ class probit(Exchange, ImplicitAPI):
580
580
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
581
581
  """
582
582
  self.load_markets()
583
- request = {}
583
+ request: dict = {}
584
584
  if symbols is not None:
585
585
  marketIds = self.market_ids(symbols)
586
586
  request['market_ids'] = ','.join(marketIds)
@@ -614,7 +614,7 @@ class probit(Exchange, ImplicitAPI):
614
614
  """
615
615
  self.load_markets()
616
616
  market = self.market(symbol)
617
- request = {
617
+ request: dict = {
618
618
  'market_ids': market['id'],
619
619
  }
620
620
  response = self.publicGetTicker(self.extend(request, params))
@@ -696,7 +696,7 @@ class probit(Exchange, ImplicitAPI):
696
696
  self.load_markets()
697
697
  market: Market = None
698
698
  now = self.milliseconds()
699
- request = {
699
+ request: dict = {
700
700
  'limit': 100,
701
701
  'start_time': self.iso8601(now - 31536000000), # -365 days
702
702
  'end_time': self.iso8601(now),
@@ -744,7 +744,7 @@ class probit(Exchange, ImplicitAPI):
744
744
  """
745
745
  self.load_markets()
746
746
  market = self.market(symbol)
747
- request = {
747
+ request: dict = {
748
748
  'market_id': market['id'],
749
749
  'start_time': '1970-01-01T00:00:00.000Z',
750
750
  'end_time': self.iso8601(self.milliseconds()),
@@ -781,7 +781,7 @@ class probit(Exchange, ImplicitAPI):
781
781
  data = self.safe_list(response, 'data', [])
782
782
  return self.parse_trades(data, market, since, limit)
783
783
 
784
- def parse_trade(self, trade, market: Market = None) -> Trade:
784
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
785
785
  #
786
786
  # fetchTrades(public)
787
787
  #
@@ -907,7 +907,7 @@ class probit(Exchange, ImplicitAPI):
907
907
  limit = 100 if (limit is None) else limit
908
908
  requestLimit = self.sum(limit, 1)
909
909
  requestLimit = min(1000, requestLimit) # max 1000
910
- request = {
910
+ request: dict = {
911
911
  'market_ids': market['id'],
912
912
  'interval': interval,
913
913
  'sort': 'asc', # 'asc' will always include the start_time, 'desc' will always include end_time
@@ -986,7 +986,7 @@ class probit(Exchange, ImplicitAPI):
986
986
  """
987
987
  self.load_markets()
988
988
  since = self.parse8601(since)
989
- request = {}
989
+ request: dict = {}
990
990
  market: Market = None
991
991
  if symbol is not None:
992
992
  market = self.market(symbol)
@@ -1006,7 +1006,7 @@ class probit(Exchange, ImplicitAPI):
1006
1006
  :returns Order[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1007
1007
  """
1008
1008
  self.load_markets()
1009
- request = {
1009
+ request: dict = {
1010
1010
  'start_time': self.iso8601(0),
1011
1011
  'end_time': self.iso8601(self.milliseconds()),
1012
1012
  'limit': 100,
@@ -1035,7 +1035,7 @@ class probit(Exchange, ImplicitAPI):
1035
1035
  raise ArgumentsRequired(self.id + ' fetchOrder() requires a symbol argument')
1036
1036
  self.load_markets()
1037
1037
  market = self.market(symbol)
1038
- request = {
1038
+ request: dict = {
1039
1039
  'market_id': market['id'],
1040
1040
  }
1041
1041
  clientOrderId = self.safe_string_2(params, 'clientOrderId', 'client_order_id')
@@ -1049,15 +1049,15 @@ class probit(Exchange, ImplicitAPI):
1049
1049
  order = self.safe_dict(data, 0)
1050
1050
  return self.parse_order(order, market)
1051
1051
 
1052
- def parse_order_status(self, status):
1053
- statuses = {
1052
+ def parse_order_status(self, status: Str):
1053
+ statuses: dict = {
1054
1054
  'open': 'open',
1055
1055
  'cancelled': 'canceled',
1056
1056
  'filled': 'closed',
1057
1057
  }
1058
1058
  return self.safe_string(statuses, status, status)
1059
1059
 
1060
- def parse_order(self, order, market: Market = None) -> Order:
1060
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1061
1061
  #
1062
1062
  # {
1063
1063
  # id,
@@ -1141,7 +1141,7 @@ class probit(Exchange, ImplicitAPI):
1141
1141
  options = self.safe_value(self.options, 'timeInForce')
1142
1142
  defaultTimeInForce = self.safe_value(options, type)
1143
1143
  timeInForce = self.safe_string_2(params, 'timeInForce', 'time_in_force', defaultTimeInForce)
1144
- request = {
1144
+ request: dict = {
1145
1145
  'market_id': market['id'],
1146
1146
  'type': type,
1147
1147
  'side': side,
@@ -1222,7 +1222,7 @@ class probit(Exchange, ImplicitAPI):
1222
1222
  raise ArgumentsRequired(self.id + ' cancelOrder() requires a symbol argument')
1223
1223
  self.load_markets()
1224
1224
  market = self.market(symbol)
1225
- request = {
1225
+ request: dict = {
1226
1226
  'market_id': market['id'],
1227
1227
  'order_id': id,
1228
1228
  }
@@ -1256,7 +1256,7 @@ class probit(Exchange, ImplicitAPI):
1256
1256
  """
1257
1257
  self.load_markets()
1258
1258
  currency = self.currency(code)
1259
- request = {
1259
+ request: dict = {
1260
1260
  'currency_id': currency['id'],
1261
1261
  # 'platform_id': 'TRON',(undocumented)
1262
1262
  }
@@ -1296,7 +1296,7 @@ class probit(Exchange, ImplicitAPI):
1296
1296
  raise InvalidAddress(self.id + ' fetchDepositAddress() returned an empty response')
1297
1297
  return self.parse_deposit_address(firstAddress, currency)
1298
1298
 
1299
- def fetch_deposit_addresses(self, codes: List[str] = None, params={}):
1299
+ def fetch_deposit_addresses(self, codes: Strings = None, params={}):
1300
1300
  """
1301
1301
  :see: https://docs-en.probit.com/reference/deposit_address
1302
1302
  fetch deposit addresses for multiple currencies and chain types
@@ -1305,7 +1305,7 @@ class probit(Exchange, ImplicitAPI):
1305
1305
  :returns dict: a list of `address structures <https://docs.ccxt.com/#/?id=address-structure>`
1306
1306
  """
1307
1307
  self.load_markets()
1308
- request = {}
1308
+ request: dict = {}
1309
1309
  if codes:
1310
1310
  currencyIds = []
1311
1311
  for i in range(0, len(codes)):
@@ -1337,7 +1337,7 @@ class probit(Exchange, ImplicitAPI):
1337
1337
  currency = self.currency(code)
1338
1338
  if tag is None:
1339
1339
  tag = ''
1340
- request = {
1340
+ request: dict = {
1341
1341
  'currency_id': currency['id'],
1342
1342
  # 'platform_id': 'ETH', # if omitted it will use the default platform for the currency
1343
1343
  'address': address,
@@ -1368,7 +1368,7 @@ class probit(Exchange, ImplicitAPI):
1368
1368
  :param dict [params]: extra parameters specific to the exchange API endpoint
1369
1369
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1370
1370
  """
1371
- request = {
1371
+ request: dict = {
1372
1372
  'type': 'deposit',
1373
1373
  }
1374
1374
  result = self.fetch_transactions(code, since, limit, self.extend(request, params))
@@ -1383,7 +1383,7 @@ class probit(Exchange, ImplicitAPI):
1383
1383
  :param dict [params]: extra parameters specific to the exchange API endpoint
1384
1384
  :returns dict[]: a list of `transaction structures <https://docs.ccxt.com/#/?id=transaction-structure>`
1385
1385
  """
1386
- request = {
1386
+ request: dict = {
1387
1387
  'type': 'withdrawal',
1388
1388
  }
1389
1389
  result = self.fetch_transactions(code, since, limit, self.extend(request, params))
@@ -1402,7 +1402,7 @@ class probit(Exchange, ImplicitAPI):
1402
1402
  """
1403
1403
  self.load_markets()
1404
1404
  currency: Currency = None
1405
- request = {}
1405
+ request: dict = {}
1406
1406
  if code is not None:
1407
1407
  currency = self.currency(code)
1408
1408
  request['currency_id'] = currency['id']
@@ -1448,7 +1448,7 @@ class probit(Exchange, ImplicitAPI):
1448
1448
  data = self.safe_list(response, 'data', [])
1449
1449
  return self.parse_transactions(data, currency, since, limit)
1450
1450
 
1451
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
1451
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
1452
1452
  #
1453
1453
  # {
1454
1454
  # "id": "01211d4b-0e68-41d6-97cb-298bfe2cab67",
@@ -1512,7 +1512,7 @@ class probit(Exchange, ImplicitAPI):
1512
1512
  }
1513
1513
 
1514
1514
  def parse_transaction_status(self, status):
1515
- statuses = {
1515
+ statuses: dict = {
1516
1516
  'requested': 'pending',
1517
1517
  'pending': 'pending',
1518
1518
  'confirming': 'pending',
@@ -1629,7 +1629,7 @@ class probit(Exchange, ImplicitAPI):
1629
1629
  #
1630
1630
  depositWithdrawFee = self.deposit_withdraw_fee({})
1631
1631
  platforms = self.safe_value(fee, 'platform', [])
1632
- depositResult = {
1632
+ depositResult: dict = {
1633
1633
  'fee': None,
1634
1634
  'percentage': None,
1635
1635
  }
@@ -1640,7 +1640,7 @@ class probit(Exchange, ImplicitAPI):
1640
1640
  withdrawalFees = self.safe_value(network, 'withdrawal_fee', {})
1641
1641
  withdrawFee = self.safe_number(withdrawalFees[0], 'amount')
1642
1642
  if len(withdrawalFees):
1643
- withdrawResult = {
1643
+ withdrawResult: dict = {
1644
1644
  'fee': withdrawFee,
1645
1645
  'percentage': False if (withdrawFee is not None) else None,
1646
1646
  }
@@ -1703,7 +1703,7 @@ class probit(Exchange, ImplicitAPI):
1703
1703
  :returns: response from exchange
1704
1704
  """
1705
1705
  self.check_required_credentials()
1706
- request = {
1706
+ request: dict = {
1707
1707
  'grant_type': 'client_credentials', # the only supported value
1708
1708
  }
1709
1709
  response = self.accountsPostToken(self.extend(request, params))
@@ -258,6 +258,7 @@ def assert_fee_structure(exchange, skipped_properties, method, entry, key):
258
258
  log_text = log_template(exchange, method, entry)
259
259
  key_string = string_value(key)
260
260
  if isinstance(key, int):
261
+ key = key
261
262
  assert isinstance(entry, list), 'fee container is expected to be an array' + log_text
262
263
  assert key < len(entry), 'fee key ' + key_string + ' was expected to be present in entry' + log_text
263
264
  else:
ccxt/timex.py CHANGED
@@ -379,7 +379,7 @@ class timex(Exchange, ImplicitAPI):
379
379
  params = self.omit(params, 'address')
380
380
  if address is None:
381
381
  raise ArgumentsRequired(self.id + ' fetchDeposits() requires an address parameter')
382
- request = {
382
+ request: dict = {
383
383
  'address': address,
384
384
  }
385
385
  response = self.managerGetDeposits(self.extend(request, params))
@@ -412,7 +412,7 @@ class timex(Exchange, ImplicitAPI):
412
412
  params = self.omit(params, 'address')
413
413
  if address is None:
414
414
  raise ArgumentsRequired(self.id + ' fetchDeposits() requires an address parameter')
415
- request = {
415
+ request: dict = {
416
416
  'address': address,
417
417
  }
418
418
  response = self.managerGetWithdrawals(self.extend(request, params))
@@ -441,7 +441,7 @@ class timex(Exchange, ImplicitAPI):
441
441
  return currency
442
442
  return None
443
443
 
444
- def parse_transaction(self, transaction, currency: Currency = None) -> Transaction:
444
+ def parse_transaction(self, transaction: dict, currency: Currency = None) -> Transaction:
445
445
  #
446
446
  # {
447
447
  # "from": "0x1134cc86b45039cc211c6d1d2e4b3c77f60207ed",
@@ -488,7 +488,7 @@ class timex(Exchange, ImplicitAPI):
488
488
  """
489
489
  self.load_markets()
490
490
  period = self.safe_string(self.options['fetchTickers'], 'period', '1d')
491
- request = {
491
+ request: dict = {
492
492
  'period': self.timeframes[period], # I1, I5, I15, I30, H1, H2, H4, H6, H12, D1, W1
493
493
  }
494
494
  response = self.publicGetTickers(self.extend(request, params))
@@ -522,7 +522,7 @@ class timex(Exchange, ImplicitAPI):
522
522
  self.load_markets()
523
523
  market = self.market(symbol)
524
524
  period = self.safe_string(self.options['fetchTickers'], 'period', '1d')
525
- request = {
525
+ request: dict = {
526
526
  'market': market['id'],
527
527
  'period': self.timeframes[period], # I1, I5, I15, I30, H1, H2, H4, H6, H12, D1, W1
528
528
  }
@@ -558,7 +558,7 @@ class timex(Exchange, ImplicitAPI):
558
558
  """
559
559
  self.load_markets()
560
560
  market = self.market(symbol)
561
- request = {
561
+ request: dict = {
562
562
  'market': market['id'],
563
563
  }
564
564
  if limit is not None:
@@ -607,7 +607,7 @@ class timex(Exchange, ImplicitAPI):
607
607
  defaultSort = self.safe_value(options, 'sort', 'timestamp,asc')
608
608
  sort = self.safe_string(params, 'sort', defaultSort)
609
609
  query = self.omit(params, 'sort')
610
- request = {
610
+ request: dict = {
611
611
  # 'address': 'string', # trade’s member account(?)
612
612
  # 'cursor': 1234, # int64(?)
613
613
  # 'from': self.iso8601(since),
@@ -648,7 +648,7 @@ class timex(Exchange, ImplicitAPI):
648
648
  """
649
649
  self.load_markets()
650
650
  market = self.market(symbol)
651
- request = {
651
+ request: dict = {
652
652
  'market': market['id'],
653
653
  'period': self.safe_string(self.timeframes, timeframe, timeframe),
654
654
  }
@@ -680,7 +680,7 @@ class timex(Exchange, ImplicitAPI):
680
680
  return self.parse_ohlcvs(response, market, timeframe, since, limit)
681
681
 
682
682
  def parse_balance(self, response) -> Balances:
683
- result = {
683
+ result: dict = {
684
684
  'info': response,
685
685
  'timestamp': None,
686
686
  'datetime': None,
@@ -735,7 +735,7 @@ class timex(Exchange, ImplicitAPI):
735
735
  if postOnly:
736
736
  uppercaseType = 'POST_ONLY'
737
737
  params = self.omit(params, ['postOnly'])
738
- request = {
738
+ request: dict = {
739
739
  'symbol': market['id'],
740
740
  'quantity': self.amount_to_precision(symbol, amount),
741
741
  'side': uppercaseSide,
@@ -788,7 +788,7 @@ class timex(Exchange, ImplicitAPI):
788
788
  def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
789
789
  self.load_markets()
790
790
  market = self.market(symbol)
791
- request = {
791
+ request: dict = {
792
792
  'id': id,
793
793
  }
794
794
  if amount is not None:
@@ -855,7 +855,7 @@ class timex(Exchange, ImplicitAPI):
855
855
  :returns dict: an list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
856
856
  """
857
857
  self.load_markets()
858
- request = {
858
+ request: dict = {
859
859
  'id': ids,
860
860
  }
861
861
  response = self.tradingDeleteOrders(self.extend(request, params))
@@ -894,7 +894,7 @@ class timex(Exchange, ImplicitAPI):
894
894
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
895
895
  """
896
896
  self.load_markets()
897
- request = {
897
+ request: dict = {
898
898
  'orderHash': id,
899
899
  }
900
900
  response = self.historyGetOrdersDetails(request)
@@ -950,7 +950,7 @@ class timex(Exchange, ImplicitAPI):
950
950
  defaultSort = self.safe_value(options, 'sort', 'createdAt,asc')
951
951
  sort = self.safe_string(params, 'sort', defaultSort)
952
952
  query = self.omit(params, 'sort')
953
- request = {
953
+ request: dict = {
954
954
  # 'clientOrderId': '123', # order’s client id list for filter
955
955
  # page: 0, # results page you want to retrieve(0 .. N)
956
956
  'sort': sort, # sorting criteria in the format "property,asc" or "property,desc", default order is ascending, multiple sort criteria are supported
@@ -1001,7 +1001,7 @@ class timex(Exchange, ImplicitAPI):
1001
1001
  defaultSort = self.safe_value(options, 'sort', 'createdAt,asc')
1002
1002
  sort = self.safe_string(params, 'sort', defaultSort)
1003
1003
  query = self.omit(params, 'sort')
1004
- request = {
1004
+ request: dict = {
1005
1005
  # 'clientOrderId': '123', # order’s client id list for filter
1006
1006
  # page: 0, # results page you want to retrieve(0 .. N)
1007
1007
  'sort': sort, # sorting criteria in the format "property,asc" or "property,desc", default order is ascending, multiple sort criteria are supported
@@ -1056,7 +1056,7 @@ class timex(Exchange, ImplicitAPI):
1056
1056
  defaultSort = self.safe_value(options, 'sort', 'timestamp,asc')
1057
1057
  sort = self.safe_string(params, 'sort', defaultSort)
1058
1058
  query = self.omit(params, 'sort')
1059
- request = {
1059
+ request: dict = {
1060
1060
  # 'cursorId': 123, # int64(?)
1061
1061
  # 'from': self.iso8601(since),
1062
1062
  # 'makerOrderId': '1234', # maker order hash
@@ -1099,7 +1099,7 @@ class timex(Exchange, ImplicitAPI):
1099
1099
  trades = self.safe_list(response, 'trades', [])
1100
1100
  return self.parse_trades(trades, market, since, limit)
1101
1101
 
1102
- def parse_trading_fee(self, fee, market: Market = None) -> TradingFeeInterface:
1102
+ def parse_trading_fee(self, fee: dict, market: Market = None) -> TradingFeeInterface:
1103
1103
  #
1104
1104
  # {
1105
1105
  # "fee": 0.0075,
@@ -1127,7 +1127,7 @@ class timex(Exchange, ImplicitAPI):
1127
1127
  """
1128
1128
  self.load_markets()
1129
1129
  market = self.market(symbol)
1130
- request = {
1130
+ request: dict = {
1131
1131
  'markets': market['id'],
1132
1132
  }
1133
1133
  response = self.tradingGetFees(self.extend(request, params))
@@ -1225,7 +1225,7 @@ class timex(Exchange, ImplicitAPI):
1225
1225
  'info': market,
1226
1226
  }
1227
1227
 
1228
- def parse_currency(self, currency):
1228
+ def parse_currency(self, currency: dict):
1229
1229
  #
1230
1230
  # {
1231
1231
  # "symbol": "BTC",
@@ -1348,7 +1348,7 @@ class timex(Exchange, ImplicitAPI):
1348
1348
  'quoteVolume': self.safe_string(ticker, 'volumeQuote'),
1349
1349
  }, market)
1350
1350
 
1351
- def parse_trade(self, trade, market: Market = None) -> Trade:
1351
+ def parse_trade(self, trade: dict, market: Market = None) -> Trade:
1352
1352
  #
1353
1353
  # fetchTrades(public)
1354
1354
  #
@@ -1435,7 +1435,7 @@ class timex(Exchange, ImplicitAPI):
1435
1435
  self.safe_number(ohlcv, 'volume'),
1436
1436
  ]
1437
1437
 
1438
- def parse_order(self, order, market: Market = None) -> Order:
1438
+ def parse_order(self, order: dict, market: Market = None) -> Order:
1439
1439
  #
1440
1440
  # fetchOrder, createOrder, cancelOrder, cancelOrders, fetchOpenOrders, fetchClosedOrders
1441
1441
  #
@@ -1510,7 +1510,7 @@ class timex(Exchange, ImplicitAPI):
1510
1510
  """
1511
1511
  self.load_markets()
1512
1512
  currency = self.currency(code)
1513
- request = {
1513
+ request: dict = {
1514
1514
  'symbol': currency['code'],
1515
1515
  }
1516
1516
  response = self.currenciesGetSSymbol(self.extend(request, params))