Skip to content

Commit 3c8b087

Browse files
Mlaz-codepaperclip-resolver[bot]claude
authored
feat: add is_active to NormalizedOdds (SHA-3803) (#9)
Adds `is_active: boolean` to `NormalizedOdds`. `false` = market suspended/closed with the price frozen — mirrors OpticOdds `locked-odds`, exposed as a queryable field. Absent on the wire = `true`. Wire key is snake_case `is_active` (the client returns raw JSON without key transforms). Additive; bumps 0.3.2 → 0.4.0. tsc --noEmit + biome check clean. Consumer side: sharp-api-go #725. Refs SHA-3803. Type: feat 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: paperclip-resolver[bot] <3736210+paperclip-resolver[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 4aaebc8 commit 3c8b087

3 files changed

Lines changed: 24 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
All notable changes to `@sharp-api/client` are documented here.
44

5+
## 0.4.0 — 2026-05-31
6+
7+
### Added
8+
9+
- `NormalizedOdds.is_active` (boolean). `false` indicates the market is
10+
suspended/closed with the price frozen — mirrors OpticOdds `locked-odds` but
11+
as a queryable field. Absent on the wire is treated as `true`.
12+
- `'odds:locked'` `WebSocketEventType` — supplementary stream event carrying the
13+
suspended subset of a delta (1:1 with OpticOdds `locked-odds`). The rows also
14+
arrive in the normal odds update with `is_active: false`.
15+
16+
### Backward compatibility
17+
18+
- Additive optional field; existing code is unaffected.
19+
520
## 0.3.2 — 2026-05-07
621

722
### Changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sharp-api/client",
3-
"version": "0.3.2",
3+
"version": "0.4.0",
44
"description": "Official TypeScript/JavaScript client for the SharpAPI real-time sports betting odds API",
55
"type": "module",
66
"main": "./dist/index.cjs",

src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,13 @@ export interface NormalizedOdds extends NestedRefs {
306306
eventStartTime: string
307307
timestamp: string
308308
isLive: boolean
309+
/**
310+
* `true` (default) = market open and bettable; `false` = market
311+
* suspended/closed with the price frozen (mirrors OpticOdds `locked-odds`).
312+
* Absent on the wire is treated as `true`. Wire key is snake_case
313+
* `is_active` (the client returns raw JSON without key transforms). SHA-3803.
314+
*/
315+
is_active: boolean
309316
status: 'upcoming' | 'live' | 'ended'
310317
}
311318

@@ -990,6 +997,7 @@ export type WebSocketEventType =
990997
| 'initial'
991998
| 'snapshot_complete'
992999
| 'odds_update'
1000+
| 'odds:locked'
9931001
| 'ev:detected'
9941002
| 'ev:expired'
9951003
| 'arb:detected'

0 commit comments

Comments
 (0)