ccxt 4.1.47__py2.py3-none-any.whl → 4.1.49__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.

Potentially problematic release.


This version of ccxt might be problematic. Click here for more details.

Files changed (166) hide show
  1. ccxt/__init__.py +3 -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/abstract/htx.py +541 -0
  7. ccxt/ace.py +2 -2
  8. ccxt/ascendex.py +2 -2
  9. ccxt/async_support/__init__.py +3 -1
  10. ccxt/async_support/ace.py +2 -2
  11. ccxt/async_support/ascendex.py +2 -2
  12. ccxt/async_support/base/exchange.py +1 -1
  13. ccxt/async_support/bigone.py +2 -2
  14. ccxt/async_support/binance.py +5 -3
  15. ccxt/async_support/bingx.py +3 -3
  16. ccxt/async_support/bitbns.py +2 -2
  17. ccxt/async_support/bitfinex.py +2 -2
  18. ccxt/async_support/bitfinex2.py +2 -2
  19. ccxt/async_support/bitget.py +3 -3
  20. ccxt/async_support/bithumb.py +2 -2
  21. ccxt/async_support/bitmart.py +157 -53
  22. ccxt/async_support/bitmex.py +2 -2
  23. ccxt/async_support/bitopro.py +2 -2
  24. ccxt/async_support/bitpanda.py +2 -2
  25. ccxt/async_support/bitrue.py +2 -2
  26. ccxt/async_support/bitstamp.py +2 -2
  27. ccxt/async_support/bittrex.py +2 -2
  28. ccxt/async_support/bitvavo.py +2 -2
  29. ccxt/async_support/blockchaincom.py +2 -2
  30. ccxt/async_support/btcalpha.py +2 -2
  31. ccxt/async_support/btcturk.py +2 -2
  32. ccxt/async_support/bybit.py +2 -2
  33. ccxt/async_support/cex.py +2 -2
  34. ccxt/async_support/coinbase.py +2 -2
  35. ccxt/async_support/coinbasepro.py +2 -2
  36. ccxt/async_support/coinex.py +63 -20
  37. ccxt/async_support/coinfalcon.py +2 -2
  38. ccxt/async_support/coinlist.py +2 -2
  39. ccxt/async_support/coinone.py +2 -2
  40. ccxt/async_support/coinsph.py +2 -2
  41. ccxt/async_support/coinspot.py +2 -2
  42. ccxt/async_support/cryptocom.py +2 -2
  43. ccxt/async_support/currencycom.py +2 -2
  44. ccxt/async_support/delta.py +2 -2
  45. ccxt/async_support/deribit.py +2 -2
  46. ccxt/async_support/digifinex.py +2 -2
  47. ccxt/async_support/exmo.py +2 -2
  48. ccxt/async_support/gate.py +2 -2
  49. ccxt/async_support/gemini.py +3 -3
  50. ccxt/async_support/hitbtc.py +2 -2
  51. ccxt/async_support/hollaex.py +2 -2
  52. ccxt/async_support/htx.py +7853 -0
  53. ccxt/async_support/huobi.py +3 -7846
  54. ccxt/async_support/huobijp.py +2 -2
  55. ccxt/async_support/idex.py +2 -2
  56. ccxt/async_support/indodax.py +2 -2
  57. ccxt/async_support/kraken.py +2 -6
  58. ccxt/async_support/krakenfutures.py +2 -2
  59. ccxt/async_support/kucoin.py +2 -2
  60. ccxt/async_support/kuna.py +2 -2
  61. ccxt/async_support/latoken.py +2 -2
  62. ccxt/async_support/lbank.py +2 -2
  63. ccxt/async_support/lbank2.py +2 -2
  64. ccxt/async_support/luno.py +2 -2
  65. ccxt/async_support/lykke.py +2 -2
  66. ccxt/async_support/mexc.py +23 -23
  67. ccxt/async_support/novadax.py +2 -2
  68. ccxt/async_support/oceanex.py +2 -2
  69. ccxt/async_support/okcoin.py +3 -3
  70. ccxt/async_support/okx.py +3 -3
  71. ccxt/async_support/phemex.py +2 -2
  72. ccxt/async_support/poloniex.py +2 -2
  73. ccxt/async_support/poloniexfutures.py +2 -2
  74. ccxt/async_support/probit.py +2 -2
  75. ccxt/async_support/tidex.py +2 -2
  76. ccxt/async_support/timex.py +4 -4
  77. ccxt/async_support/tokocrypto.py +2 -2
  78. ccxt/async_support/upbit.py +2 -2
  79. ccxt/async_support/wavesexchange.py +2 -2
  80. ccxt/async_support/wazirx.py +2 -2
  81. ccxt/async_support/whitebit.py +2 -2
  82. ccxt/async_support/yobit.py +2 -2
  83. ccxt/async_support/zonda.py +2 -2
  84. ccxt/base/exchange.py +1 -1
  85. ccxt/base/types.py +43 -4
  86. ccxt/bigone.py +2 -2
  87. ccxt/binance.py +5 -3
  88. ccxt/bingx.py +3 -3
  89. ccxt/bitbns.py +2 -2
  90. ccxt/bitfinex.py +2 -2
  91. ccxt/bitfinex2.py +2 -2
  92. ccxt/bitget.py +3 -3
  93. ccxt/bithumb.py +2 -2
  94. ccxt/bitmart.py +157 -53
  95. ccxt/bitmex.py +2 -2
  96. ccxt/bitopro.py +2 -2
  97. ccxt/bitpanda.py +2 -2
  98. ccxt/bitrue.py +2 -2
  99. ccxt/bitstamp.py +2 -2
  100. ccxt/bittrex.py +2 -2
  101. ccxt/bitvavo.py +2 -2
  102. ccxt/blockchaincom.py +2 -2
  103. ccxt/btcalpha.py +2 -2
  104. ccxt/btcturk.py +2 -2
  105. ccxt/bybit.py +2 -2
  106. ccxt/cex.py +2 -2
  107. ccxt/coinbase.py +2 -2
  108. ccxt/coinbasepro.py +2 -2
  109. ccxt/coinex.py +63 -20
  110. ccxt/coinfalcon.py +2 -2
  111. ccxt/coinlist.py +2 -2
  112. ccxt/coinone.py +2 -2
  113. ccxt/coinsph.py +2 -2
  114. ccxt/coinspot.py +2 -2
  115. ccxt/cryptocom.py +2 -2
  116. ccxt/currencycom.py +2 -2
  117. ccxt/delta.py +2 -2
  118. ccxt/deribit.py +2 -2
  119. ccxt/digifinex.py +2 -2
  120. ccxt/exmo.py +2 -2
  121. ccxt/gate.py +2 -2
  122. ccxt/gemini.py +3 -3
  123. ccxt/hitbtc.py +2 -2
  124. ccxt/hollaex.py +2 -2
  125. ccxt/htx.py +7852 -0
  126. ccxt/huobi.py +3 -7845
  127. ccxt/huobijp.py +2 -2
  128. ccxt/idex.py +2 -2
  129. ccxt/indodax.py +2 -2
  130. ccxt/kraken.py +2 -6
  131. ccxt/krakenfutures.py +2 -2
  132. ccxt/kucoin.py +2 -2
  133. ccxt/kuna.py +2 -2
  134. ccxt/latoken.py +2 -2
  135. ccxt/lbank.py +2 -2
  136. ccxt/lbank2.py +2 -2
  137. ccxt/luno.py +2 -2
  138. ccxt/lykke.py +2 -2
  139. ccxt/mexc.py +23 -23
  140. ccxt/novadax.py +2 -2
  141. ccxt/oceanex.py +2 -2
  142. ccxt/okcoin.py +3 -3
  143. ccxt/okx.py +3 -3
  144. ccxt/phemex.py +2 -2
  145. ccxt/poloniex.py +2 -2
  146. ccxt/poloniexfutures.py +2 -2
  147. ccxt/pro/__init__.py +3 -1
  148. ccxt/pro/htx.py +2177 -0
  149. ccxt/pro/huobi.py +4 -2166
  150. ccxt/probit.py +2 -2
  151. ccxt/test/test_async.py +15 -1
  152. ccxt/test/test_sync.py +15 -1
  153. ccxt/tidex.py +2 -2
  154. ccxt/timex.py +4 -4
  155. ccxt/tokocrypto.py +2 -2
  156. ccxt/upbit.py +2 -2
  157. ccxt/wavesexchange.py +2 -2
  158. ccxt/wazirx.py +2 -2
  159. ccxt/whitebit.py +2 -2
  160. ccxt/yobit.py +2 -2
  161. ccxt/zonda.py +2 -2
  162. ccxt-4.1.49.dist-info/METADATA +624 -0
  163. {ccxt-4.1.47.dist-info → ccxt-4.1.49.dist-info}/RECORD +165 -161
  164. ccxt-4.1.47.dist-info/METADATA +0 -624
  165. {ccxt-4.1.47.dist-info → ccxt-4.1.49.dist-info}/WHEEL +0 -0
  166. {ccxt-4.1.47.dist-info → ccxt-4.1.49.dist-info}/top_level.txt +0 -0
