ccxt 4.3.87__py2.py3-none-any.whl → 4.3.89__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 (107) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/abstract/kucoin.py +1 -0
  3. ccxt/abstract/kucoinfutures.py +1 -0
  4. ccxt/ace.py +1 -0
  5. ccxt/alpaca.py +1 -0
  6. ccxt/ascendex.py +7 -19
  7. ccxt/async_support/__init__.py +1 -1
  8. ccxt/async_support/ace.py +1 -0
  9. ccxt/async_support/alpaca.py +1 -0
  10. ccxt/async_support/ascendex.py +7 -19
  11. ccxt/async_support/base/exchange.py +3 -3
  12. ccxt/async_support/bigone.py +1 -0
  13. ccxt/async_support/bingx.py +1 -0
  14. ccxt/async_support/bit2c.py +1 -0
  15. ccxt/async_support/bitbank.py +1 -0
  16. ccxt/async_support/bitfinex.py +1 -0
  17. ccxt/async_support/bitflyer.py +1 -0
  18. ccxt/async_support/bitget.py +1 -0
  19. ccxt/async_support/bitmex.py +1 -0
  20. ccxt/async_support/bitopro.py +1 -0
  21. ccxt/async_support/bitrue.py +62 -71
  22. ccxt/async_support/bitso.py +1 -0
  23. ccxt/async_support/bitstamp.py +1 -0
  24. ccxt/async_support/bitvavo.py +1 -0
  25. ccxt/async_support/blockchaincom.py +1 -0
  26. ccxt/async_support/btcalpha.py +1 -0
  27. ccxt/async_support/btcbox.py +1 -0
  28. ccxt/async_support/btcmarkets.py +1 -0
  29. ccxt/async_support/bybit.py +2 -0
  30. ccxt/async_support/cex.py +1 -0
  31. ccxt/async_support/coinbaseexchange.py +1 -0
  32. ccxt/async_support/coinex.py +1 -1
  33. ccxt/async_support/cryptocom.py +0 -12
  34. ccxt/async_support/kraken.py +48 -48
  35. ccxt/async_support/kucoin.py +2 -0
  36. ccxt/async_support/mexc.py +1 -61
  37. ccxt/async_support/okcoin.py +4 -9
  38. ccxt/async_support/onetrading.py +1 -0
  39. ccxt/async_support/phemex.py +1 -0
  40. ccxt/async_support/poloniexfutures.py +1 -0
  41. ccxt/async_support/probit.py +1 -0
  42. ccxt/async_support/vertex.py +1 -0
  43. ccxt/async_support/woo.py +1 -0
  44. ccxt/async_support/woofipro.py +1 -0
  45. ccxt/base/exchange.py +8 -6
  46. ccxt/bigone.py +1 -0
  47. ccxt/bingx.py +1 -0
  48. ccxt/bit2c.py +1 -0
  49. ccxt/bitbank.py +1 -0
  50. ccxt/bitfinex.py +1 -0
  51. ccxt/bitflyer.py +1 -0
  52. ccxt/bitget.py +1 -0
  53. ccxt/bitmex.py +1 -0
  54. ccxt/bitopro.py +1 -0
  55. ccxt/bitrue.py +62 -71
  56. ccxt/bitso.py +1 -0
  57. ccxt/bitstamp.py +1 -0
  58. ccxt/bitvavo.py +1 -0
  59. ccxt/blockchaincom.py +1 -0
  60. ccxt/btcalpha.py +1 -0
  61. ccxt/btcbox.py +1 -0
  62. ccxt/btcmarkets.py +1 -0
  63. ccxt/bybit.py +2 -0
  64. ccxt/cex.py +1 -0
  65. ccxt/coinbaseexchange.py +1 -0
  66. ccxt/coinex.py +1 -1
  67. ccxt/cryptocom.py +0 -12
  68. ccxt/kraken.py +48 -48
  69. ccxt/kucoin.py +2 -0
  70. ccxt/mexc.py +1 -61
  71. ccxt/okcoin.py +4 -9
  72. ccxt/onetrading.py +1 -0
  73. ccxt/phemex.py +1 -0
  74. ccxt/poloniexfutures.py +1 -0
  75. ccxt/pro/__init__.py +1 -1
  76. ccxt/pro/bitfinex.py +1 -0
  77. ccxt/pro/bitfinex2.py +1 -0
  78. ccxt/pro/bitopro.py +1 -0
  79. ccxt/pro/bitstamp.py +1 -0
  80. ccxt/pro/bitvavo.py +1 -0
  81. ccxt/pro/blockchaincom.py +1 -0
  82. ccxt/pro/bybit.py +252 -1
  83. ccxt/pro/cex.py +2 -0
  84. ccxt/pro/coincheck.py +1 -0
  85. ccxt/pro/coinone.py +1 -0
  86. ccxt/pro/hashkey.py +1 -0
  87. ccxt/pro/hitbtc.py +1 -0
  88. ccxt/pro/hollaex.py +1 -0
  89. ccxt/pro/htx.py +1 -0
  90. ccxt/pro/huobijp.py +1 -0
  91. ccxt/pro/hyperliquid.py +7 -0
  92. ccxt/pro/independentreserve.py +1 -0
  93. ccxt/pro/lbank.py +1 -0
  94. ccxt/pro/luno.py +1 -0
  95. ccxt/pro/ndax.py +5 -0
  96. ccxt/pro/okcoin.py +7 -0
  97. ccxt/pro/onetrading.py +1 -0
  98. ccxt/pro/paradex.py +1 -0
  99. ccxt/probit.py +1 -0
  100. ccxt/vertex.py +1 -0
  101. ccxt/woo.py +1 -0
  102. ccxt/woofipro.py +1 -0
  103. {ccxt-4.3.87.dist-info → ccxt-4.3.89.dist-info}/METADATA +4 -4
  104. {ccxt-4.3.87.dist-info → ccxt-4.3.89.dist-info}/RECORD +107 -107
  105. {ccxt-4.3.87.dist-info → ccxt-4.3.89.dist-info}/LICENSE.txt +0 -0
  106. {ccxt-4.3.87.dist-info → ccxt-4.3.89.dist-info}/WHEEL +0 -0
  107. {ccxt-4.3.87.dist-info → ccxt-4.3.89.dist-info}/top_level.txt +0 -0
