wiz-trader 0.5.0__py3-none-any.whl → 0.7.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 +1 -1
- wiz_trader/apis/client.py +48 -5
- {wiz_trader-0.5.0.dist-info → wiz_trader-0.7.0.dist-info}/METADATA +2 -2
- wiz_trader-0.7.0.dist-info/RECORD +9 -0
- {wiz_trader-0.5.0.dist-info → wiz_trader-0.7.0.dist-info}/WHEEL +1 -1
- wiz_trader-0.5.0.dist-info/RECORD +0 -9
- {wiz_trader-0.5.0.dist-info → wiz_trader-0.7.0.dist-info}/top_level.txt +0 -0
wiz_trader/__init__.py
CHANGED
wiz_trader/apis/client.py
CHANGED
@@ -273,18 +273,61 @@ class WizzerClient:
|
|
273
273
|
logger.debug("Cancelling order: %s", order_id)
|
274
274
|
return self._make_request("DELETE", endpoint)
|
275
275
|
|
276
|
-
def
|
276
|
+
def get_order(self, order_id: str) -> Dict[str, Any]:
|
277
277
|
"""
|
278
|
-
Get
|
278
|
+
Get details of a specific order by ID.
|
279
279
|
|
280
|
+
Args:
|
281
|
+
order_id (str): ID of the order to retrieve.
|
282
|
+
|
280
283
|
Returns:
|
281
|
-
|
284
|
+
Dict[str, Any]: Order details.
|
282
285
|
"""
|
283
|
-
endpoint = "/
|
286
|
+
endpoint = f"/orders/{order_id}"
|
284
287
|
|
285
|
-
logger.debug("Fetching
|
288
|
+
logger.debug("Fetching order: %s", order_id)
|
286
289
|
return self._make_request("GET", endpoint)
|
287
290
|
|
291
|
+
def get_positions(self, position_status: Optional[str] = None) -> List[Dict[str, Any]]:
|
292
|
+
"""
|
293
|
+
Get portfolio positions with optional filtering by status.
|
294
|
+
|
295
|
+
Args:
|
296
|
+
position_status (Optional[str], optional): Filter positions by status.
|
297
|
+
Valid values: "open", "closed". If None, returns all positions.
|
298
|
+
|
299
|
+
Returns:
|
300
|
+
List[Dict[str, Any]]: List of positions matching the filter criteria.
|
301
|
+
"""
|
302
|
+
endpoint = "/portfolios/positions"
|
303
|
+
params = {}
|
304
|
+
|
305
|
+
if position_status:
|
306
|
+
if position_status not in ["open", "closed"]:
|
307
|
+
raise ValueError("position_status must be either 'open', 'closed', or None")
|
308
|
+
params["positionStatus"] = position_status
|
309
|
+
|
310
|
+
logger.debug("Fetching positions with status: %s", position_status or "all")
|
311
|
+
return self._make_request("GET", endpoint, params=params)
|
312
|
+
|
313
|
+
def get_open_positions(self) -> List[Dict[str, Any]]:
|
314
|
+
"""
|
315
|
+
Get all open positions in the portfolio.
|
316
|
+
|
317
|
+
Returns:
|
318
|
+
List[Dict[str, Any]]: List of open positions.
|
319
|
+
"""
|
320
|
+
return self.get_positions(position_status="open")
|
321
|
+
|
322
|
+
def get_closed_positions(self) -> List[Dict[str, Any]]:
|
323
|
+
"""
|
324
|
+
Get all closed positions in the portfolio.
|
325
|
+
|
326
|
+
Returns:
|
327
|
+
List[Dict[str, Any]]: List of closed positions.
|
328
|
+
"""
|
329
|
+
return self.get_positions(position_status="closed")
|
330
|
+
|
288
331
|
def get_holdings(self, portfolios: Optional[str] = "default") -> List[Dict[str, Any]]:
|
289
332
|
"""
|
290
333
|
Get current holdings.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
wiz_trader/__init__.py,sha256=V4DgwVGNtcnqYZhVe7pww5-IHtYqge5CQXqkaS81mfo,181
|
2
|
+
wiz_trader/apis/__init__.py,sha256=ItWKMOl4omiW0g2f-M7WRW3v-dss_ULd9vYnFyIIT9o,132
|
3
|
+
wiz_trader/apis/client.py,sha256=rq6FEA5DDCGXc4axSSzOdVvet1NWlW8L843GMp0qXQA,20562
|
4
|
+
wiz_trader/quotes/__init__.py,sha256=RF9g9CNP6bVWlmCh_ad8krm3-EWOIuVfLp0-H9fAeEM,108
|
5
|
+
wiz_trader/quotes/client.py,sha256=fUHTMGDauGF9cjsFsVAzoOwqSgD555_TLoNqmnFhLdQ,6203
|
6
|
+
wiz_trader-0.7.0.dist-info/METADATA,sha256=kqDpwsUfiECcbxhVKPUEuSedAu50L-OOPX2M4JAW12o,4281
|
7
|
+
wiz_trader-0.7.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
8
|
+
wiz_trader-0.7.0.dist-info/top_level.txt,sha256=lnYS_g8LlA6ryKYnvY8xIQ6K2K-xzOsd-99AWgnW6VY,11
|
9
|
+
wiz_trader-0.7.0.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
wiz_trader/__init__.py,sha256=_X0Mp5qJUiQ5GyZsECsIXaZ-IjzF2L2Hmpxkn4zLHXI,181
|
2
|
-
wiz_trader/apis/__init__.py,sha256=ItWKMOl4omiW0g2f-M7WRW3v-dss_ULd9vYnFyIIT9o,132
|
3
|
-
wiz_trader/apis/client.py,sha256=EfBLHI-4cfWdrVhtKdL3rzeKheIIxGKwSFrjUE_hfWU,19131
|
4
|
-
wiz_trader/quotes/__init__.py,sha256=RF9g9CNP6bVWlmCh_ad8krm3-EWOIuVfLp0-H9fAeEM,108
|
5
|
-
wiz_trader/quotes/client.py,sha256=fUHTMGDauGF9cjsFsVAzoOwqSgD555_TLoNqmnFhLdQ,6203
|
6
|
-
wiz_trader-0.5.0.dist-info/METADATA,sha256=35gVWkB7nVy-u1n0vrAgKJQvsaxz4hgfRdymJ4yxLjc,4281
|
7
|
-
wiz_trader-0.5.0.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
|
8
|
-
wiz_trader-0.5.0.dist-info/top_level.txt,sha256=lnYS_g8LlA6ryKYnvY8xIQ6K2K-xzOsd-99AWgnW6VY,11
|
9
|
-
wiz_trader-0.5.0.dist-info/RECORD,,
|
File without changes
|