ccxt 4.3.76__py2.py3-none-any.whl → 4.3.78__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 (45) hide show
  1. ccxt/__init__.py +1 -1
  2. ccxt/async_support/__init__.py +1 -1
  3. ccxt/async_support/base/exchange.py +1 -1
  4. ccxt/async_support/binance.py +2 -2
  5. ccxt/async_support/bingx.py +0 -1
  6. ccxt/async_support/bitget.py +1 -0
  7. ccxt/async_support/bithumb.py +14 -14
  8. ccxt/async_support/bitmart.py +3 -0
  9. ccxt/async_support/bitteam.py +0 -1
  10. ccxt/async_support/bybit.py +4 -1
  11. ccxt/async_support/gate.py +2 -2
  12. ccxt/async_support/kraken.py +10 -8
  13. ccxt/async_support/kuna.py +0 -1
  14. ccxt/async_support/vertex.py +6 -4
  15. ccxt/async_support/woo.py +3 -0
  16. ccxt/async_support/woofipro.py +3 -0
  17. ccxt/async_support/xt.py +0 -1
  18. ccxt/base/exchange.py +65 -37
  19. ccxt/binance.py +2 -2
  20. ccxt/bingx.py +0 -1
  21. ccxt/bitget.py +1 -0
  22. ccxt/bithumb.py +14 -14
  23. ccxt/bitmart.py +3 -0
  24. ccxt/bitteam.py +0 -1
  25. ccxt/bybit.py +4 -1
  26. ccxt/gate.py +2 -2
  27. ccxt/kraken.py +10 -8
  28. ccxt/kuna.py +0 -1
  29. ccxt/pro/__init__.py +1 -1
  30. ccxt/pro/binance.py +1 -1
  31. ccxt/pro/bybit.py +19 -0
  32. ccxt/pro/paradex.py +2 -0
  33. ccxt/pro/woo.py +1 -1
  34. ccxt/static_dependencies/starkware/crypto/utils.py +6 -1
  35. ccxt/vertex.py +6 -4
  36. ccxt/woo.py +3 -0
  37. ccxt/woofipro.py +3 -0
  38. ccxt/xt.py +0 -1
  39. {ccxt-4.3.76.dist-info → ccxt-4.3.78.dist-info}/METADATA +4 -4
  40. {ccxt-4.3.76.dist-info → ccxt-4.3.78.dist-info}/RECORD +43 -45
  41. ccxt/static_dependencies/typing_extensions/__init__.py +0 -0
  42. ccxt/static_dependencies/typing_extensions/typing_extensions.py +0 -3839
  43. {ccxt-4.3.76.dist-info → ccxt-4.3.78.dist-info}/LICENSE.txt +0 -0
  44. {ccxt-4.3.76.dist-info → ccxt-4.3.78.dist-info}/WHEEL +0 -0
  45. {ccxt-4.3.76.dist-info → ccxt-4.3.78.dist-info}/top_level.txt +0 -0
ccxt/bithumb.py CHANGED
@@ -207,7 +207,7 @@ class bithumb(Exchange, ImplicitAPI):
207
207
  def fetch_markets(self, params={}) -> List[Market]:
208
208
  """
209
209
  retrieves data on all markets for bithumb
210
- :see: https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
210
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
211
211
  :param dict [params]: extra parameters specific to the exchange API endpoint
212
212
  :returns dict[]: an array of objects representing market data
213
213
  """
@@ -341,7 +341,7 @@ class bithumb(Exchange, ImplicitAPI):
341
341
  def fetch_balance(self, params={}) -> Balances:
342
342
  """
343
343
  query for balance and get the amount of funds available for trading or funds locked in orders
344
- :see: https://apidocs.bithumb.com/reference/%EB%B3%B4%EC%9C%A0%EC%9E%90%EC%82%B0-%EC%A1%B0%ED%9A%8C
344
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EB%B3%B4%EC%9C%A0%EC%9E%90%EC%82%B0-%EC%A1%B0%ED%9A%8C
345
345
  :param dict [params]: extra parameters specific to the exchange API endpoint
346
346
  :returns dict: a `balance structure <https://docs.ccxt.com/#/?id=balance-structure>`
347
347
  """
