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
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.timex import ImplicitAPI
8
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
8
+ from ccxt.base.types import Balances, Market, Order, OrderBook, 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
@@ -456,7 +456,7 @@ class timex(Exchange, ImplicitAPI):
456
456
  'fee': None,
457
457
  }
458
458
 
459
- async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
459
+ async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
460
460
  """
461
461
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
462
462
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
@@ -1104,7 +1104,7 @@ class timex(Exchange, ImplicitAPI):
1104
1104
  result = self.safe_value(response, 0, {})
1105
1105
  return self.parse_trading_fee(result, market)
1106
1106
 
1107
- def parse_market(self, market):
1107
+ def parse_market(self, market) -> Market:
1108
1108
  #
1109
1109
  # {
1110
1110
  # "symbol": "ETHBTC",
@@ -1134,7 +1134,7 @@ class timex(Exchange, ImplicitAPI):
1134
1134
  minBase = self.safe_string(market, 'baseMinSize')
1135
1135
  minAmount = Precise.string_max(amountIncrement, minBase)
1136
1136
  priceIncrement = self.safe_string(market, 'tickSize')
1137
- minCost = self.safe_string(market, 'quoteMinSize')
1137
+ minCost = self.safe_number(market, 'quoteMinSize')
1138
1138
  return {
1139
1139
  'id': id,
1140
1140
  'symbol': base + '/' + quote,
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.tokocrypto import ImplicitAPI
8
8
  import hashlib
9
9
  import json
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
@@ -1143,7 +1143,7 @@ class tokocrypto(Exchange, ImplicitAPI):
1143
1143
  'info': ticker,
1144
1144
  }, market)
1145
1145
 
1146
- async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
1146
+ async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
1147
1147
  """
1148
1148
  :see: https://binance-docs.github.io/apidocs/spot/en/#24hr-ticker-price-change-statistics
1149
1149
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.upbit import ImplicitAPI
8
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
8
+ from ccxt.base.types import Balances, Order, OrderBook, 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
@@ -650,7 +650,7 @@ class upbit(Exchange, ImplicitAPI):
650
650
  'info': ticker,
651
651
  }, market)
652
652
 
653
- async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
653
+ async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
654
654
  """
655
655
  :see: https://docs.upbit.com/reference/ticker%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4
656
656
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
@@ -7,7 +7,7 @@ from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.wavesexchange import ImplicitAPI
8
8
  import asyncio
9
9
  import json
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 typing import Any
@@ -861,7 +861,7 @@ class wavesexchange(Exchange, ImplicitAPI):
861
861
  dataTicker = self.safe_value(ticker, 'data', {})
862
862
  return self.parse_ticker(dataTicker, market)
863
863
 
864
- async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
864
+ async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
865
865
  """
866
866
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
867
867
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.wazirx 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
@@ -407,7 +407,7 @@ class wazirx(Exchange, ImplicitAPI):
407
407
  #
408
408
  return self.parse_ticker(ticker, market)
409
409
 
410
- async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
410
+ async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
411
411
  """
412
412
  :see: https://docs.wazirx.com/#24hr-tickers-price-change-statistics
413
413
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.whitebit 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
@@ -778,7 +778,7 @@ class whitebit(Exchange, ImplicitAPI):
778
778
  'info': ticker,
779
779
  }, market)
780
780
 
781
- async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
781
+ async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
782
782
  """
783
783
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
784
784
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.yobit 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
@@ -536,7 +536,7 @@ class yobit(Exchange, ImplicitAPI):
536
536
  'info': ticker,
537
537
  }, market)
538
538
 
539
- async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
539
+ async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
540
540
  """
541
541
  :see: https://yobit.net/en/api
542
542
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
@@ -6,7 +6,7 @@
6
6
  from ccxt.async_support.base.exchange import Exchange
7
7
  from ccxt.abstract.zonda 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
@@ -721,7 +721,7 @@ class zonda(Exchange, ImplicitAPI):
721
721
  stats = self.safe_value_2(response, 'ticker', 'stats')
722
722
  return self.parse_ticker(stats, market)
723
723
 
724
- async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
724
+ async def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
725
725
  """
726
726
  * @ignore
727
727
  v1_01PublicGetTradingTicker retrieves timestamp, datetime, bid, ask, close, last, previousClose for each market, v1_01PublicGetTradingStats retrieves high, low, volume and opening price of each market
ccxt/base/exchange.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.1.47'
7
+ __version__ = '4.1.49'
8
8
 
9
9
  # -----------------------------------------------------------------------------
10
10
 
ccxt/base/types.py CHANGED
@@ -56,10 +56,10 @@ class Fee(TypedDict):
56
56
 
