poly-position-watcher 0.3.7__tar.gz → 0.3.8__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.
- {poly_position_watcher-0.3.7/poly_position_watcher.egg-info → poly_position_watcher-0.3.8}/PKG-INFO +13 -2
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/README.md +12 -1
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/schema/position_model.py +5 -4
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8/poly_position_watcher.egg-info}/PKG-INFO +13 -2
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/pyproject.toml +1 -1
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/LICENSE +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/MANIFEST.in +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/__init__.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/_version.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/api_worker.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/common/__init__.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/common/enums.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/common/logger.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/position_service.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/schema/__init__.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/schema/base.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/schema/common_model.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/trade_calculator.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/wss_worker.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher.egg-info/SOURCES.txt +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher.egg-info/dependency_links.txt +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher.egg-info/requires.txt +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher.egg-info/top_level.txt +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/setup.cfg +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/setup.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/tests/test_http_fallback_manager.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/tests/test_position_model.py +0 -0
- {poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/tests/test_trade_calculator.py +0 -0
{poly_position_watcher-0.3.7/poly_position_watcher.egg-info → poly_position_watcher-0.3.8}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: poly-position-watcher
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: polymarket proxy wallet redeem
|
|
5
5
|
Home-page: https://github.com/tosmart01/polymarket-position-watcher
|
|
6
6
|
Author: pinbar
|
|
@@ -27,7 +27,13 @@ Dynamic: requires-python
|
|
|
27
27
|
|
|
28
28
|
## Overview
|
|
29
29
|
|
|
30
|
-
`poly-position-watcher`
|
|
30
|
+
`poly-position-watcher` is built for real trading on Polymarket, where order fills, trade updates, position sync, and sellable on-chain balance may not arrive at the same time.
|
|
31
|
+
|
|
32
|
+
In practice, `order filled`, `trade confirmed`, `position updated`, and `sellable on-chain` are different states. Strategy code that reacts to only one of them can easily overestimate inventory, mis-time hedges, or place exits before the position is actually ready.
|
|
33
|
+
|
|
34
|
+
This library acts as an execution reliability layer for Polymarket strategies. It helps you observe and reconcile these states in one place, so your strategy does not mistake "order filled" for "position synchronized" or "position visible" for "actually sellable".
|
|
35
|
+
|
|
36
|
+
Core capabilities:
|
|
31
37
|
|
|
32
38
|
- WSS real-time tracking for `TRADE` and `ORDER` (positions + orders)
|
|
33
39
|
- HTTP polling fallback for reliability
|
|
@@ -35,6 +41,11 @@ Dynamic: requires-python
|
|
|
35
41
|
- Position fields for fill checks:
|
|
36
42
|
`size` (post-fee net size), `original_size` (pre-fee net size), `sellable_size` (on-chain confirmed size), `fee_amount` (accumulated fee amount)
|
|
37
43
|
- Failed trades are detected and returned on positions (`has_failed`, `failed_trades`)
|
|
44
|
+
- Strategy-scoped position queries by `order_ids`:
|
|
45
|
+
`get_position_by_order_ids(...)` and `get_positions_by_order_ids(...)`
|
|
46
|
+
- Order-aware fill helpers:
|
|
47
|
+
`get_effective_position_size(...)`, `wait_for_orders_filled(...)`, `wait_for_orders_pos_filled(...)`
|
|
48
|
+
- HTTP fallback namespaces via `group=...`, so multiple callers can share one watcher without overwriting each other's monitored order/market sets
|
|
38
49
|
|
|
39
50
|
**Note: WSS disconnects are auto-detected and reconnected.**
|
|
40
51
|
|
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
`poly-position-watcher`
|
|
11
|
+
`poly-position-watcher` is built for real trading on Polymarket, where order fills, trade updates, position sync, and sellable on-chain balance may not arrive at the same time.
|
|
12
|
+
|
|
13
|
+
In practice, `order filled`, `trade confirmed`, `position updated`, and `sellable on-chain` are different states. Strategy code that reacts to only one of them can easily overestimate inventory, mis-time hedges, or place exits before the position is actually ready.
|
|
14
|
+
|
|
15
|
+
This library acts as an execution reliability layer for Polymarket strategies. It helps you observe and reconcile these states in one place, so your strategy does not mistake "order filled" for "position synchronized" or "position visible" for "actually sellable".
|
|
16
|
+
|
|
17
|
+
Core capabilities:
|
|
12
18
|
|
|
13
19
|
- WSS real-time tracking for `TRADE` and `ORDER` (positions + orders)
|
|
14
20
|
- HTTP polling fallback for reliability
|
|
@@ -16,6 +22,11 @@
|
|
|
16
22
|
- Position fields for fill checks:
|
|
17
23
|
`size` (post-fee net size), `original_size` (pre-fee net size), `sellable_size` (on-chain confirmed size), `fee_amount` (accumulated fee amount)
|
|
18
24
|
- Failed trades are detected and returned on positions (`has_failed`, `failed_trades`)
|
|
25
|
+
- Strategy-scoped position queries by `order_ids`:
|
|
26
|
+
`get_position_by_order_ids(...)` and `get_positions_by_order_ids(...)`
|
|
27
|
+
- Order-aware fill helpers:
|
|
28
|
+
`get_effective_position_size(...)`, `wait_for_orders_filled(...)`, `wait_for_orders_pos_filled(...)`
|
|
29
|
+
- HTTP fallback namespaces via `group=...`, so multiple callers can share one watcher without overwriting each other's monitored order/market sets
|
|
19
30
|
|
|
20
31
|
**Note: WSS disconnects are auto-detected and reconnected.**
|
|
21
32
|
|
|
@@ -21,12 +21,12 @@ class MakerOrder(BaseModel):
|
|
|
21
21
|
outcome: str
|
|
22
22
|
owner: str
|
|
23
23
|
price: float
|
|
24
|
-
fee_rate_bps: float
|
|
24
|
+
fee_rate_bps: float | str | None = None
|
|
25
25
|
outcome_index: int | None = None
|
|
26
26
|
maker_address: str
|
|
27
27
|
side: Side
|
|
28
28
|
|
|
29
|
-
@field_validator(
|
|
29
|
+
@field_validator( "price", "matched_amount", "size", mode="before")
|
|
30
30
|
@classmethod
|
|
31
31
|
def validate_float(cls, v: str):
|
|
32
32
|
return float(v)
|
|
@@ -59,7 +59,8 @@ class TradeMessage(BaseModel):
|
|
|
59
59
|
last_update: int | None = None
|
|
60
60
|
trade_owner: Optional[str] = None
|
|
61
61
|
trader_side: Optional[Literal["MAKER", "TAKER"]] = None
|
|
62
|
-
fee_rate_bps: float
|
|
62
|
+
fee_rate_bps: float | str | None = None
|
|
63
|
+
outcome_index: int | None = None
|
|
63
64
|
created_at: datetime | None = None
|
|
64
65
|
market_slug: Optional[str] = ""
|
|
65
66
|
|
|
@@ -87,7 +88,7 @@ class TradeMessage(BaseModel):
|
|
|
87
88
|
return None
|
|
88
89
|
return int(v)
|
|
89
90
|
|
|
90
|
-
@field_validator(
|
|
91
|
+
@field_validator( "price", "size", mode="before")
|
|
91
92
|
@classmethod
|
|
92
93
|
def validate_float(cls, v: str):
|
|
93
94
|
return float(v)
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8/poly_position_watcher.egg-info}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: poly-position-watcher
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.8
|
|
4
4
|
Summary: polymarket proxy wallet redeem
|
|
5
5
|
Home-page: https://github.com/tosmart01/polymarket-position-watcher
|
|
6
6
|
Author: pinbar
|
|
@@ -27,7 +27,13 @@ Dynamic: requires-python
|
|
|
27
27
|
|
|
28
28
|
## Overview
|
|
29
29
|
|
|
30
|
-
`poly-position-watcher`
|
|
30
|
+
`poly-position-watcher` is built for real trading on Polymarket, where order fills, trade updates, position sync, and sellable on-chain balance may not arrive at the same time.
|
|
31
|
+
|
|
32
|
+
In practice, `order filled`, `trade confirmed`, `position updated`, and `sellable on-chain` are different states. Strategy code that reacts to only one of them can easily overestimate inventory, mis-time hedges, or place exits before the position is actually ready.
|
|
33
|
+
|
|
34
|
+
This library acts as an execution reliability layer for Polymarket strategies. It helps you observe and reconcile these states in one place, so your strategy does not mistake "order filled" for "position synchronized" or "position visible" for "actually sellable".
|
|
35
|
+
|
|
36
|
+
Core capabilities:
|
|
31
37
|
|
|
32
38
|
- WSS real-time tracking for `TRADE` and `ORDER` (positions + orders)
|
|
33
39
|
- HTTP polling fallback for reliability
|
|
@@ -35,6 +41,11 @@ Dynamic: requires-python
|
|
|
35
41
|
- Position fields for fill checks:
|
|
36
42
|
`size` (post-fee net size), `original_size` (pre-fee net size), `sellable_size` (on-chain confirmed size), `fee_amount` (accumulated fee amount)
|
|
37
43
|
- Failed trades are detected and returned on positions (`has_failed`, `failed_trades`)
|
|
44
|
+
- Strategy-scoped position queries by `order_ids`:
|
|
45
|
+
`get_position_by_order_ids(...)` and `get_positions_by_order_ids(...)`
|
|
46
|
+
- Order-aware fill helpers:
|
|
47
|
+
`get_effective_position_size(...)`, `wait_for_orders_filled(...)`, `wait_for_orders_pos_filled(...)`
|
|
48
|
+
- HTTP fallback namespaces via `group=...`, so multiple callers can share one watcher without overwriting each other's monitored order/market sets
|
|
38
49
|
|
|
39
50
|
**Note: WSS disconnects are auto-detected and reconnected.**
|
|
40
51
|
|
|
File without changes
|
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/__init__.py
RENAMED
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/_version.py
RENAMED
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/api_worker.py
RENAMED
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/common/__init__.py
RENAMED
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/common/enums.py
RENAMED
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/common/logger.py
RENAMED
|
File without changes
|
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/schema/__init__.py
RENAMED
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/schema/base.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/poly_position_watcher/wss_worker.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{poly_position_watcher-0.3.7 → poly_position_watcher-0.3.8}/tests/test_http_fallback_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|