@@ -355,7 +355,7 @@ class bithumb(Exchange, ImplicitAPI):
355
355
  def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
356
356
  """
357
357
  fetches information on open orders with bid(buy) and ask(sell) prices, volumes and other data
358
- :see: https://apidocs.bithumb.com/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
358
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%B8%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
359
359
  :param str symbol: unified symbol of the market to fetch the order book for
360
360
  :param int [limit]: the maximum amount of order book entries to return
361
361
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -445,7 +445,7 @@ class bithumb(Exchange, ImplicitAPI):
445
445
  def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
446
446
  """
447
447
  fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
448
- :see: https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
448
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C-all
449
449
  :param str[]|None symbols: unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
450
450
  :param dict [params]: extra parameters specific to the exchange API endpoint
451
451
  :returns dict: a dictionary of `ticker structures <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -502,7 +502,7 @@ class bithumb(Exchange, ImplicitAPI):
502
502
  def fetch_ticker(self, symbol: str, params={}) -> Ticker:
503
503
  """
504
504
  fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
505
- :see: https://apidocs.bithumb.com/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
505
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%ED%98%84%EC%9E%AC%EA%B0%80-%EC%A0%95%EB%B3%B4-%EC%A1%B0%ED%9A%8C
506
506
  :param str symbol: unified symbol of the market to fetch the ticker for
507
507
  :param dict [params]: extra parameters specific to the exchange API endpoint
508
508
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
@@ -559,7 +559,7 @@ class bithumb(Exchange, ImplicitAPI):
559
559
  def fetch_ohlcv(self, symbol: str, timeframe='1m', since: Int = None, limit: Int = None, params={}) -> List[list]:
560
560
  """
561
561
  fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
562
- :see: https://apidocs.bithumb.com/reference/candlestick-rest-api
562
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/candlestick-rest-api
563
563
  :param str symbol: unified symbol of the market to fetch OHLCV data for
564
564
  :param str timeframe: the length of time each candle represents
565
565
  :param int [since]: timestamp in ms of the earliest candle to fetch
@@ -676,7 +676,7 @@ class bithumb(Exchange, ImplicitAPI):
676
676
  def fetch_trades(self, symbol: str, since: Int = None, limit: Int = None, params={}) -> List[Trade]:
677
677
  """
678
678
  get the list of most recent trades for a particular symbol
679
- :see: https://apidocs.bithumb.com/reference/%EC%B5%9C%EA%B7%BC-%EC%B2%B4%EA%B2%B0-%EB%82%B4%EC%97%AD
679
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EC%B5%9C%EA%B7%BC-%EC%B2%B4%EA%B2%B0-%EB%82%B4%EC%97%AD
680
680
  :param str symbol: unified symbol of the market to fetch trades for
681
681
  :param int [since]: timestamp in ms of the earliest trade to fetch
682
682
  :param int [limit]: the maximum amount of trades to fetch
@@ -712,9 +712,9 @@ class bithumb(Exchange, ImplicitAPI):
712
712
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
713
713
  """
714
714
  create a trade order
715
- :see: https://apidocs.bithumb.com/reference/%EC%A7%80%EC%A0%95%EA%B0%80-%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
716
- :see: https://apidocs.bithumb.com/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EC%88%98%ED%95%98%EA%B8%B0
717
- :see: https://apidocs.bithumb.com/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EB%8F%84%ED%95%98%EA%B8%B0
715
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EC%A7%80%EC%A0%95%EA%B0%80-%EC%A3%BC%EB%AC%B8%ED%95%98%EA%B8%B0
716
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EC%88%98%ED%95%98%EA%B8%B0
717
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EC%8B%9C%EC%9E%A5%EA%B0%80-%EB%A7%A4%EB%8F%84%ED%95%98%EA%B8%B0
718
718
  :param str symbol: unified symbol of the market to create an order in
719
719
  :param str type: 'market' or 'limit'
720
720
  :param str side: 'buy' or 'sell'
@@ -751,7 +751,7 @@ class bithumb(Exchange, ImplicitAPI):
751
751
  def fetch_order(self, id: str, symbol: Str = None, params={}):
752
752
  """
753
753
  fetches information on an order made by the user
754
- :see: https://apidocs.bithumb.com/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%83%81%EC%84%B8-%EC%A1%B0%ED%9A%8C
754
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%83%81%EC%84%B8-%EC%A1%B0%ED%9A%8C
755
755
  :param str symbol: unified symbol of the market the order was made in
756
756
  :param dict [params]: extra parameters specific to the exchange API endpoint
757
757
  :returns dict: An `order structure <https://docs.ccxt.com/#/?id=order-structure>`
