All notable changes to @sharp-api/client are documented here.
NormalizedOdds,EVOpportunity, andClosingOddgain optionalteam_side('home' | 'away' | 'draw' | 'over' | 'under') andmarket_segment(string). Wire keys are snake_case (the client returns raw JSON without key transforms), matchingis_active.team_sideis the raw structured side decomposed out of the compoundselectionType/selection_typevocabulary — prefer it over parsing compound prefixes like'home_over'.market_segmentis the canonical contest slice.NormalizedOdds.selectionTypewidened with(string & {})so it accepts the team-total compound forms ('home_over', ...) the server emits without a major bump. Additive, non-breaking.
NormalizedOdds.timestampdocumented as the delivery / last-refreshed feed-freshness timestamp (advances every ingest cycle), matching OpticOdds'timestamp— NOT a price-last-changed time. The API now populates this field (previously alwaysnull). The removedodds_changed_at/last_seen_at/wire_received_atwere never modeled by this SDK, so no type change is needed. (SHA-1048)
NormalizedOdds.is_active(boolean).falseindicates the market is suspended/closed with the price frozen — mirrors OpticOddslocked-oddsbut as a queryable field. Absent on the wire is treated astrue.'odds:locked'WebSocketEventType— supplementary stream event carrying the suspended subset of a delta (1:1 with OpticOddslocked-odds). The rows also arrive in the normal odds update withis_active: false.
- Additive optional field; existing code is unaffected.
- Update
repository.urlandbugsURLs inpackage.jsonto use the canonicalSharpAPI-TSrepo name (was lowercasesharpapi-ts, redirected by GitHub but worth making canonical on npm). Metadata-only release; no code changes.
TeamRef (and the Team reference-endpoint shape) gain five additional
optional fields:
logo— full CDN URL. ~93% coverage.city— e.g."Arizona"for the Diamondbacks.mascot— e.g."Diamondbacks".conference— e.g."NL","AFC","Western".division— e.g."West Division","NL East","Pacific Division".
All five default to undefined and are additive — older servers omit
them and 0.3.0 client code keeps working unchanged.
Every odds row, opportunity row, and reference-list row may now carry
optional structured reference objects alongside the existing flat fields.
All new fields are optional and additive — clients on older API
versions (or talking to older API servers) see undefined and behave
identically.
New interfaces:
TeamRef—{ id?, numerical_id?, name?, abbreviation? }(latter only on team-sport competitors)SportRef—{ id?, name?, numerical_id? }EntityRef—{ id?, label?, numerical_id? }(used for league / market / sportsbook refs)NestedRefs— bundle (home,away,sport_ref,league_ref,market_ref,sportsbook_ref) extended onto row-shaped typesMarket—{ market_type, market_label?, ..., numerical_id? }for the/marketsreference endpointTeam—{ id, name?, sport?, league?, abbreviation?, numerical_id? }for the/teamsreference endpoint
Existing types now extend NestedRefs:
NormalizedOdds,EVOpportunity,ArbitrageOpportunity,MiddleOpportunityEventextends a subset (home,away,sport_ref,league_ref— no per-book / per-market refs on the event row itself)
New optional fields on existing types:
ArbitrageLeg—sportsbook_ref?: EntityRefClosingOdd—market_ref?: EntityRef,sportsbook_ref?: EntityRefClosingSnapshot—home?,away?,sport_ref?,league_ref?Sport,League,Sportsbook—numerical_id?: number
New typed shape:
LowHoldOpportunity— was previously untyped. Now a typed interface so nested refs surface alongside the flat fields.
No existing field was renamed, retyped, or removed. Code that does not reference the new properties continues to compile without changes.