From c1bece0b3b85040bb17b509bc8b48db140b3c71e Mon Sep 17 00:00:00 2001 From: "paperclip-resolver[bot]" <3736210+paperclip-resolver[bot]@users.noreply.github.com> Date: Sun, 31 May 2026 08:18:34 -0400 Subject: [PATCH 1/2] feat: add is_active field to NormalizedOdds (SHA-3803) `false` = market suspended/closed with the price frozen (mirrors OpticOdds locked-odds, exposed as a queryable field). Absent on the wire = `true`. Additive; bumps 0.3.2 -> 0.4.0. Type: feat Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- src/index.ts | 7 +++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb31924..d2f5840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to `@sharp-api/client` are documented here. +## 0.4.0 — 2026-05-31 + +### Added + +- `NormalizedOdds.is_active` (boolean). `false` indicates the market is + suspended/closed with the price frozen — mirrors OpticOdds `locked-odds` but + as a queryable field. Absent on the wire is treated as `true`. + +### Backward compatibility + +- Additive optional field; existing code is unaffected. + ## 0.3.2 — 2026-05-07 ### Changed diff --git a/package.json b/package.json index 83cca69..dd6a09b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sharp-api/client", - "version": "0.3.2", + "version": "0.4.0", "description": "Official TypeScript/JavaScript client for the SharpAPI real-time sports betting odds API", "type": "module", "main": "./dist/index.cjs", diff --git a/src/index.ts b/src/index.ts index 56a8e2c..cca4489 100644 --- a/src/index.ts +++ b/src/index.ts @@ -306,6 +306,13 @@ export interface NormalizedOdds extends NestedRefs { eventStartTime: string timestamp: string isLive: boolean + /** + * `true` (default) = market open and bettable; `false` = market + * suspended/closed with the price frozen (mirrors OpticOdds `locked-odds`). + * Absent on the wire is treated as `true`. Wire key is snake_case + * `is_active` (the client returns raw JSON without key transforms). SHA-3803. + */ + is_active: boolean status: 'upcoming' | 'live' | 'ended' } From e2f0e6dc60a346ffc23de4af2a4be12d8de600a3 Mon Sep 17 00:00:00 2001 From: "paperclip-resolver[bot]" <3736210+paperclip-resolver[bot]@users.noreply.github.com> Date: Sun, 31 May 2026 08:40:33 -0400 Subject: [PATCH 2/2] feat: add odds:locked WebSocketEventType (SHA-3803) Supplementary stream event carrying the suspended subset of a delta (1:1 with OpticOdds locked-odds). Rows also arrive in the normal odds update with is_active=false. Pairs with sharp-api-go #725. Type: feat Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 3 +++ src/index.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2f5840..e93c2f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ All notable changes to `@sharp-api/client` are documented here. - `NormalizedOdds.is_active` (boolean). `false` indicates the market is suspended/closed with the price frozen — mirrors OpticOdds `locked-odds` but as a queryable field. Absent on the wire is treated as `true`. +- `'odds:locked'` `WebSocketEventType` — supplementary stream event carrying the + suspended subset of a delta (1:1 with OpticOdds `locked-odds`). The rows also + arrive in the normal odds update with `is_active: false`. ### Backward compatibility diff --git a/src/index.ts b/src/index.ts index cca4489..8e09634 100644 --- a/src/index.ts +++ b/src/index.ts @@ -997,6 +997,7 @@ export type WebSocketEventType = | 'initial' | 'snapshot_complete' | 'odds_update' + | 'odds:locked' | 'ev:detected' | 'ev:expired' | 'arb:detected'