wiz-trader 0.29.0__tar.gz → 0.30.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wiz_trader
3
- Version: 0.29.0
3
+ Version: 0.30.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
@@ -525,6 +525,24 @@ filtered_instruments = client.filter_instruments(
525
525
  )
526
526
  ```
527
527
 
528
+ #### Filter Instruments by Derivatives
529
+
530
+ Filter instruments based on whether they have associated futures or options contracts.
531
+
532
+ ```python
533
+ # Find all instruments that have options
534
+ optionable_stocks = client.filter_instruments_by_derivatives(hasOptions=True)
535
+
536
+ # Find all instruments that have futures
537
+ futures_stocks = client.filter_instruments_by_derivatives(hasFutures=True)
538
+
539
+ # Find all instruments that have both options and futures
540
+ fno_stocks = client.filter_instruments_by_derivatives(hasOptions=True, hasFutures=True)
541
+
542
+ # Find all instruments that have either options or futures
543
+ all_derivative_stocks = client.filter_instruments_by_derivatives()
544
+ ```
545
+
528
546
  #### Get Historical OHLCV Data
529
547
  ## Overview
530
548
 
@@ -498,6 +498,24 @@ filtered_instruments = client.filter_instruments(
498
498
  )
499
499
  ```
500
500
 
501
+ #### Filter Instruments by Derivatives
502
+
503
+ Filter instruments based on whether they have associated futures or options contracts.
504
+
505
+ ```python
506
+ # Find all instruments that have options
507
+ optionable_stocks = client.filter_instruments_by_derivatives(hasOptions=True)
508
+
509
+ # Find all instruments that have futures
510
+ futures_stocks = client.filter_instruments_by_derivatives(hasFutures=True)
511
+
512
+ # Find all instruments that have both options and futures
513
+ fno_stocks = client.filter_instruments_by_derivatives(hasOptions=True, hasFutures=True)
514
+
515
+ # Find all instruments that have either options or futures
516
+ all_derivative_stocks = client.filter_instruments_by_derivatives()
517
+ ```
518
+
501
519
  #### Get Historical OHLCV Data
502
520
  ## Overview
503
521
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wiz_trader"
7
- version = "0.29.0"
7
+ version = "0.30.0"
8
8
  description = "A Python SDK for connecting to the Wizzer."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -3,6 +3,6 @@
3
3
  from .quotes import QuotesClient
4
4
  from .apis import WizzerClient
5
5
 
6
- __version__ = "0.29.0"
6
+ __version__ = "0.30.0"
7
7
 
8
8
  __all__ = ["QuotesClient", "WizzerClient"]
@@ -204,7 +204,8 @@ class WizzerClient:
204
204
  "classification.values": "/datahub/classifications/{type}",
205
205
  "indices.filter": "/datahub/indices/filter",
206
206
  "instruments.filter": "/datahub/instruments/filter",
207
- "instruments.filter_with_index": "/datahub/indices/{id}/instruments"
207
+ "instruments.filter_with_index": "/datahub/indices/{id}/instruments",
208
+ "instruments.filter_by_derivatives": "/datahub/instruments/filter-by-derivatives"
208
209
  }
209
210
 
210
211
  def __init__(
@@ -1683,6 +1684,31 @@ class WizzerClient:
1683
1684
 
1684
1685
  return self._make_request("POST", endpoint, json=data)
1685
1686
 
1687
+ def filter_instruments_by_derivatives(
1688
+ self,
1689
+ hasOptions: Optional[bool] = None,
1690
+ hasFutures: Optional[bool] = None
1691
+ ) -> list:
1692
+ """
1693
+ Filter instruments based on the existence of derivatives (options or futures).
1694
+
1695
+ Args:
1696
+ hasOptions (Optional[bool]): If True, returns instruments that have options.
1697
+ hasFutures (Optional[bool]): If True, returns instruments that have futures.
1698
+
1699
+ Returns:
1700
+ list: A list of instruments that match the criteria.
1701
+ """
1702
+ endpoint = self._routes["instruments.filter_by_derivatives"]
1703
+ data = {}
1704
+ if hasOptions is not None:
1705
+ data["hasOptions"] = hasOptions
1706
+ if hasFutures is not None:
1707
+ data["hasFutures"] = hasFutures
1708
+
1709
+ logger.debug(f"Filtering instruments by derivatives with payload: {data}")
1710
+ return self._make_request("POST", endpoint, json=data)
1711
+
1686
1712
  def _make_request(
1687
1713
  self,
1688
1714
  method: str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wiz_trader
3
- Version: 0.29.0
3
+ Version: 0.30.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
@@ -525,6 +525,24 @@ filtered_instruments = client.filter_instruments(
525
525
  )
526
526
  ```
527
527
 
528
+ #### Filter Instruments by Derivatives
529
+
530
+ Filter instruments based on whether they have associated futures or options contracts.
531
+
532
+ ```python
533
+ # Find all instruments that have options
534
+ optionable_stocks = client.filter_instruments_by_derivatives(hasOptions=True)
535
+
536
+ # Find all instruments that have futures
537
+ futures_stocks = client.filter_instruments_by_derivatives(hasFutures=True)
538
+
539
+ # Find all instruments that have both options and futures
540
+ fno_stocks = client.filter_instruments_by_derivatives(hasOptions=True, hasFutures=True)
541
+
542
+ # Find all instruments that have either options or futures
543
+ all_derivative_stocks = client.filter_instruments_by_derivatives()
544
+ ```
545
+
528
546
  #### Get Historical OHLCV Data
529
547
  ## Overview
530
548
 
File without changes
File without changes
File without changes