ccxt/coinex.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinex import ImplicitAPI
8
- from ccxt.base.types import Balances, Order, OrderSide, OrderType, Ticker, Trade, Transaction
8
+ from ccxt.base.types import Balances, Order, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
9
9
  from typing import Optional
10
10
  from typing import List
11
11
  from ccxt.base.errors import ExchangeError
@@ -296,6 +296,7 @@ class coinex(Exchange, ImplicitAPI):
296
296
  },
297
297
  },
298
298
  'options': {
299
+ 'brokerId': 'x-167673045',
299
300
  'createMarketBuyOrderRequiresPrice': True,
300
301
  'defaultType': 'spot', # spot, swap, margin
301
302
  'defaultSubType': 'linear', # linear, inverse
@@ -315,6 +316,26 @@ class coinex(Exchange, ImplicitAPI):
315
316
  'ACM': 'Actinium',
316
317
  },
317
318
  'precisionMode': TICK_SIZE,
319
+ 'exceptions': {
320
+ 'exact': {
321
+ # https://github.com/coinexcom/coinex_exchange_api/wiki/013error_code
322
+ '23': PermissionDenied, # IP Prohibited
323
+ '24': AuthenticationError,
324
+ '25': AuthenticationError,
325
+ '34': AuthenticationError, # Access id is expires
326
+ '35': ExchangeNotAvailable, # Service unavailable
327
+ '36': RequestTimeout, # Service timeout
328
+ '213': RateLimitExceeded, # Too many requests
329
+ '107': InsufficientFunds,
330
+ '600': OrderNotFound,
331
+ '601': InvalidOrder,
332
+ '602': InvalidOrder,
333
+ '606': InvalidOrder,
334
+ },
335
+ 'broad': {
336
+ 'ip not allow visit': PermissionDenied,
337
+ },
338
+ },
318
339
  })
