Skip to content

Commit 69105cb

Browse files
Mlaz-codepaperclip-resolver[bot]claude
authored
feat(ev): add is_suspended/suspended_since to EVOpportunity (#13)
## What Adds two additive, optional fields to the `EVOpportunity` interface: - `is_suspended?: boolean` — true while a live opp's sharp reference is momentarily suspended - `suspended_since?: number` — 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** (never a stale EV%), instead of dropping it and re-adding on resume — eliminating live EV flicker. SDK consumers need the field to render the suspended state (greyed / EV hidden) and to keep the row in place across resume. ## Safety / compatibility - Purely **additive optional** fields — mirrors the `team_side`/`market_segment` precedent (snake_case wire keys, passthrough). - **Inert until the server flag flips:** the fields are absent from the wire unless `EV_SUSPENDED_STATE=1` on the API. Today (flag off) the wire is byte-identical, so this is fully backward-compatible. No version bump. - `typecheck` + `build` 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 6315e50 commit 69105cb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,15 @@ export interface EVOpportunity extends NestedRefs {
351351
team_side?: 'home' | 'away' | 'draw' | 'over' | 'under'
352352
/** Canonical contest slice ("full_game" | "1st_half" | ...) — issue #689. Wire key snake_case. */
353353
market_segment?: string
354+
/**
355+
* True while this live opp's sharp reference is momentarily suspended: the bet is still
356+
* offered but the edge is hidden (never a stale EV%). The opp keeps its stable `id`, so it
357+
* updates in-place on resume instead of flickering. Wire key snake_case `is_suspended`.
358+
* Optional/additive — only present when the server flag `EV_SUSPENDED_STATE` is enabled.
359+
*/
360+
is_suspended?: boolean
361+
/** Unix seconds when the suspension began; present only when `is_suspended` is true. Wire key snake_case. */
362+
suspended_since?: number
354363
detectedAt: string
355364
}
356365

0 commit comments

Comments
 (0)