Skip to content

Commit deccf47

Browse files
Mlaz-codepaperclip-resolver[bot]claude
authored
feat(ev): add is_suspended/suspended_since to EVOpportunity (#14)
## What Adds two additive, optional fields to the `EVOpportunity` pydantic model: - `is_suspended: bool = False` — true while a live opp's sharp reference is momentarily suspended - `suspended_since: float | None = None` — unix seconds the suspension began (present only when suspended) ## Why Mirrors the server-side flag-gated suspended-opportunity state shipped in **sharp-api-go #789** (`EV_SUSPENDED_STATE`). When Pinnacle (the sharp ref) suspends a live market, the engine now keeps the opp **visible-but-suspended** with the same stable `id` and the **edge hidden** (`ev_percentage` 0 / unknown — never a stale edge), instead of dropping it and re-adding on resume — eliminating live EV flicker. SDK consumers need the field to render the suspended state and to keep the row in place across resume. ## Safety / compatibility - Purely **additive optional** fields with safe defaults (`False` / `None`) — mirrors the `team_side`/`market_segment` precedent. - **Inert until the server flag flips:** absent from the wire unless `EV_SUSPENDED_STATE=1` on the API. Today (flag off) the wire is byte-identical, so fully backward-compatible. No version bump. - `py_compile` + a pydantic round-trip (suspended payload **and** flag-off default shape) pass. Type: feat Co-authored-by: paperclip-resolver[bot] <paperclip-resolver[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 31ba1c1 commit deccf47

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/sharpapi/models.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,12 @@ class EVOpportunity(BaseModel):
302302
# Structured side/segment axes (issue #76 / #689), additive + optional.
303303
team_side: str | None = None
304304
market_segment: str | None = None
305+
# Suspended-state (server flag EV_SUSPENDED_STATE), additive + optional. While the sharp
306+
# reference is momentarily suspended the opp stays visible with is_suspended=True and the
307+
# edge hidden (ev_percentage is 0 / unknown — never a stale edge); suspended_since is the
308+
# unix-seconds timestamp the suspension began. Absent unless the server flag is enabled.
309+
is_suspended: bool = False
310+
suspended_since: float | None = None
305311
# Optional structured refs (additive, non-breaking).
306312
home: TeamRef | None = None
307313
away: TeamRef | None = None

0 commit comments

Comments
 (0)