ccxt/pro/bybit.py CHANGED
@@ -10,10 +10,12 @@ import hashlib
10
10
  from ccxt.base.types import Balances, Int, Liquidation, Num, Order, OrderBook, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade
11
11
  from ccxt.async_support.base.ws.client import Client
12
12
  from typing import List
13
+ from typing import Any
13
14
  from ccxt.base.errors import ExchangeError
14
15
  from ccxt.base.errors import AuthenticationError
15
16
  from ccxt.base.errors import ArgumentsRequired
16
17
  from ccxt.base.errors import BadRequest
18
+ from ccxt.base.errors import UnsubscribeError
17
19
 
18
20
 
19
21
  class bybit(ccxt.async_support.bybit):
@@ -377,6 +379,44 @@ class bybit(ccxt.async_support.bybit):
377
379
  return result
378
380
  return self.filter_by_array(self.tickers, 'symbol', symbols)
379
381
 
382
+ async def un_watch_tickers(self, symbols: Strings = None, params={}) -> Any:
383
+ """
384
+ unWatches a price ticker
385
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/public/ticker
386
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
387
+ :param str[] symbols: unified symbol of the market to fetch the ticker for
388
+ :param dict [params]: extra parameters specific to the exchange API endpoint
389
+ :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
390
+ """
391
+ await self.load_markets()
392
+ symbols = self.market_symbols(symbols, None, False)
393
+ options = self.safe_value(self.options, 'watchTickers', {})
394
+ topic = self.safe_string(options, 'name', 'tickers')
395
+ messageHashes = []
396
+ subMessageHashes = []
397
+ marketIds = self.market_ids(symbols)
398
+ topics = []
399
+ for i in range(0, len(marketIds)):
400
+ marketId = marketIds[i]
401
+ symbol = symbols[i]
402
+ topics.append(topic + '.' + marketId)
403
+ subMessageHashes.append('ticker:' + symbol)
404
+ messageHashes.append('unsubscribe:ticker:' + symbol)
405
+ url = await self.get_url_by_market_type(symbols[0], False, 'watchTickers', params)
406
+ return await self.un_watch_topics(url, 'ticker', symbols, messageHashes, subMessageHashes, topics, params)
407
+
408
+ async def un_watch_ticker(self, symbols: str, params={}) -> Any:
409
+ """
410
+ unWatches a price ticker
411
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/public/ticker
412
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/public/etp-ticker
413
+ :param str symbol: unified symbol of the market to fetch the ticker for
414
+ :param dict [params]: extra parameters specific to the exchange API endpoint
415
+ :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
416
+ """
417
+ await self.load_markets()
418
+ return await self.un_watch_tickers([symbols], params)
419
+
380
420
  def handle_ticker(self, client: Client, message):
381
421
  #
382
422
  # linear
@@ -689,6 +729,49 @@ class bybit(ccxt.async_support.bybit):
689
729
  orderbook = await self.watch_topics(url, messageHashes, topics, params)
690
730
  return orderbook.limit()
691
731
 
732
+ async def un_watch_order_book_for_symbols(self, symbols: Strings, params={}) -> Any:
733
+ """
734
+ unsubscribe from the orderbook channel
735
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
736
+ :param str[] symbols: unified symbol of the market to unwatch the trades for
737
+ :param int [params.limit]: orderbook limit, default is None
738
+ :returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
739
+ """
740
+ await self.load_markets()
741
+ symbols = self.market_symbols(symbols, None, False)
742
+ channel = 'orderbook.'
743
+ limit = self.safe_integer(params, 'limit')
744
+ if limit is not None:
745
+ params = self.omit(params, 'limit')
746
+ else:
747
+ firstMarket = self.market(symbols[0])
748
+ limit = 50 if firstMarket['spot'] else 500
749
+ channel += str(limit)
750
+ subMessageHashes = []
751
+ messageHashes = []
752
+ topics = []
753
+ for i in range(0, len(symbols)):
754
+ symbol = symbols[i]
755
+ market = self.market(symbol)
756
+ marketId = market['id']
757
+ topic = channel + '.' + marketId
758
+ messageHashes.append('unsubscribe:orderbook:' + symbol)
759
+ subMessageHashes.append('orderbook:' + symbol)
760
+ topics.append(topic)
761
+ url = await self.get_url_by_market_type(symbols[0], False, 'watchOrderBook', params)
762
+ return await self.un_watch_topics(url, 'orderbook', symbols, messageHashes, subMessageHashes, topics, params)
763
+
764
+ async def un_watch_order_book(self, symbol: str, params={}) -> Any:
765
+ """
766
+ unsubscribe from the orderbook channel
767
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/public/orderbook
768
+ :param str[] symbols: unified symbol of the market to unwatch the trades for
769
+ :param int [params.limit]: orderbook limit, default is None
770
+ :returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
771
+ """
772
+ await self.load_markets()
773
+ return await self.un_watch_order_book_for_symbols([symbol], params)
774
+
692
775
  def handle_order_book(self, client: Client, message):
693
776
  #
694
777
  # {
@@ -802,6 +885,39 @@ class bybit(ccxt.async_support.bybit):
802
885
  limit = trades.getLimit(tradeSymbol, limit)
803
886
  return self.filter_by_since_limit(trades, since, limit, 'timestamp', True)
804
887
 
888
+ async def un_watch_trades_for_symbols(self, symbols: Strings, params={}) -> Any:
889
+ """
890
+ unsubscribe from the trades channel
891
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/public/trade
892
+ :param str[] symbols: unified symbol of the market to unwatch the trades for
893
+ :returns any: status of the unwatch request
894
+ """
895
+ await self.load_markets()
896
+ symbols = self.market_symbols(symbols, None, False, True)
897
+ url = await self.get_url_by_market_type(symbols[0], False, 'unWatchTradesForSymbols', params)
898
+ messageHashes = []
899
+ topics = []
900
+ subMessageHashes = []
901
+ for i in range(0, len(symbols)):
902
+ symbol = symbols[i]
903
+ market = self.market(symbol)
904
+ topic = 'publicTrade.' + market['id']
905
+ topics.append(topic)
906
+ messageHash = 'unsubscribe:trade:' + symbol
907
+ messageHashes.append(messageHash)
908
+ subMessageHashes.append('trade:' + symbol)
909
+ return await self.un_watch_topics(url, 'trade', symbols, messageHashes, subMessageHashes, topics, params)
910
+
911
+ async def un_watch_trades(self, symbol: str, params={}) -> Any:
912
+ """
913
+ unsubscribe from the trades channel
914
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/public/trade
915
+ :param str symbol: unified symbol of the market to unwatch the trades for
916
+ :returns any: status of the unwatch request
917
+ """
918
+ await self.load_markets()
919
+ return await self.un_watch_trades_for_symbols([symbol], params)
920
+
805
921
  def handle_trades(self, client: Client, message):
806
922
  #
807
923
  # {
@@ -948,6 +1064,32 @@ class bybit(ccxt.async_support.bybit):
948
1064
  limit = trades.getLimit(symbol, limit)
949
1065
  return self.filter_by_symbol_since_limit(trades, symbol, since, limit, True)
950
1066
 
1067
+ async def un_watch_my_trades(self, symbol: Str = None, params={}) -> Any:
1068
+ """
1069
+ unWatches information on multiple trades made by the user
1070
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/private/execution
1071
+ :param str symbol: unified market symbol of the market orders were made in
1072
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1073
+ :param boolean [params.unifiedMargin]: use unified margin account
1074
+ :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1075
+ """
1076
+ method = 'watchMyTrades'
1077
+ messageHash = 'unsubscribe:myTrades'
1078
+ subHash = 'myTrades'
1079
+ await self.load_markets()
1080
+ if symbol is not None:
1081
+ symbol = self.symbol(symbol)
1082
+ subHash += ':' + symbol
1083
+ url = await self.get_url_by_market_type(symbol, True, method, params)
1084
+ await self.authenticate(url)
1085
+ topicByMarket: dict = {
1086
+ 'spot': 'ticketInfo',
1087
+ 'unified': 'execution',
1088
+ 'usdc': 'user.openapi.perp.trade',
1089
+ }
1090
+ topic = self.safe_value(topicByMarket, self.get_private_type(url))
1091
+ return await self.un_watch_topics(url, 'myTrades', [], [messageHash], [subHash], [topic], params)
1092
+
951
1093
  def handle_my_trades(self, client: Client, message):
952
1094
  #
953
1095
  # spot
@@ -1281,6 +1423,32 @@ class bybit(ccxt.async_support.bybit):
1281
1423
  limit = orders.getLimit(symbol, limit)
1282
1424
  return self.filter_by_symbol_since_limit(orders, symbol, since, limit, True)
1283
1425
 
1426
+ async def un_watch_orders(self, symbol: Str = None, params={}) -> Any:
1427
+ """
1428
+ unWatches information on multiple orders made by the user
1429
+ :see: https://bybit-exchange.github.io/docs/v5/websocket/private/order
1430
+ :param str symbol: unified market symbol of the market orders were made in
1431
+ :param dict [params]: extra parameters specific to the exchange API endpoint
1432
+ :param boolean [params.unifiedMargin]: use unified margin account
1433
+ :returns dict[]: a list of `order structures <https://docs.ccxt.com/#/?id=order-structure>`
1434
+ """
1435
+ await self.load_markets()
1436
+ method = 'watchOrders'
1437
+ messageHash = 'unsubscribe:orders'
1438
+ subHash = 'orders'
1439
+ if symbol is not None:
1440
+ symbol = self.symbol(symbol)
1441
+ subHash += ':' + symbol
1442
+ url = await self.get_url_by_market_type(symbol, True, method, params)
1443
+ await self.authenticate(url)
1444
+ topicsByMarket: dict = {
1445
+ 'spot': ['order', 'stopOrder'],
1446
+ 'unified': ['order'],
1447
+ 'usdc': ['user.openapi.perp.order'],
1448
+ }
1449
+ topics = self.safe_value(topicsByMarket, self.get_private_type(url))
1450
+ return await self.un_watch_topics(url, 'orders', [], [messageHash], [subHash], topics, params)
1451
+
1284
1452
  def handle_order_ws(self, client: Client, message):
1285
1453
  #
1286
1454
  # {
@@ -1827,7 +1995,24 @@ class bybit(ccxt.async_support.bybit):
1827
1995
  'args': topics,
1828
1996
  }
1829
1997
  message = self.extend(request, params)
1830
- return await self.watch_multiple(url, messageHashes, message, topics)
1998
+ return await self.watch_multiple(url, messageHashes, message, messageHashes)
1999
+
2000
+ async def un_watch_topics(self, url: str, topic: str, symbols: List[str], messageHashes: List[str], subMessageHashes: List[str], topics, params={}):
2001
+ reqId = self.request_id()
2002
+ request: dict = {
2003
+ 'op': 'unsubscribe',
2004
+ 'req_id': reqId,
2005
+ 'args': topics,
2006
+ }
2007
+ subscription = {
2008
+ 'id': reqId,
2009
+ 'topic': topic,
2010
+ 'messageHashes': messageHashes,
2011
+ 'subMessageHashes': subMessageHashes,
2012
+ 'symbols': symbols,
2013
+ }
2014
+ message = self.extend(request, params)
2015
+ return await self.watch_multiple(url, messageHashes, message, messageHashes, subscription)
1831
2016
 
1832
2017
  async def authenticate(self, url, params={}):
1833
2018
  self.check_required_credentials()
@@ -1964,6 +2149,7 @@ class bybit(ccxt.async_support.bybit):
1964
2149
  'order.amend': self.handle_order_ws,
1965
2150
  'order.cancel': self.handle_order_ws,
1966
2151
  'auth': self.handle_authenticate,
2152
+ 'unsubscribe': self.handle_un_subscribe,
1967
2153
  }
1968
2154
  exacMethod = self.safe_value(methods, topic)
1969
2155
  if exacMethod is not None:
@@ -2046,3 +2232,68 @@ class bybit(ccxt.async_support.bybit):
2046
2232
  # }
2047
2233
  #
2048
2234
  return message
2235
+
2236
+ def handle_un_subscribe(self, client: Client, message):
2237
+ #
2238
+ # {"success":true,"ret_msg":"","conn_id":"7188110e-6908-41e9-b863-6365127e92ad","req_id":"3","op":"unsubscribe"}
2239
+ #
2240
+ # client.subscription will be something like:
2241
+ # {
2242
+ # "publicTrade.LTCUSDT":true,
2243
+ # "publicTrade.ADAUSDT":true,
2244
+ # "unsubscribe:trade:LTC/USDT:USDT": {
2245
+ # "id":4,
2246
+ # "subHash": "trade:LTC/USDT"
2247
+ # },
2248
+ # }
2249
+ reqId = self.safe_string(message, 'req_id')
2250
+ keys = list(client.subscriptions.keys())
2251
+ for i in range(0, len(keys)):
2252
+ messageHash = keys[i]
2253
+ if not (messageHash in client.subscriptions):
2254
+ continue
2255
+ # the previous iteration can have deleted the messageHash from the subscriptions
2256
+ if messageHash.startswith('unsubscribe'):
2257
+ subscription = client.subscriptions[messageHash]
2258
+ subId = self.safe_string(subscription, 'id')
2259
+ if reqId != subId:
2260
+ continue
2261
+ messageHashes = self.safe_list(subscription, 'messageHashes', [])
2262
+ subMessageHashes = self.safe_list(subscription, 'subMessageHashes', [])
2263
+ for j in range(0, len(messageHashes)):
2264
+ unsubHash = messageHashes[j]
2265
+ subHash = subMessageHashes[j]
2266
+ if unsubHash in client.subscriptions:
2267
+ del client.subscriptions[unsubHash]
2268
+ if subHash in client.subscriptions:
2269
+ del client.subscriptions[subHash]
2270
+ error = UnsubscribeError(self.id + ' ' + messageHash)
2271
+ client.reject(error, subHash)
2272
+ client.resolve(True, unsubHash)
2273
+ self.clean_cache(subscription)
2274
+ return message
2275
+
2276
+ def clean_cache(self, subscription: dict):
2277
+ topic = self.safe_string(subscription, 'topic')
2278
+ symbols = self.safe_list(subscription, 'symbols', [])
2279
+ symbolsLength = len(symbols)
2280
+ if symbolsLength > 0:
2281
+ for i in range(0, len(symbols)):
2282
+ symbol = symbols[i]
2283
+ if topic == 'trade':
2284
+ del self.trades[symbol]
2285
+ elif topic == 'orderbook':
2286
+ del self.orderbooks[symbol]
2287
+ elif topic == 'ticker':
2288
+ del self.tickers[symbol]
2289
+ else:
2290
+ if topic == 'myTrades':
2291
+ # don't reset self.myTrades directly here
2292
+ # because in c# we need to use a different object
2293
+ keys = list(self.myTrades.keys())
2294
+ for i in range(0, len(keys)):
2295
+ del self.myTrades[keys[i]]
2296
+ elif topic == 'orders':
2297
+ orderSymbols = list(self.orders.keys())
2298
+ for i in range(0, len(orderSymbols)):
2299
+ del self.orders[orderSymbols[i]]
ccxt/pro/cex.py CHANGED
@@ -25,6 +25,7 @@ class cex(ccxt.async_support.cex):
25
25
  'watchTicker': True,
26
26
  'watchTickers': True,
27
27
  'watchTrades': True,
28
+ 'watchTradesForSymbols': False,
28
29
  'watchMyTrades': True,
29
30
  'watchOrders': True,
30
31
  'watchOrderBook': True,
@@ -1129,6 +1130,7 @@ class cex(ccxt.async_support.cex):
1129
1130
  """
1130
1131
  fetches information on an order made by the user
1131
1132
  :see: https://docs.cex.io/#ws-api-get-order
1133
+ :param str id: the order id
1132
1134
  :param str symbol: not used by cex fetchOrder
1133
1135
  :param dict [params]: extra parameters specific to the cex api endpoint
1134
1136
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
ccxt/pro/coincheck.py CHANGED
@@ -20,6 +20,7 @@ class coincheck(ccxt.async_support.coincheck):
20
20
  'watchOrderBook': True,
21
21
  'watchOrders': False,
22
22
  'watchTrades': True,
23
+ 'watchTradesForSymbols': False,
23
24
  'watchOHLCV': False,
24
25
  'watchTicker': False,
25
26
  'watchTickers': False,
ccxt/pro/coinone.py CHANGED
@@ -20,6 +20,7 @@ class coinone(ccxt.async_support.coinone):
20
20
  'watchOrderBook': True,
21
21
  'watchOrders': False,
22
22
  'watchTrades': True,
23
+ 'watchTradesForSymbols': False,
23
24
  'watchOHLCV': False,
24
25
  'watchTicker': True,
25
26
  'watchTickers': False,
ccxt/pro/hashkey.py CHANGED
@@ -23,6 +23,7 @@ class hashkey(ccxt.async_support.hashkey):
23
23
  'watchOrders': True,
24
24
  'watchTicker': True,
25
25
  'watchTrades': True,
26
+ 'watchTradesForSymbols': False,
26
27
  'watchPositions': False,
27
28
  },
28
29
  'urls': {
ccxt/pro/hitbtc.py CHANGED
@@ -23,6 +23,7 @@ class hitbtc(ccxt.async_support.hitbtc):
23
23
  'watchTicker': True,
24
24
  'watchTickers': True,
25
25
  'watchTrades': True,
26
+ 'watchTradesForSymbols': False,
26
27
  'watchOrderBook': True,
27
28
  'watchBalance': True,
28
29
  'watchOrders': True,
ccxt/pro/hollaex.py CHANGED
@@ -28,6 +28,7 @@ class hollaex(ccxt.async_support.hollaex):
28
28
  'watchTicker': False,
29
29
  'watchTickers': False, # for now
30
30
  'watchTrades': True,
31
+ 'watchTradesForSymbols': False,
31
32
  },
32
33
  'urls': {
33
34
  'api': {
ccxt/pro/htx.py CHANGED
@@ -39,6 +39,7 @@ class htx(ccxt.async_support.htx):
39
39
  'watchTickers': False,
40
40
  'watchTicker': True,
41
41
  'watchTrades': True,
42
+ 'watchTradesForSymbols': False,
42
43
  'watchMyTrades': True,
43
44
  'watchBalance': True,
44
45
  'watchOHLCV': True,
ccxt/pro/huobijp.py CHANGED
@@ -21,6 +21,7 @@ class huobijp(ccxt.async_support.huobijp):
21
21
  'watchTickers': False, # for now
22
22
  'watchTicker': True,
23
23
  'watchTrades': True,
24
+ 'watchTradesForSymbols': False,
24
25
  'watchBalance': False, # for now
25
26
  'watchOHLCV': True,
26
27
  },
ccxt/pro/hyperliquid.py CHANGED
@@ -28,6 +28,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
28
28
  'watchTicker': False,
29
29
  'watchTickers': True,
30
30
  'watchTrades': True,
31
+ 'watchTradesForSymbols': False,
31
32
  'watchPosition': False,
32
33
  },
33
34
  'urls': {
@@ -137,6 +138,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
137
138
  async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
138
139
  """
139
140
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
141
+ :see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
140
142
  :param str symbol: unified symbol of the market to fetch the order book for
141
143
  :param int [limit]: the maximum amount of order book entries to return
142
144
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -207,6 +209,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
207
209
  async def watch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
208
210
  """
209
211
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
212
+ :see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
210
213
  :param str[] symbols: unified symbol of the market to fetch the ticker for
211
214
  :param dict [params]: extra parameters specific to the exchange API endpoint
212
215
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -230,6 +233,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
230
233
  async def watch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
231
234
  """
232
235
  watches information on multiple trades made by the user
236
+ :see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
233
237
  :param str symbol: unified market symbol of the market orders were made in
234
238
  :param int [since]: the earliest time in ms to fetch orders for
235
239
  :param int [limit]: the maximum number of order structures to retrieve
@@ -390,6 +394,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
390
394
  async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
391
395
  """
392
396
  watches information on multiple trades made in a market
397
+ :see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
393
398
  :param str symbol: unified market symbol of the market trades were made in
394
399
  :param int [since]: the earliest time in ms to fetch trades for
395
400
  :param int [limit]: the maximum number of trade structures to retrieve
@@ -514,6 +519,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
514
519
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
515
520
  """
516
521
  watches historical candlestick data containing the open, high, low, close price, and the volume of a market
522
+ :see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
517
523
  :param str symbol: unified symbol of the market to fetch OHLCV data for
518
524
  :param str timeframe: the length of time each candle represents
519
525
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -594,6 +600,7 @@ class hyperliquid(ccxt.async_support.hyperliquid):
594
600
  async def watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
595
601
  """
596
602
  watches information on multiple orders made by the user
603
+ :see: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions
597
604
  :param str symbol: unified market symbol of the market orders were made in
598
605
  :param int [since]: the earliest time in ms to fetch orders for
599
606
  :param int [limit]: the maximum number of order structures to retrieve
@@ -22,6 +22,7 @@ class independentreserve(ccxt.async_support.independentreserve):
22
22
  'watchTicker': False,
23
23
  'watchTickers': False,
24
24
  'watchTrades': True,
25
+ 'watchTradesForSymbols': False,
25
26
  'watchMyTrades': False,
26
27
  'watchOrders': False,
27
28
  'watchOrderBook': True,
ccxt/pro/lbank.py CHANGED
@@ -26,6 +26,7 @@ class lbank(ccxt.async_support.lbank):
26
26
  'watchTicker': True,
27
27
  'watchTickers': False,
28
28
  'watchTrades': True,
29
+ 'watchTradesForSymbols': False,
29
30
  'watchMyTrades': False,
30
31
  'watchOrders': True,
31
32
  'watchOrderBook': True,
ccxt/pro/luno.py CHANGED
@@ -19,6 +19,7 @@ class luno(ccxt.async_support.luno):
19
19
  'watchTicker': False,
20
20
  'watchTickers': False,
21
21
  'watchTrades': True,
22
+ 'watchTradesForSymbols': False,
22
23
  'watchMyTrades': False,
23
24
  'watchOrders': None, # is in beta
24
25
  'watchOrderBook': True,
ccxt/pro/ndax.py CHANGED
@@ -19,6 +19,7 @@ class ndax(ccxt.async_support.ndax):
19
19
  'ws': True,
20
20
  'watchOrderBook': True,
21
21
  'watchTrades': True,
22
+ 'watchTradesForSymbols': False,
22
23
  'watchTicker': True,
23
24
  'watchOHLCV': True,
24
25
  },
@@ -45,6 +46,7 @@ class ndax(ccxt.async_support.ndax):
45
46
  async def watch_ticker(self, symbol: str, params={}) -> Ticker:
46
47
  """
47
48
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
49
+ :see: https://apidoc.ndax.io/#subscribelevel1
48
50
  :param str symbol: unified symbol of the market to fetch the ticker for
49
51
  :param dict [params]: extra parameters specific to the exchange API endpoint
50
52
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -108,6 +110,7 @@ class ndax(ccxt.async_support.ndax):
108
110
  async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
109
111
  """
110
112
  get the list of most recent trades for a particular symbol
113
+ :see: https://apidoc.ndax.io/#subscribetrades
111
114
  :param str symbol: unified symbol of the market to fetch trades for
112
115
  :param int [since]: timestamp in ms of the earliest trade to fetch
113
116
  :param int [limit]: the maximum amount of trades to fetch
@@ -183,6 +186,7 @@ class ndax(ccxt.async_support.ndax):
183
186
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
184
187
  """
185
188
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
189
+ :see: https://apidoc.ndax.io/#subscribeticker
186
190
  :param str symbol: unified symbol of the market to fetch OHLCV data for
187
191
  :param str timeframe: the length of time each candle represents
188
192
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -303,6 +307,7 @@ class ndax(ccxt.async_support.ndax):
303
307
  async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
304
308
  """
305
309
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
310
+ :see: https://apidoc.ndax.io/#subscribelevel2
306
311
  :param str symbol: unified symbol of the market to fetch the order book for
307
312
  :param int [limit]: the maximum amount of order book entries to return
308
313
  :param dict [params]: extra parameters specific to the exchange API endpoint
ccxt/pro/okcoin.py CHANGED
@@ -24,6 +24,7 @@ class okcoin(ccxt.async_support.okcoin):
24
24
  'watchOrderBook': True,
25
25
  'watchOrders': True,
26
26
  'watchTrades': True,
27
+ 'watchTradesForSymbols': False,
27
28
  'watchBalance': True,
28
29
  'watchOHLCV': True,
29
30
  },
@@ -72,6 +73,7 @@ class okcoin(ccxt.async_support.okcoin):
72
73
  async def watch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
73
74
  """
74
75
  get the list of most recent trades for a particular symbol
76
+ :see: https://www.okcoin.com/docs-v5/en/#websocket-api-public-channel-trades-channel
75
77
  :param str symbol: unified symbol of the market to fetch trades for
76
78
  :param int [since]: timestamp in ms of the earliest trade to fetch
77
79
  :param int [limit]: the maximum amount of trades to fetch
@@ -88,6 +90,7 @@ class okcoin(ccxt.async_support.okcoin):
88
90
  async def watch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
89
91
  """
90
92
  watches information on multiple orders made by the user
93
+ :see: https://www.okcoin.com/docs-v5/en/#websocket-api-private-channel-order-channel
91
94
  :param str symbol: unified market symbol of the market orders were made in
92
95
  :param int [since]: the earliest time in ms to fetch orders for
93
96
  :param int [limit]: the maximum number of order structures to retrieve
@@ -166,6 +169,7 @@ class okcoin(ccxt.async_support.okcoin):
166
169
  async def watch_ticker(self, symbol: str, params={}) -> Ticker:
167
170
  """
168
171
  watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
172
+ :see: https://www.okcoin.com/docs-v5/en/#websocket-api-public-channel-tickers-channel
169
173
  :param str symbol: unified symbol of the market to fetch the ticker for
170
174
  :param dict [params]: extra parameters specific to the exchange API endpoint
171
175
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -241,6 +245,7 @@ class okcoin(ccxt.async_support.okcoin):
241
245
  async def watch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
242
246
  """
243
247
  watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
248
+ :see: https://www.okcoin.com/docs-v5/en/#websocket-api-public-channel-candlesticks-channel
244
249
  :param str symbol: unified symbol of the market to fetch OHLCV data for
245
250
  :param str timeframe: the length of time each candle represents
246
251
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -303,6 +308,7 @@ class okcoin(ccxt.async_support.okcoin):
303
308
  async def watch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
304
309
  """
305
310
  watches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
311
+ :see: https://www.okcoin.com/docs-v5/en/#websocket-api-public-channel-order-book-channel
306
312
  :param str symbol: unified symbol of the market to fetch the order book for
307
313
  :param int [limit]: the maximum amount of order book entries to return
308
314
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -457,6 +463,7 @@ class okcoin(ccxt.async_support.okcoin):
457
463
  async def watch_balance(self, params={}) -> Balances:
458
464
  """
459
465
  watch balance and get the amount of funds available for trading or funds locked in orders
466
+ :see: https://www.okcoin.com/docs-v5/en/#websocket-api-private-channel-account-channel
460
467
  :param dict [params]: extra parameters specific to the exchange API endpoint
461
468
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
462
469
  """
ccxt/pro/onetrading.py CHANGED
@@ -23,6 +23,7 @@ class onetrading(ccxt.async_support.onetrading):
23
23
  'watchTicker': True,
24
24
  'watchTickers': True,
25
25
  'watchTrades': False,
26
+ 'watchTradesForSymbols': False,
26
27
  'watchMyTrades': True,
27
28
  'watchOrders': True,
28
29
  'watchOrderBook': True,
ccxt/pro/paradex.py CHANGED
@@ -21,6 +21,7 @@ class paradex(ccxt.async_support.paradex):
21
21
  'watchOrderBook': True,
22
22
  'watchOrders': False,
23
23
  'watchTrades': True,
24
+ 'watchTradesForSymbols': False,
24
25
  'watchBalance': False,
25
26
  'watchOHLCV': False,
26
27
  },
ccxt/probit.py CHANGED
@@ -1028,6 +1028,7 @@ class probit(Exchange, ImplicitAPI):
1028
1028
  """
1029
1029
  :see: https://docs-en.probit.com/reference/order-3
1030
1030
  fetches information on an order made by the user
1031
+ :param str id: the order id
1031
1032
  :param str symbol: unified symbol of the market the order was made in
1032
1033
  :param dict [params]: extra parameters specific to the exchange API endpoint
1033
1034
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
ccxt/vertex.py CHANGED
@@ -1886,6 +1886,7 @@ class vertex(Exchange, ImplicitAPI):
1886
1886
  """
1887
1887
  fetches information on an order made by the user
1888
1888
  :see: https://docs.vertexprotocol.com/developer-resources/api/gateway/queries/order
1889
+ :param str id: the order id
1889
1890
  :param str symbol: unified symbol of the market the order was made in
1890
1891
  :param dict [params]: extra parameters specific to the exchange API endpoint
1891
1892
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
ccxt/woo.py CHANGED
@@ -1276,6 +1276,7 @@ class woo(Exchange, ImplicitAPI):
1276
1276
  :see: https://docs.woo.org/#get-algo-order
1277
1277
  :see: https://docs.woo.org/#get-order
1278
1278
  fetches information on an order made by the user
1279
+ :param str id: the order id
1279
1280
  :param str symbol: unified symbol of the market the order was made in
1280
1281
  :param dict [params]: extra parameters specific to the exchange API endpoint
1281
1282
  :param boolean [params.stop]: whether the order is a stop/algo order
ccxt/woofipro.py CHANGED
@@ -1619,6 +1619,7 @@ class woofipro(Exchange, ImplicitAPI):
1619
1619
  :see: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-order-by-order_id
1620
1620
  :see: https://orderly.network/docs/build-on-evm/evm-api/restful-api/private/get-algo-order-by-client_order_id
1621
1621
  fetches information on an order made by the user
1622
+ :param str id: the order id
1622
1623
  :param str symbol: unified symbol of the market the order was made in
1623
1624
  :param dict [params]: extra parameters specific to the exchange API endpoint
1624
1625
  :param boolean [params.trigger]: whether the order is a stop/algo order