sharpapi 0.3.3__tar.gz → 0.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sharpapi-0.3.3 → sharpapi-0.4.1}/CHANGELOG.md +35 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/PKG-INFO +1 -1
- {sharpapi-0.3.3 → sharpapi-0.4.1}/pyproject.toml +1 -1
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/__init__.py +1 -1
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/models.py +21 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/.gitignore +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/LICENSE +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/README.md +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/SECURITY.md +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/_base.py +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/_utils.py +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/async_client.py +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/client.py +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/exceptions.py +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/py.typed +0 -0
- {sharpapi-0.3.3 → sharpapi-0.4.1}/src/sharpapi/streaming.py +0 -0
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the `sharpapi` Python SDK are documented here.
|
|
4
4
|
|
|
5
|
+
## 0.4.1 — 2026-06-02
|
|
6
|
+
|
|
7
|
+
### Added — structured `team_side` + `market_segment` (issue #76 / #689)
|
|
8
|
+
|
|
9
|
+
- `OddsLine`, `EVOpportunity`, and `ClosingOddsLine` gain two optional fields:
|
|
10
|
+
- `team_side` — the raw structured side (`"home"` | `"away"` | `"draw"`)
|
|
11
|
+
decomposed out of the compound `selection_type` vocabulary. Prefer this over
|
|
12
|
+
parsing compound prefixes like `"home_over"`.
|
|
13
|
+
- `market_segment` — the canonical contest slice (`"full_game"`, `"1st_half"`,
|
|
14
|
+
`"1st_5_innings"`, ...).
|
|
15
|
+
- Both are additive and default to `None`; existing code is unaffected. The API
|
|
16
|
+
continues to emit the compound `selection_type` for back-compat.
|
|
17
|
+
|
|
18
|
+
## 0.4.0 — 2026-06-02
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- `OddsLine.timestamp` / `ArbitrageLeg.timestamp` documented as the **delivery /
|
|
23
|
+
last-refreshed** feed-freshness timestamp (advances every ingest cycle),
|
|
24
|
+
matching OpticOdds' `timestamp` — NOT a price-last-changed time. The API now
|
|
25
|
+
populates this field (previously always `null`). The removed
|
|
26
|
+
`odds_changed_at` / `last_seen_at` / `wire_received_at` were never modeled by
|
|
27
|
+
this SDK, so no model change is needed. (SHA-1048)
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
|
|
31
|
+
- `OddsLine.is_active` (bool, default `True`). `False` indicates the market is
|
|
32
|
+
suspended/closed with the price frozen — mirrors OpticOdds `locked-odds` but
|
|
33
|
+
as a queryable field. Absent on the wire is treated as `True`.
|
|
34
|
+
|
|
35
|
+
### Backward compatibility
|
|
36
|
+
|
|
37
|
+
- Additive optional field with a `True` default — existing code is unaffected,
|
|
38
|
+
and older API servers that omit the key parse as active.
|
|
39
|
+
|
|
5
40
|
## 0.3.2 — 2026-05-07
|
|
6
41
|
|
|
7
42
|
### Changed
|
|
@@ -214,13 +214,26 @@ class OddsLine(BaseModel):
|
|
|
214
214
|
market_type: str
|
|
215
215
|
selection: str
|
|
216
216
|
selection_type: str | None = None
|
|
217
|
+
# Structured side/segment axes (issue #76 / #689). team_side is the raw
|
|
218
|
+
# "home"|"away"|"draw" decomposed out of the compound selection_type vocab;
|
|
219
|
+
# market_segment is the contest slice ("full_game", "1st_half", ...). Both
|
|
220
|
+
# optional + additive — absent on rows the adapter didn't stamp.
|
|
221
|
+
team_side: str | None = None
|
|
222
|
+
market_segment: str | None = None
|
|
217
223
|
odds_american: int | float
|
|
218
224
|
odds_decimal: float
|
|
219
225
|
probability: float
|
|
220
226
|
line: float | None = None
|
|
221
227
|
event_start_time: str | None = None
|
|
228
|
+
# ISO 8601 — when SharpAPI last refreshed this odd through its pipeline
|
|
229
|
+
# (advances every ingest cycle). A feed-freshness / delivery signal matching
|
|
230
|
+
# OpticOdds' `timestamp`; NOT a price-last-changed time. (SHA-1048)
|
|
222
231
|
timestamp: str | None = None
|
|
223
232
|
is_live: bool = False
|
|
233
|
+
# True (default) = market open and bettable; False = market suspended/closed
|
|
234
|
+
# with the price frozen (mirrors OpticOdds locked-odds). Absent on the wire
|
|
235
|
+
# is treated as True. SHA-3803.
|
|
236
|
+
is_active: bool = True
|
|
224
237
|
deep_link: str | None = None
|
|
225
238
|
player_name: str | None = None
|
|
226
239
|
stat_category: str | None = None
|
|
@@ -286,6 +299,9 @@ class EVOpportunity(BaseModel):
|
|
|
286
299
|
detected_at: str | None = None
|
|
287
300
|
external_event_id: str | None = None
|
|
288
301
|
selection_id: str | None = None
|
|
302
|
+
# Structured side/segment axes (issue #76 / #689), additive + optional.
|
|
303
|
+
team_side: str | None = None
|
|
304
|
+
market_segment: str | None = None
|
|
289
305
|
# Optional structured refs (additive, non-breaking).
|
|
290
306
|
home: TeamRef | None = None
|
|
291
307
|
away: TeamRef | None = None
|
|
@@ -311,6 +327,8 @@ class ArbitrageLeg(BaseModel):
|
|
|
311
327
|
odds_decimal: float
|
|
312
328
|
implied_probability: float | None = None
|
|
313
329
|
stake_percent: float
|
|
330
|
+
# ISO 8601 last-refreshed (feed-freshness) timestamp for this leg's odd —
|
|
331
|
+
# see OddsLine.timestamp. (SHA-1048)
|
|
314
332
|
timestamp: str | None = None
|
|
315
333
|
external_event_id: str | None = None
|
|
316
334
|
selection_id: str | None = None
|
|
@@ -563,6 +581,9 @@ class ClosingOddsLine(BaseModel):
|
|
|
563
581
|
market_type: str
|
|
564
582
|
selection: str
|
|
565
583
|
selection_type: str | None = None
|
|
584
|
+
# Structured side/segment axes (issue #76 / #689), additive + optional.
|
|
585
|
+
team_side: str | None = None
|
|
586
|
+
market_segment: str | None = None
|
|
566
587
|
odds_american: int | float
|
|
567
588
|
odds_decimal: float
|
|
568
589
|
line: float | None = None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|