319
340
 
320
341
  def fetch_currencies(self, params={}):
@@ -776,7 +797,7 @@ class coinex(Exchange, ImplicitAPI):
776
797
  #
777
798
  return self.parse_ticker(response['data'], market)
778
799
 
779
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
800
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
780
801
  """
781
802
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
782
803
  :see: https://viabtc.github.io/coinex_api_en_doc/spot/#docsspot001_market008_all_market_ticker
@@ -1499,6 +1520,7 @@ class coinex(Exchange, ImplicitAPI):
1499
1520
  # "status": "done",
1500
1521
  # "taker_fee_rate": "0.0005",
1501
1522
  # "type": "sell",
1523
+ # "client_id": "",
1502
1524
  # }
1503
1525
  #
1504
1526
  # Spot and Margin createOrder, cancelOrder, fetchOrder
@@ -1526,6 +1548,7 @@ class coinex(Exchange, ImplicitAPI):
1526
1548
  # "stock_fee":"0",
1527
1549
  # "taker_fee_rate":"0.002",
1528
1550
  # "type":"buy"
1551
+ # "client_id": "",
1529
1552
  # }
1530
1553
  #
1531
1554
  # Swap createOrder, cancelOrder, fetchOrder
@@ -1733,9 +1756,12 @@ class coinex(Exchange, ImplicitAPI):
1733
1756
  type = 'market'
1734
1757
  else:
1735
1758
  type = rawType
1759
+ clientOrderId = self.safe_string(order, 'client_id')
1760
+ if clientOrderId == '':
1761
+ clientOrderId = None
1736
1762
  return self.safe_order({
1737
1763
  'id': self.safe_string_2(order, 'id', 'order_id'),
1738
- 'clientOrderId': None,
1764
+ 'clientOrderId': clientOrderId,
1739
1765
  'datetime': self.iso8601(timestamp),
1740
1766
  'timestamp': timestamp,
1741
1767
  'lastTradeTimestamp': self.safe_timestamp(order, 'update_time'),
@@ -1790,6 +1816,7 @@ class coinex(Exchange, ImplicitAPI):
1790
1816
  self.load_markets()
1791
1817
  market = self.market(symbol)
1792
1818
  swap = market['swap']
1819
+ clientOrderId = self.safe_string_2(params, 'client_id', 'clientOrderId')
1793
1820
  stopPrice = self.safe_value_2(params, 'stopPrice', 'triggerPrice')
1794
1821
  stopLossPrice = self.safe_value(params, 'stopLossPrice')
1795
1822
  takeProfitPrice = self.safe_value(params, 'takeProfitPrice')
@@ -1808,6 +1835,12 @@ class coinex(Exchange, ImplicitAPI):
1808
1835
  request = {
1809
1836
  'market': market['id'],
1810
1837
  }
1838
+ if clientOrderId is None:
1839
+ defaultId = 'x-167673045'
1840
+ brokerId = self.safe_string(self.options, 'brokerId', defaultId)
1841
+ request['client_id'] = brokerId + '-' + self.uuid16()
1842
+ else:
1843
+ request['client_id'] = clientOrderId
1811
1844
  if swap:
1812
1845
  if stopLossPrice or takeProfitPrice:
1813
1846
  request['stop_type'] = self.safe_integer(params, 'stop_type', 1) # 1: triggered by the latest transaction, 2: mark price, 3: index price
@@ -4498,6 +4531,29 @@ class coinex(Exchange, ImplicitAPI):
4498
4531
  url = self.urls['api'][api] + '/' + self.version + '/' + path
4499
4532
  query = self.omit(params, self.extract_params(path))
4500
4533
  nonce = str(self.nonce())
4534
+ if method == 'POST':
4535
+ parts = path.split('/')
4536
+ firstPart = self.safe_string(parts, 0, '')
4537
+ numParts = len(parts)
4538
+ lastPart = self.safe_string(parts, numParts - 1, '')
4539
+ lastWords = lastPart.split('_')
4540
+ numWords = len(lastWords)
4541
+ lastWord = self.safe_string(lastWords, numWords - 1, '')
4542
+ if (firstPart == 'order') and (lastWord == 'limit' or lastWord == 'market'):
4543
+ # inject in implicit API calls
4544
+ # POST /order/limit - Place limit orders
4545
+ # POST /order/market - Place market orders
4546
+ # POST /order/stop/limit - Place stop limit orders
4547
+ # POST /order/stop/market - Place stop market orders
4548
+ # POST /perpetual/v1/order/put_limit - Place limit orders
4549
+ # POST /perpetual/v1/order/put_market - Place market orders
4550
+ # POST /perpetual/v1/order/put_stop_limit - Place stop limit orders
4551
+ # POST /perpetual/v1/order/put_stop_market - Place stop market orders
4552
+ clientOrderId = self.safe_string(params, 'client_id')
4553
+ if clientOrderId is None:
4554
+ defaultId = 'x-167673045'
4555
+ brokerId = self.safe_value(self.options, 'brokerId', defaultId)
4556
+ query['client_id'] = brokerId + '_' + self.uuid16()
4501
4557
  if api == 'perpetualPrivate' or url == 'https://api.coinex.com/perpetual/v1/market/user_deals':
4502
4558
  self.check_required_credentials()
4503
4559
  query = self.extend({
@@ -4545,21 +4601,8 @@ class coinex(Exchange, ImplicitAPI):
4545
4601
  data = self.safe_value(response, 'data')
4546
4602
  message = self.safe_string(response, 'message')
4547
4603
  if (code != '0') or ((message != 'Success') and (message != 'Succeeded') and (message != 'Ok') and not data):
4548
- responseCodes = {
4549
- # https://github.com/coinexcom/coinex_exchange_api/wiki/013error_code
4550
- '23': PermissionDenied, # IP Prohibited
4551
- '24': AuthenticationError,
4552
- '25': AuthenticationError,
4553
- '34': AuthenticationError, # Access id is expires
4554
- '35': ExchangeNotAvailable, # Service unavailable
4555
- '36': RequestTimeout, # Service timeout
4556
- '213': RateLimitExceeded, # Too many requests
4557
- '107': InsufficientFunds,
4558
- '600': OrderNotFound,
4559
- '601': InvalidOrder,
4560
- '602': InvalidOrder,
4561
- '606': InvalidOrder,
4562
- }
4563
- ErrorClass = self.safe_value(responseCodes, code, ExchangeError)
4564
- raise ErrorClass(response['message'])
4604
+ feedback = self.id + ' ' + message
4605
+ self.throw_broadly_matched_exception(self.exceptions['broad'], message, feedback)
4606
+ self.throw_exactly_matched_exception(self.exceptions['exact'], code, feedback)
4607
+ raise ExchangeError(feedback)
4565
4608
  return None
ccxt/coinfalcon.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinfalcon import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -275,7 +275,7 @@ class coinfalcon(Exchange, ImplicitAPI):
275
275
  tickers = self.fetch_tickers([symbol], params)
276
276
  return tickers[symbol]
277
277
 
278
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
278
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
279
279
  """
280
280
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
281
281
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/coinlist.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinlist import ImplicitAPI
8
8
  import hashlib
9
9
  import math
10
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
10
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
11
11
  from typing import Optional
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
@@ -483,7 +483,7 @@ class coinlist(Exchange, ImplicitAPI):
483
483
  })
484
484
  return result
485
485
 
486
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
486
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
487
487
  """
488
488
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
489
489
  :see: https://trade-docs.coinlist.co/?javascript--nodejs#get-symbol-summaries
ccxt/coinone.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinone import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -285,7 +285,7 @@ class coinone(Exchange, ImplicitAPI):
285
285
  timestamp = self.safe_timestamp(response, 'timestamp')
286
286
  return self.parse_order_book(response, market['symbol'], timestamp, 'bid', 'ask', 'price', 'qty')
287
287
 
288
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
288
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
289
289
  """
290
290
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
291
291
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/coinsph.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinsph import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -604,7 +604,7 @@ class coinsph(Exchange, ImplicitAPI):
604
604
  self.set_markets(result)
605
605
  return result
606
606
 
607
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
607
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
608
608
  """
609
609
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
610
610
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/coinspot.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.coinspot import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, OrderBook, OrderSide, OrderType, Ticker, Trade
9
+ from ccxt.base.types import Balances, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -272,7 +272,7 @@ class coinspot(Exchange, ImplicitAPI):
272
272
  ticker = self.safe_value(prices, id)
273
273
  return self.parse_ticker(ticker, market)
274
274
 
275
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
275
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
276
276
  """
277
277
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
278
278
  :see: https://www.coinspot.com.au/api#latestprices
ccxt/cryptocom.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.cryptocom import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import OrderRequest, Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
9
+ from ccxt.base.types import OrderRequest, Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -581,7 +581,7 @@ class cryptocom(Exchange, ImplicitAPI):
581
581
  })
582
582
  return result
583
583
 
584
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
584
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
585
585
  """
586
586
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
587
587
  :see: https://exchange-docs.crypto.com/spot/index.html#public-get-ticker
ccxt/currencycom.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.currencycom import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -884,7 +884,7 @@ class currencycom(Exchange, ImplicitAPI):
884
884
  #
885
885
  return self.parse_ticker(response, market)
886
886
 
887
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
887
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
888
888
  """
889
889
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
890
890
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/delta.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.delta import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -1091,7 +1091,7 @@ class delta(Exchange, ImplicitAPI):
1091
1091
  result = self.safe_value(response, 'result', {})
1092
1092
  return self.parse_ticker(result, market)
1093
1093
 
1094
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
1094
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
1095
1095
  """
1096
1096
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1097
1097
  :see: https://docs.delta.exchange/#get-tickers-for-products
ccxt/deribit.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.deribit import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -1077,7 +1077,7 @@ class deribit(Exchange, ImplicitAPI):
1077
1077
  result = self.safe_value(response, 'result')
1078
1078
  return self.parse_ticker(result, market)
1079
1079
 
1080
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
1080
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
1081
1081
  """
1082
1082
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1083
1083
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/digifinex.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.digifinex import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import OrderRequest, Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
10
+ from ccxt.base.types import OrderRequest, Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
11
11
  from typing import Optional
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
@@ -925,7 +925,7 @@ class digifinex(Exchange, ImplicitAPI):
925
925
  timestamp = self.safe_timestamp(response, 'date')
926
926
  return self.parse_order_book(orderBook, market['symbol'], timestamp)
927
927
 
928
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
928
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
929
929
  """
930
930
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
931
931
  :see: https://docs.digifinex.com/en-ww/spot/v3/rest.html#ticker-price
ccxt/exmo.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.exmo import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -1032,7 +1032,7 @@ class exmo(Exchange, ImplicitAPI):
1032
1032
  'info': ticker,
1033
1033
  }, market)
1034
1034
 
1035
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
1035
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
1036
1036
  """
1037
1037
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1038
1038
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/gate.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.gate import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import OrderRequest, Balances, Order, OrderBook, OrderSide, OrderType, FundingHistory, Ticker, Trade, Transaction
9
+ from ccxt.base.types import OrderRequest, Balances, Order, OrderBook, OrderSide, OrderType, FundingHistory, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -2468,7 +2468,7 @@ class gate(Exchange, ImplicitAPI):
2468
2468
  'info': ticker,
2469
2469
  }, market)
2470
2470
 
2471
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
2471
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
2472
2472
  """
2473
2473
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
2474
2474
  :see: https://www.gate.io/docs/developers/apiv4/en/#get-details-of-a-specifc-order
ccxt/gemini.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.gemini import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Market, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -577,7 +577,7 @@ class gemini(Exchange, ImplicitAPI):
577
577
  result[marketId] = self.parse_market(responseInner)
578
578
  return self.to_array(result)
579
579
 
580
- def parse_market(self, response):
580
+ def parse_market(self, response) -> Market:
581
581
  marketId = self.safe_string_lower(response, 'symbol')
582
582
  baseId = self.safe_string(response, 'base_currency')
583
583
  quoteId = self.safe_string(response, 'quote_currency')
@@ -820,7 +820,7 @@ class gemini(Exchange, ImplicitAPI):
820
820
  'info': ticker,
821
821
  }, market)
822
822
 
823
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
823
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
824
824
  """
825
825
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
826
826
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/hitbtc.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.hitbtc import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, MarginMode, Trade, Transaction
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, MarginMode, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ExchangeError
@@ -1042,7 +1042,7 @@ class hitbtc(Exchange, ImplicitAPI):
1042
1042
  #
1043
1043
  return self.parse_ticker(response, market)
1044
1044
 
1045
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
1045
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
1046
1046
  """
1047
1047
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1048
1048
  :see: https://api.hitbtc.com/#tickers
ccxt/hollaex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.hollaex import ImplicitAPI
8
8
  import hashlib
9
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
9
+ from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Tickers, Trade, Transaction
10
10
  from typing import Optional
11
11
  from typing import List
12
12
  from ccxt.base.errors import ArgumentsRequired
@@ -491,7 +491,7 @@ class hollaex(Exchange, ImplicitAPI):
491
491
  #
492
492
  return self.parse_ticker(response, market)
493
493
 
494
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
494
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
495
495
  """
496
496
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
497
497
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned