diff --git a/CHANGELOG.md b/CHANGELOG.md index bb31924..e93c2f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ 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`. +- `'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 + +- 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..8e09634 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' } @@ -990,6 +997,7 @@ export type WebSocketEventType = | 'initial' | 'snapshot_complete' | 'odds_update' + | 'odds:locked' | 'ev:detected' | 'ev:expired' | 'arb:detected'