wiz-trader 0.11.0__py3-none-any.whl → 0.13.0__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.
wiz_trader/__init__.py CHANGED
@@ -3,6 +3,6 @@
3
3
  from .quotes import QuotesClient
4
4
  from .apis import WizzerClient
5
5
 
6
- __version__ = "0.11.0"
6
+ __version__ = "0.13.0"
7
7
 
8
8
  __all__ = ["QuotesClient", "WizzerClient"]
wiz_trader/apis/client.py CHANGED
@@ -37,8 +37,8 @@ class WizzerClient:
37
37
  # Order types
38
38
  ORDER_TYPE_MARKET = "MARKET"
39
39
  ORDER_TYPE_LIMIT = "LIMIT"
40
- ORDER_TYPE_SL = "SL" # Stop Loss
41
- ORDER_TYPE_SLM = "SL-M" # Stop Loss Market
40
+ ORDER_TYPE_SL = "STOPLIMIT" # Stop Loss
41
+ ORDER_TYPE_SLM = "STOPMARKET" # Stop Loss Market
42
42
 
43
43
  # Validity types
44
44
  VALIDITY_DAY = "DAY"
@@ -553,7 +553,7 @@ class WizzerClient:
553
553
  Returns:
554
554
  Dict[str, Any]: Order response containing orderId.
555
555
  """
556
- endpoint = self._routes["order.basket"]
556
+ endpoint = self._routes["basket.order.place"]
557
557
 
558
558
  # Set default values from constants if not provided
559
559
  if order_type is None:
@@ -621,7 +621,7 @@ class WizzerClient:
621
621
  Returns:
622
622
  Dict[str, Any]: Order response containing orderId.
623
623
  """
624
- endpoint = self._routes["order.basket_exit"]
624
+ endpoint = self._routes["basket.order.exit"]
625
625
 
626
626
  # Build base data
627
627
  data = {
@@ -674,7 +674,7 @@ class WizzerClient:
674
674
  Returns:
675
675
  Dict[str, Any]: Order response containing orderId.
676
676
  """
677
- endpoint = self._routes["order.basket_modify"].format(order_id=order_id)
677
+ endpoint = self._routes["basket.order.modify"].format(order_id=order_id)
678
678
 
679
679
  logger.debug("Modifying basket order %s with params: %s", order_id, params)
680
680
  return self._make_request("PATCH", endpoint, json=params)
@@ -713,10 +713,12 @@ class WizzerClient:
713
713
  Returns:
714
714
  Dict[str, Any]: Response with summary of success and failure counts.
715
715
  """
716
- endpoint = self._routes["portfolio.positions_exit_all"]
716
+ endpoint = self._routes["portfolio.positions.exit.all"]
717
+
718
+ data = {}
717
719
 
718
720
  logger.debug("Exiting all positions")
719
- return self._make_request("POST", endpoint)
721
+ return self._make_request("POST", endpoint, json=data)
720
722
 
721
723
  def exit_strategy_positions(self, strategy_id: Optional[str] = None) -> Dict[str, Any]:
722
724
  """
@@ -738,10 +740,12 @@ class WizzerClient:
738
740
  raise ValueError("Strategy ID must be provided either as a parameter or set in .env (WZ__STRATEGY_ID)")
739
741
  strategy_id = self.strategy_id
740
742
 
741
- endpoint = self._routes["portfolio.positions_exit_strategies"].format(strategy_id=strategy_id)
743
+ endpoint = self._routes["portfolio.positions.exit.strategy"].format(strategy_id=strategy_id)
744
+
745
+ data = {}
742
746
 
743
747
  logger.debug("Exiting all positions for strategy: %s", strategy_id)
744
- return self._make_request("POST", endpoint)
748
+ return self._make_request("POST", endpoint, json=data)
745
749
 
746
750
  def _make_request(
747
751
  self,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wiz_trader
3
- Version: 0.11.0
3
+ Version: 0.13.0
4
4
  Summary: A Python SDK for connecting to the Wizzer.
5
5
  Home-page: https://bitbucket.org/wizzer-tech/quotes_sdk.git
6
6
  Author: Pawan Wagh
@@ -296,6 +296,14 @@ async def main():
296
296
  asyncio.run(main())
297
297
  ```
298
298
 
299
+ #### Ticks structure
300
+ ts = tick timestamp
301
+ lastTradedTs = timestamp of the last executed trade in this instrument
302
+
303
+ ```
304
+ {'identifier': 'NSE:RELIANCE:2885', 'tradingSymbol': 'RELIANCE', 'exchange': 'NSE', 'segment': 'NSECM', 'exchangeToken': 2885, 'bids': [{'volume': 1722, 'price': 1295.5, 'orders': 43}, {'volume': 0, 'price': 0, 'orders': 0}, {'volume': 0, 'price': 0, 'orders': 0}, {'volume': 0, 'price': 0, 'orders': 0}, {'volume': 0, 'price': 0, 'orders': 0}], 'offers': [{'volume': 0, 'price': 0, 'orders': 0}, {'volume': 0, 'price': 0, 'orders': 0}, {'volume': 0, 'price': 0, 'orders': 0}, {'volume': 0, 'price': 0, 'orders': 0}, {'volume': 0, 'price': 0, 'orders': 0}], 'ltp': 1295.5, 'lastTradedQty': 10, 'buyQty': 1722, 'sellQty': 0, 'volume': 10429964, 'avgPrice': 1291.46, 'netChange': 0, 'ohlc': {'open': 1270, 'high': 1300.9, 'low': 1267, 'close': 1295.5}, 'lastTradedTs': '2025-04-21T10:29:33Z', 'ts': '2025-04-21T10:29:46Z'}
305
+ ```
306
+
299
307
  ## Wizzer Client
300
308
 
301
309
  The `WizzerClient` provides access to Wizzer's REST APIs for trading, portfolio management, and market data.
@@ -0,0 +1,9 @@
1
+ wiz_trader/__init__.py,sha256=0UAS-iwEWGpAmzSwXW_1ux-uiKRn07Yv1imLq-h2xKI,182
2
+ wiz_trader/apis/__init__.py,sha256=ItWKMOl4omiW0g2f-M7WRW3v-dss_ULd9vYnFyIIT9o,132
3
+ wiz_trader/apis/client.py,sha256=QVarYhQbGcS0j8aVqmG34Bi_FXwpr6zwbqblEExrHxI,25656
4
+ wiz_trader/quotes/__init__.py,sha256=RF9g9CNP6bVWlmCh_ad8krm3-EWOIuVfLp0-H9fAeEM,108
5
+ wiz_trader/quotes/client.py,sha256=LJeMcQPjJIRxrTIGalWsLYh_XfinDXBP5-4cNS7qCxc,9709
6
+ wiz_trader-0.13.0.dist-info/METADATA,sha256=2CwKcC2dAgRxH1lULjTiUHW1XSLrzkEpXLMSVT1XwgQ,54024
7
+ wiz_trader-0.13.0.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
8
+ wiz_trader-0.13.0.dist-info/top_level.txt,sha256=lnYS_g8LlA6ryKYnvY8xIQ6K2K-xzOsd-99AWgnW6VY,11
9
+ wiz_trader-0.13.0.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- wiz_trader/__init__.py,sha256=C0FSsZWVvQ5bLn9WzjVb3QD4erLfxjy5V0bCAjxBECE,182
2
- wiz_trader/apis/__init__.py,sha256=ItWKMOl4omiW0g2f-M7WRW3v-dss_ULd9vYnFyIIT9o,132
3
- wiz_trader/apis/client.py,sha256=4Vu9z0cLjJ62LTNT13UwicU0Ez3jnwQOcirWtJAF4Hw,25578
4
- wiz_trader/quotes/__init__.py,sha256=RF9g9CNP6bVWlmCh_ad8krm3-EWOIuVfLp0-H9fAeEM,108
5
- wiz_trader/quotes/client.py,sha256=LJeMcQPjJIRxrTIGalWsLYh_XfinDXBP5-4cNS7qCxc,9709
6
- wiz_trader-0.11.0.dist-info/METADATA,sha256=IpTpq7bUvtWlCM1f-BVOx9K2MTM_HCsLXd_T5aefXKU,53081
7
- wiz_trader-0.11.0.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
8
- wiz_trader-0.11.0.dist-info/top_level.txt,sha256=lnYS_g8LlA6ryKYnvY8xIQ6K2K-xzOsd-99AWgnW6VY,11
9
- wiz_trader-0.11.0.dist-info/RECORD,,