@@ -901,7 +901,7 @@ class bithumb(Exchange, ImplicitAPI):
901
901
  def fetch_open_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]:
902
902
  """
903
903
  fetch all unfilled currently open orders
904
- :see: https://apidocs.bithumb.com/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%A1%B0%ED%9A%8C
904
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EA%B1%B0%EB%9E%98-%EC%A3%BC%EB%AC%B8%EB%82%B4%EC%97%AD-%EC%A1%B0%ED%9A%8C
905
905
  :param str symbol: unified market symbol
906
906
  :param int [since]: the earliest time in ms to fetch open orders for
907
907
  :param int [limit]: the maximum number of open order structures to retrieve
@@ -945,7 +945,7 @@ class bithumb(Exchange, ImplicitAPI):
945
945
  def cancel_order(self, id: str, symbol: Str = None, params={}):
946
946
  """
947
947
  cancels an open order
948
- :see: https://apidocs.bithumb.com/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C%ED%95%98%EA%B8%B0
948
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EC%A3%BC%EB%AC%B8-%EC%B7%A8%EC%86%8C%ED%95%98%EA%B8%B0
949
949
  :param str id: order id
950
950
  :param str symbol: unified symbol of the market the order was made in
951
951
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -985,7 +985,7 @@ class bithumb(Exchange, ImplicitAPI):
985
985
  def withdraw(self, code: str, amount: float, address: str, tag=None, params={}):
986
986
  """
987
987
  make a withdrawal
988
- :see: https://apidocs.bithumb.com/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
988
+ :see: https://apidocs.bithumb.com/v1.2.0/reference/%EC%BD%94%EC%9D%B8-%EC%B6%9C%EA%B8%88%ED%95%98%EA%B8%B0-%EA%B0%9C%EC%9D%B8
989
989
  :param str code: unified currency code
990
990
  :param float amount: the amount to withdraw
991
991
  :param str address: the address to withdraw to
ccxt/bitmart.py CHANGED
@@ -2366,6 +2366,7 @@ class bitmart(Exchange, ImplicitAPI):
2366
2366
  :see: https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
2367
2367
  :see: https://developer-pro.bitmart.com/en/futures/#submit-order-signed
2368
2368
  :see: https://developer-pro.bitmart.com/en/futures/#submit-plan-order-signed
2369
+ :see: https://developer-pro.bitmart.com/en/futuresv2/#submit-plan-order-signed
2369
2370
  :param str symbol: unified symbol of the market to create an order in
2370
2371
  :param str type: 'market', 'limit' or 'trailing' for swap markets only
2371
2372
  :param str side: 'buy' or 'sell'
@@ -2582,6 +2583,8 @@ class bitmart(Exchange, ImplicitAPI):
2582
2583
  params = self.omit(params, ['timeInForce', 'postOnly', 'reduceOnly', 'leverage', 'trailingTriggerPrice', 'trailingPercent', 'triggerPrice', 'stopPrice'])
2583
2584
  if leverage is not None:
2584
2585
  request['leverage'] = self.number_to_string(leverage)
2586
+ elif isTriggerOrder:
2587
+ request['leverage'] = '1' # for plan orders leverage is required, if not available default to 1
2585
2588
  return self.extend(request, params)
2586
2589
 
2587
2590
  def create_spot_order_request(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
ccxt/bitteam.py CHANGED
@@ -1886,7 +1886,6 @@ class bitteam(Exchange, ImplicitAPI):
1886
1886
  fee = {
1887
1887
  'currency': self.safe_currency_code(feeCurrencyId),
1888
1888
  'cost': feeCost,
1889
- 'rate': None,
1890
1889
  }
1891
1890
  intTs = self.parse_to_int(timestamp)
1892
1891
  return self.safe_trade({
ccxt/bybit.py CHANGED
@@ -3565,7 +3565,10 @@ class bybit(Exchange, ImplicitAPI):
3565
3565
  request['qty'] = self.cost_to_precision(symbol, amount)
3566
3566
  else:
3567
3567
  if not isTrailingAmountOrder and not isAlternativeEndpoint:
3568
- request['qty'] = self.amount_to_precision(symbol, amount)
3568
+ if market['option']:
3569
+ request['qty'] = self.number_to_string(amount)
3570
+ else:
3571
+ request['qty'] = self.amount_to_precision(symbol, amount)
3569
3572
  if isTrailingAmountOrder:
3570
3573
  if trailingTriggerPrice is not None:
3571
3574
  request['activePrice'] = self.price_to_precision(symbol, trailingTriggerPrice)
ccxt/gate.py CHANGED
@@ -3293,8 +3293,8 @@ class gate(Exchange, ImplicitAPI):
3293
3293
  side = self.safe_string_2(trade, 'side', 'type', contractSide)
3294
3294
  orderId = self.safe_string(trade, 'order_id')
3295
3295
  feeAmount = self.safe_string(trade, 'fee')
3296
- gtFee = self.safe_string(trade, 'gt_fee')
3297
- pointFee = self.safe_string(trade, 'point_fee')
3296
+ gtFee = self.omit_zero(self.safe_string(trade, 'gt_fee'))
3297
+ pointFee = self.omit_zero(self.safe_string(trade, 'point_fee'))
3298
3298
  fees = []
3299
3299
  if feeAmount is not None:
3300
3300
  feeCurrencyId = self.safe_string(trade, 'fee_currency')
ccxt/kraken.py CHANGED
@@ -1336,7 +1336,7 @@ class kraken(Exchange, ImplicitAPI):
1336
1336
  def create_market_order_with_cost(self, symbol: str, side: OrderSide, cost: float, params={}):
1337
1337
  """
1338
1338
  create a market order by providing the symbol, side and cost
1339
- :see: https://docs.kraken.com/rest/#tag/Trading/operation/addOrder
1339
+ :see: https://docs.kraken.com/rest/#tag/Spot-Trading/operation/addOrder
1340
1340
  :param str symbol: unified symbol of the market to create an order in(only USD markets are supported)
1341
1341
  :param str side: 'buy' or 'sell'
1342
1342
  :param float cost: how much you want to trade in units of the quote currency
@@ -1351,7 +1351,7 @@ class kraken(Exchange, ImplicitAPI):
1351
1351
  def create_market_buy_order_with_cost(self, symbol: str, cost: float, params={}):
1352
1352
  """
1353
1353
  create a market buy order by providing the symbol, side and cost
1354
- :see: https://docs.kraken.com/rest/#tag/Trading/operation/addOrder
1354
+ :see: https://docs.kraken.com/rest/#tag/Spot-Trading/operation/addOrder
1355
1355
  :param str symbol: unified symbol of the market to create an order in
1356
1356
  :param float cost: how much you want to trade in units of the quote currency
1357
1357
  :param dict [params]: extra parameters specific to the exchange API endpoint
@@ -1362,7 +1362,7 @@ class kraken(Exchange, ImplicitAPI):
1362
1362
 
1363
1363
  def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
1364
1364
  """
1365
- :see: https://docs.kraken.com/rest/#tag/Trading/operation/addOrder
1365
+ :see: https://docs.kraken.com/rest/#tag/Spot-Trading/operation/addOrder
1366
1366
  create a trade order
1367
1367
  :param str symbol: unified symbol of the market to create an order in
1368
1368
  :param str type: 'market' or 'limit'
@@ -1495,6 +1495,8 @@ class kraken(Exchange, ImplicitAPI):
1495
1495
  # "status": "ok",
1496
1496
  # "txid": "OAW2BO-7RWEK-PZY5UO",
1497
1497
  # "originaltxid": "OXL6SS-UPNMC-26WBE7",
1498
+ # "newuserref": 1234,
1499
+ # "olduserref": 123,
1498
1500
  # "volume": "0.00075000",
1499
1501
  # "price": "13500.0",
1500
1502
  # "orders_cancelled": 1,
@@ -1623,7 +1625,7 @@ class kraken(Exchange, ImplicitAPI):
1623
1625
  if (id is None) or (id.startswith('[')):
1624
1626
  txid = self.safe_list(order, 'txid')
1625
1627
  id = self.safe_string(txid, 0)
1626
- clientOrderId = self.safe_string(order, 'userref')
1628
+ clientOrderId = self.safe_string_2(order, 'userref', 'newuserref')
1627
1629
  rawTrades = self.safe_value(order, 'trades', [])
1628
1630
  trades = []
1629
1631
  for i in range(0, len(rawTrades)):
@@ -1750,13 +1752,15 @@ class kraken(Exchange, ImplicitAPI):
1750
1752
  if postOnly:
1751
1753
  extendedPostFlags = flags + ',post' if (flags is not None) else 'post'
1752
1754
  request['oflags'] = extendedPostFlags
1755
+ if (flags is not None) and not ('oflags' in request):
1756
+ request['oflags'] = flags
1753
1757
  params = self.omit(params, ['timeInForce', 'reduceOnly', 'stopLossPrice', 'takeProfitPrice', 'trailingAmount', 'trailingLimitAmount', 'offset'])
1754
1758
  return [request, params]
1755
1759
 
1756
1760
  def edit_order(self, id: str, symbol: str, type: OrderType, side: OrderSide, amount: Num = None, price: Num = None, params={}):
1757
1761
  """
1758
1762
  edit a trade order
1759
- :see: https://docs.kraken.com/rest/#tag/Trading/operation/editOrder
1763
+ :see: https://docs.kraken.com/rest/#tag/Spot-Trading/operation/editOrder
1760
1764
  :param str id: order id
1761
1765
  :param str symbol: unified symbol of the market to create an order in
1762
1766
  :param str type: 'market' or 'limit'
@@ -1815,15 +1819,13 @@ class kraken(Exchange, ImplicitAPI):
1815
1819
  clientOrderId = self.safe_value_2(params, 'userref', 'clientOrderId')
1816
1820
  request: dict = {
1817
1821
  'trades': True, # whether or not to include trades in output(optional, default False)
1818
- # 'txid': id, # do not comma separate a list of ids - use fetchOrdersByIds instead
1822
+ 'txid': id, # do not comma separate a list of ids - use fetchOrdersByIds instead
1819
1823
  # 'userref': 'optional', # restrict results to given user reference id(optional)
1820
1824
  }
1821
1825
  query = params
1822
1826
  if clientOrderId is not None:
1823
1827
  request['userref'] = clientOrderId
1824
1828
  query = self.omit(params, ['userref', 'clientOrderId'])
1825
- else:
1826
- request['txid'] = id
1827
1829
  response = self.privatePostQueryOrders(self.extend(request, query))
1828
1830
  #
1829
1831
  # {
ccxt/kuna.py CHANGED
@@ -870,7 +870,6 @@ class kuna(Exchange, ImplicitAPI):
870
870
  'fee': {
871
871
  'cost': self.safe_string(trade, 'fee'),
872
872
  'currency': self.safe_currency_code(self.safe_string(trade, 'feeCurrency')),
873
- 'rate': None,
874
873
  },
875
874
  }, market)
876
875
 
ccxt/pro/__init__.py CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # ----------------------------------------------------------------------------
6
6
 
7
- __version__ = '4.3.76'
7
+ __version__ = '4.3.78'
8
8
 
9
9
  # ----------------------------------------------------------------------------
10
10
 
ccxt/pro/binance.py CHANGED
@@ -204,7 +204,7 @@ class binance(ccxt.async_support.binance):
204
204
  :param dict [params]: exchange specific parameters for the bitmex api endpoint
205
205
  :returns dict: an array of `liquidation structures <https://github.com/ccxt/ccxt/wiki/Manual#liquidation-structure>`
206
206
  """
207
- return self.watch_liquidations_for_symbols([symbol], since, limit, params)
207
+ return await self.watch_liquidations_for_symbols([symbol], since, limit, params)
208
208
 
209
209
  async def watch_liquidations_for_symbols(self, symbols: List[str] = None, since: Int = None, limit: Int = None, params={}) -> List[Liquidation]:
210
210
  """
ccxt/pro/bybit.py CHANGED
@@ -87,6 +87,25 @@ class bybit(ccxt.async_support.bybit):
87
87
  },
88
88
  },
89
89
  },
90
+ 'demotrading': {
91
+ 'ws': {
92
+ 'public': {
93
+ 'spot': 'wss://stream.{hostname}/v5/public/spot',
94
+ 'inverse': 'wss://stream.{hostname}/v5/public/inverse',
95
+ 'option': 'wss://stream.{hostname}/v5/public/option',
96
+ 'linear': 'wss://stream.{hostname}/v5/public/linear',
97
+ },
98
+ 'private': {
99
+ 'spot': {
100
+ 'unified': 'wss://stream-demo.{hostname}/v5/private',
101
+ 'nonUnified': 'wss://stream-demo.{hostname}/spot/private/v3',
102
+ },
103
+ 'contract': 'wss://stream-demo.{hostname}/v5/private',
104
+ 'usdc': 'wss://stream-demo.{hostname}/trade/option/usdc/private/v1',
105
+ 'trade': 'wss://stream-demo.bybit.com/v5/trade',
106
+ },
107
+ },
108
+ },
90
109
  },
91
110
  'options': {
92
111
  'watchTicker': {
ccxt/pro/paradex.py CHANGED
@@ -112,6 +112,7 @@ class paradex(ccxt.async_support.paradex):
112
112
  :param dict [params]: extra parameters specific to the exchange API endpoint
113
113
  :returns dict: A dictionary of `order book structures <https://docs.ccxt.com/#/?id=order-book-structure>` indexed by market symbols
114
114
  """
115
+ await self.load_markets()
115
116
  market = self.market(symbol)
116
117
  messageHash = 'order_book.' + market['id'] + '.snapshot@15@100ms'
117
118
  url = self.urls['api']['ws']
@@ -213,6 +214,7 @@ class paradex(ccxt.async_support.paradex):
213
214
  :param dict [params]: extra parameters specific to the exchange API endpoint
214
215
  :returns dict: a `ticker structure <https://docs.ccxt.com/#/?id=ticker-structure>`
215
216
  """
217
+ await self.load_markets()
216
218
  symbols = self.market_symbols(symbols)
217
219
  channel = 'markets_summary'
218
220
  url = self.urls['api']['ws']
ccxt/pro/woo.py CHANGED
@@ -611,7 +611,7 @@ class woo(ccxt.async_support.woo):
611
611
  },
612
612
  }
613
613
  message = self.extend(request, params)
614
- self.watch(url, messageHash, message, messageHash)
614
+ self.watch(url, messageHash, message, messageHash, message)
615
615
  return await future
616
616
 
617
617
  async def watch_private(self, messageHash, message, params={}):
@@ -4,7 +4,12 @@ from typing import (
4
4
  TypeVar,
5
5
  )
6
6
 
7
- from ...typing_extensions.typing_extensions import Literal, ParamSpec
7
+ import sys
8
+
9
+ if sys.version_info.minor >= 11:
10
+ from typing import Literal, ParamSpec
11
+ else:
12
+ from typing_extensions import Literal, ParamSpec
8
13
 
9
14
  T = TypeVar("T")
10
15
  P = ParamSpec("P")
ccxt/vertex.py CHANGED
@@ -658,6 +658,12 @@ class vertex(Exchange, ImplicitAPI):
658
658
  amount = None
659
659
  side = None
660
660
  fee = None
661
+ feeCost = self.convert_from_x18(self.safe_string(trade, 'fee'))
662
+ if feeCost is not None:
663
+ fee = {
664
+ 'cost': feeCost,
665
+ 'currency': None,
666
+ }
661
667
  id = self.safe_string_2(trade, 'trade_id', 'submission_idx')
662
668
  order = self.safe_string(trade, 'digest')
663
669
  timestamp = self.safe_timestamp(trade, 'timestamp')
@@ -673,10 +679,6 @@ class vertex(Exchange, ImplicitAPI):
673
679
  subOrder = self.safe_dict(trade, 'order', {})
674
680
  price = self.convert_from_x18(self.safe_string(subOrder, 'priceX18'))
675
681
  amount = self.convert_from_x18(self.safe_string(trade, 'base_filled'))
676
- fee = {
677
- 'cost': self.convert_from_x18(self.safe_string(trade, 'fee')),
678
- 'currency': None,
679
- }
680
682
  if Precise.string_lt(amount, '0'):
681
683
  side = 'sell'
682
684
  else:
ccxt/woo.py CHANGED
@@ -603,6 +603,9 @@ class woo(Exchange, ImplicitAPI):
603
603
  amount = self.safe_string(trade, 'executed_quantity')
604
604
  order_id = self.safe_string(trade, 'order_id')
605
605
  fee = self.parse_token_and_fee_temp(trade, 'fee_asset', 'fee')
606
+ feeCost = self.safe_string(fee, 'cost')
607
+ if feeCost is not None:
608
+ fee['cost'] = feeCost
606
609
  cost = Precise.string_mul(price, amount)
607
610
  side = self.safe_string_lower(trade, 'side')
608
611
  id = self.safe_string(trade, 'id')
ccxt/woofipro.py CHANGED
@@ -673,6 +673,9 @@ class woofipro(Exchange, ImplicitAPI):
673
673
  amount = self.safe_string(trade, 'executed_quantity')
674
674
  order_id = self.safe_string(trade, 'order_id')
675
675
  fee = self.parse_token_and_fee_temp(trade, 'fee_asset', 'fee')
676
+ feeCost = self.safe_string(fee, 'cost')
677
+ if feeCost is not None:
678
+ fee['cost'] = feeCost
676
679
  cost = Precise.string_mul(price, amount)
677
680
  side = self.safe_string_lower(trade, 'side')
678
681
  id = self.safe_string(trade, 'id')
ccxt/xt.py CHANGED
@@ -2034,7 +2034,6 @@ class xt(Exchange, ImplicitAPI):
2034
2034
  'fee': {
2035
2035
  'currency': self.safe_currency_code(self.safe_string_2(trade, 'feeCurrency', 'feeCoin')),
2036
2036
  'cost': self.safe_string(trade, 'fee'),
2037
- 'rate': None,
2038
2037
  },
2039
2038
  }, market)
2040
2039
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ccxt
3
- Version: 4.3.76
3
+ Version: 4.3.78
4
4
  Summary: A JavaScript / TypeScript / Python / C# / PHP cryptocurrency trading library with support for 100+ exchanges
5
5
  Home-page: https://ccxt.com
6
6
  Author: Igor Kroitor
@@ -270,13 +270,13 @@ console.log(version, Object.keys(exchanges));
270
270
 
271
271
  All-in-one browser bundle (dependencies included), served from a CDN of your choice:
272
272
 
273
- * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.76/dist/ccxt.browser.min.js
274
- * unpkg: https://unpkg.com/ccxt@4.3.76/dist/ccxt.browser.min.js
273
+ * jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.78/dist/ccxt.browser.min.js
274
+ * unpkg: https://unpkg.com/ccxt@4.3.78/dist/ccxt.browser.min.js
275
275
 
276
276
  CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
277
277
 
278
278
  ```HTML
279
- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.76/dist/ccxt.browser.min.js"></script>
279
+ <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.78/dist/ccxt.browser.min.js"></script>
280
280
  ```
281
281
 
282
282
  Creates a global `ccxt` object: