From f3e63ae3b93bf0ba2b9ed00a306330e2144a345c Mon Sep 17 00:00:00 2001 From: "paperclip-resolver[bot]" Date: Thu, 4 Jun 2026 11:32:44 -0400 Subject: [PATCH] feat(ev): add is_suspended/suspended_since to EVOpportunity Additive optional fields mirroring the sharp-api-go EV engine's flag-gated suspended-opportunity state (EV_SUSPENDED_STATE, sharp-api-go #789). When a live opp's sharp reference is momentarily suspended the server keeps the opp visible with is_suspended=true and ev_percentage hidden (never a stale edge); the opp retains its stable id and updates in-place on resume. Fields default to False/None and are absent from the wire unless the server flag is enabled, so this is fully backward-compatible (no version bump). Type: feat Co-Authored-By: Claude Opus 4.8 (1M context) --- src/sharpapi/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sharpapi/models.py b/src/sharpapi/models.py index 13abc6e..1bdb59a 100644 --- a/src/sharpapi/models.py +++ b/src/sharpapi/models.py @@ -302,6 +302,12 @@ class EVOpportunity(BaseModel): # Structured side/segment axes (issue #76 / #689), additive + optional. team_side: str | None = None market_segment: str | None = None + # Suspended-state (server flag EV_SUSPENDED_STATE), additive + optional. While the sharp + # reference is momentarily suspended the opp stays visible with is_suspended=True and the + # edge hidden (ev_percentage is 0 / unknown — never a stale edge); suspended_since is the + # unix-seconds timestamp the suspension began. Absent unless the server flag is enabled. + is_suspended: bool = False + suspended_since: float | None = None # Optional structured refs (additive, non-breaking). home: TeamRef | None = None away: TeamRef | None = None