57
57
 
58
58
  class Trade(TypedDict):
59
+ info: Dict[str, Any]
59
60
  amount: Numeric
60
61
  datetime: str
61
62
  id: str
62
- info: None
63
63
  order: str
64
64
  price: Numeric
65
65
  timestamp: int
@@ -72,6 +72,7 @@ class Trade(TypedDict):
72
72
 
73
73
 
74
74
  class Position(TypedDict):
75
+ info: Dict[str, Any]
75
76
  symbol: str
76
77
  id: str
77
78
  timestamp: int
@@ -98,7 +99,6 @@ class Position(TypedDict):
98
99
  percentage: Numeric
99
100
  stopLossPrice: Numeric
100
101
  takeProfitPrice: Numeric
101
- info: Dict[str, Any]
102
102
 
103
103
 
104
104
  class OrderRequest(TypedDict):
@@ -111,6 +111,7 @@ class OrderRequest(TypedDict):
111
111
 
112
112
 
113
113
  class Order(TypedDict):
114
+ info: Dict[str, Any]
114
115
  id: str
115
116
  clientOrderId: str
116
117
  datetime: str
@@ -133,7 +134,6 @@ class Order(TypedDict):
133
134
  cost: Numeric
134
135
  trades: List[Trade]
135
136
  fee: Fee
136
- info: Dict[str, Any]
137
137
 
138
138
 
139
139
  class FundingHistory(TypedDict):
@@ -183,8 +183,8 @@ class Transaction(TypedDict):
183
183
 
184
184
 
185
185
  class Ticker(TypedDict):
186
- symbol: str
187
186
  info: Dict[str, Any]
187
+ symbol: str
188
188
  timestamp: int
189
189
  datetime: str
190
190
  high: Numeric
@@ -204,7 +204,46 @@ class Ticker(TypedDict):
204
204
  quoteVolume: Numeric
205
205
  baseVolume: Numeric
206
206
 
207
+
208
+ Tickers = Dict[str, Ticker]
209
+
210
+
207
211
  class MarginMode(TypedDict):
208
212
  info: Dict[str, Any]
209
213
  symbol: str
210
214
  marginMode: str
215
+
216
+
217
+ class Market(TypedDict):
218
+ info: Dict[str, Any]
219
+ id: str
220
+ symbol: str
221
+ base: str
222
+ quote: str
223
+ baseId: str
224
+ quoteId: str
225
+ active: Optional[bool]
226
+ type: Optional[str]
227
+ spot: Optional[bool]
228
+ margin: Optional[bool]
229
+ swap: Optional[bool]
230
+ future: Optional[bool]
231
+ option: Optional[bool]
232
+ contract: Optional[bool]
233
+ settle: Optional[str]
234
+ settleId: Optional[str]
235
+ contractSize: Optional[Numeric]
236
+ linear: Optional[bool]
237
+ inverse: Optional[bool]
238
+ expiry: Optional[Numeric]
239
+ expiryDatetime: Optional[str]
240
+ strike: Optional[Numeric]
241
+ optionType: Optional[str]
242
+ taker: Optional[Numeric]
243
+ maker: Optional[Numeric]
244
+ percentage: Optional[bool]
245
+ tierBased: Optional[bool]
246
+ feeSide: Optional[str]
247
+ precision: Any
248
+ limits: Any
249
+ created: Optional[int]
ccxt/bigone.py CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bigone import ImplicitAPI
8
- from ccxt.base.types import Balances, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction
8
+ from ccxt.base.types import Balances, Order, OrderBook, 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
@@ -663,7 +663,7 @@ class bigone(Exchange, ImplicitAPI):
663
663
  ticker = self.safe_value(response, 'data', {})
664
664
  return self.parse_ticker(ticker, market)
665
665
 
666
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
666
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
667
667
  """
668
668
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
669
669
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/binance.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.binance 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, Market, 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
@@ -1007,9 +1007,11 @@ class binance(Exchange, ImplicitAPI):
1007
1007
  'um/order': 1, # 1
1008
1008
  'um/conditional/order': 1,
1009
1009
  'um/allOpenOrders': 1, # 1
1010
+ 'um/conditional/allOpenOrders': 1,
1010
1011
  'cm/order': 1, # 1
1011
1012
  'cm/conditional/order': 1,
1012
1013
  'cm/allOpenOrders': 1, # 1
1014
+ 'cm/conditional/allOpenOrders': 1,
1013
1015
  'margin/order': 1, # Weight(IP): 10 => cost = 0.1 * 10 = 1
1014
1016
  'margin/allOpenOrders': 5, # 5
1015
1017
  'margin/orderList': 2, # 2
@@ -2223,7 +2225,7 @@ class binance(Exchange, ImplicitAPI):
2223
2225
  result.append(self.parse_market(markets[i]))
2224
2226
  return result
2225
2227
 
2226
- def parse_market(self, market):
2228
+ def parse_market(self, market) -> Market:
2227
2229
  swap = False
2228
2230
  future = False
2229
2231
  option = False
@@ -3105,7 +3107,7 @@ class binance(Exchange, ImplicitAPI):
3105
3107
  'info': info,
3106
3108
  }
3107
3109
 
3108
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
3110
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
3109
3111
  """
3110
3112
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
3111
3113
  :see: https://binance-docs.github.io/apidocs/spot/en/#24hr-ticker-price-change-statistics # spot
ccxt/bingx.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bingx 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, 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
@@ -545,7 +545,7 @@ class bingx(Exchange, ImplicitAPI):
545
545
  result.append(self.parse_market(markets[i]))
546
546
  return result
547
547
 
548
- def parse_market(self, market):
548
+ def parse_market(self, market) -> Market:
549
549
  id = self.safe_string(market, 'symbol')
550
550
  symbolParts = id.split('-')
551
551
  baseId = symbolParts[0]
@@ -1209,7 +1209,7 @@ class bingx(Exchange, ImplicitAPI):
1209
1209
  ticker = self.safe_value(data, 0, data)
1210
1210
  return self.parse_ticker(ticker, market)
1211
1211
 
1212
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
1212
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
1213
1213
  """
1214
1214
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1215
1215
  :see: https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Ticker
ccxt/bitbns.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitbns 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
@@ -378,7 +378,7 @@ class bitbns(Exchange, ImplicitAPI):
378
378
  'info': ticker,
379
379
  }, market)
380
380
 
381
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
381
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
382
382
  """
383
383
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
384
384
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/bitfinex.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitfinex 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
@@ -825,7 +825,7 @@ class bitfinex(Exchange, ImplicitAPI):
825
825
  response = self.publicGetBookSymbol(self.extend(request, params))
826
826
  return self.parse_order_book(response, market['symbol'], None, 'bids', 'asks', 'price', 'amount')
827
827
 
828
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
828
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
829
829
  """
830
830
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
831
831
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
ccxt/bitfinex2.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitfinex2 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
@@ -1075,7 +1075,7 @@ class bitfinex2(Exchange, ImplicitAPI):
1075
1075
  'info': ticker,
1076
1076
  }, market)
1077
1077
 
1078
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
1078
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
1079
1079
  """
1080
1080
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
1081
1081
  :see: https://docs.bitfinex.com/reference/rest-public-tickers
ccxt/bitget.py CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bitget import ImplicitAPI
8
8
  import hashlib
9
9
  import json
10
- from ccxt.base.types import OrderRequest, Balances, Order, OrderBook, OrderSide, OrderType, FundingHistory, Ticker, Trade, Transaction
10
+ from ccxt.base.types import OrderRequest, Balances, Market, Order, OrderBook, OrderSide, OrderType, FundingHistory, Ticker, Tickers, Trade, Transaction
11
11
  from typing import Optional
12
12
  from typing import List
13
13
  from ccxt.base.errors import ExchangeError
@@ -1146,7 +1146,7 @@ class bitget(Exchange, ImplicitAPI):
1146
1146
  result.append(self.parse_market(markets[i]))
1147
1147
  return result
1148
1148
 
1149
- def parse_market(self, market):
1149
+ def parse_market(self, market) -> Market:
1150
1150
  #
1151
1151
  # spot
1152
1152
  #
@@ -2161,7 +2161,7 @@ class bitget(Exchange, ImplicitAPI):
2161
2161
  data = self.safe_value(response, 'data')
2162
2162
  return self.parse_ticker(data, market)
2163
2163
 
2164
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
2164
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
2165
2165
  """
2166
2166
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
2167
2167
  :see: https://bitgetlimited.github.io/apidoc/en/spot/#get-all-tickers
ccxt/bithumb.py CHANGED
@@ -6,7 +6,7 @@
6
6
  from ccxt.base.exchange import Exchange
7
7
  from ccxt.abstract.bithumb 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
@@ -388,7 +388,7 @@ class bithumb(Exchange, ImplicitAPI):
388
388
  'info': ticker,
389
389
  }, market)
390
390
 
391
- def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}):
391
+ def fetch_tickers(self, symbols: Optional[List[str]] = None, params={}) -> Tickers:
392
392
  """
393
393
  fetches price tickers for multiple markets, statistical calculations with the information calculated over the past 24 hours each market
394
394
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned