Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to the `sharpapi` Python SDK are documented here.

## 0.4.1 — 2026-06-02

### Added — structured `team_side` + `market_segment` (issue #76 / #689)

- `OddsLine`, `EVOpportunity`, and `ClosingOddsLine` gain two optional fields:
- `team_side` — the raw structured side (`"home"` | `"away"` | `"draw"`)
decomposed out of the compound `selection_type` vocabulary. Prefer this over
parsing compound prefixes like `"home_over"`.
- `market_segment` — the canonical contest slice (`"full_game"`, `"1st_half"`,
`"1st_5_innings"`, ...).
- Both are additive and default to `None`; existing code is unaffected. The API
continues to emit the compound `selection_type` for back-compat.

## 0.4.0 — 2026-06-02

### Changed
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "sharpapi"
version = "0.4.0"
version = "0.4.1"
description = "Official Python SDK for the SharpAPI real-time sports betting odds API"
readme = "README.md"
license = "MIT"
Expand Down
12 changes: 12 additions & 0 deletions src/sharpapi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ class OddsLine(BaseModel):
market_type: str
selection: str
selection_type: str | None = None
# Structured side/segment axes (issue #76 / #689). team_side is the raw
# "home"|"away"|"draw" decomposed out of the compound selection_type vocab;
# market_segment is the contest slice ("full_game", "1st_half", ...). Both
# optional + additive — absent on rows the adapter didn't stamp.
team_side: str | None = None
market_segment: str | None = None
odds_american: int | float
odds_decimal: float
probability: float
Expand Down Expand Up @@ -293,6 +299,9 @@ class EVOpportunity(BaseModel):
detected_at: str | None = None
external_event_id: str | None = None
selection_id: str | None = None
# Structured side/segment axes (issue #76 / #689), additive + optional.
team_side: str | None = None
market_segment: str | None = None
# Optional structured refs (additive, non-breaking).
home: TeamRef | None = None
away: TeamRef | None = None
Expand Down Expand Up @@ -572,6 +581,9 @@ class ClosingOddsLine(BaseModel):
market_type: str
selection: str
selection_type: str | None = None
# Structured side/segment axes (issue #76 / #689), additive + optional.
team_side: str | None = None
market_segment: str | None = None
odds_american: int | float
odds_decimal: float
line: float | None = None
Expand Down