Skip to content

Commit 0c599b8

Browse files
docs(odds): document full selection_type enum + undocumented /odds fields
Resolves E1-E2 from rogervtay bug report (SHA-3428). Documents 8-value selection_type enum and undocumented /odds fields.
1 parent ad8dc9f commit 0c599b8

5 files changed

Lines changed: 257 additions & 6 deletions

File tree

content/de/api-reference/odds.mdx

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,19 +306,58 @@ X-Request-Id: req_abc123def456
306306
| `away_team` | string | Name der Auswärtsmannschaft |
307307
| `market_type` | string | `moneyline`, `spread`, `total`, `player_prop` usw. |
308308
| `selection` | string | Die Auswahl (Mannschaftsname, Over/Under, Spielername) |
309-
| `selection_type` | string | `home`, `away`, `over`, `under` |
309+
| `selection_type` | string | Kanonische Seiten-Kennung. Siehe [Selektionstypen](#selektionstypen) unten für die vollständige Aufzählung, einschließlich zusammengesetzter Formen (z. B. `home_over`), die auf Mehrachsen-Märkten emittiert werden. |
310+
| `team_side` | string\|undefined | Roher Team-Seiten-Hinweis aus dem Adapter — einer aus `home`, `away`, `draw`. Nützlich, wenn `selection_type` einen zusammengesetzten Wert (z. B. `home_over`) trägt und Sie nur die Team-Achse ohne Parsing möchten. Fehlt, wenn der Adapter ihn nicht gesetzt hat. |
310311
| `odds_american` | number | American Odds (z. B. -110, +150) |
311312
| `odds_decimal` | number | Dezimalquoten (z. B. 1.909) |
312313
| `odds_probability` | number | Implizite Wahrscheinlichkeit (z. B. 0.5238) |
313314
| `line` | number \| null | Spread- oder Total-Linienwert (`null` bei Moneyline) |
315+
| `is_alternate_line` | boolean\|undefined | `true`, wenn das `line` dieser Zeile von der kanonischen Hauptlinie für ihre `(event, market_type, player)`-Gruppe abweicht. Immer `false` für Märkte ohne Linie (Moneyline, Outright). Stabil auf [`/opportunities/ev`](/de/api-reference/opportunities-ev/) heute; Rollout auf `/odds`-Zeilen läuft. Verwenden Sie es, um Haupt- und Alternativlinien-Snapshots zu trennen. |
314316
| `event_start_time` | string | ISO 8601 Event-Startzeit |
315317
| `last_seen_at` | string | ISO 8601 Zeitstempel der letzten Beobachtung dieser Zeile durch unseren Adapter. Wird in jedem Ingest-Zyklus aktualisiert — dies ist das Pipeline-Frische-Signal. |
316318
| `odds_changed_at` | string | ISO 8601 Zeitstempel der quelleneigenen Aktualisierung des Sportwettenanbieters für diese Linie, sofern verfügbar. Bei Pinnacle wird er fortgeführt, solange Preis/Linie/`is_live`-Flag unverändert bleiben (siehe [Pinnacles `odds_changed_at` verstehen](/de/concepts/pinnacle-odds-changed-at/)). Verwenden Sie `last_seen_at` für die Pipeline-Frische. |
319+
| `wire_received_at` | string\|undefined | ISO 8601 Zeitstempel des Zeitpunkts, an dem sharp-api-go zuletzt eine Inhaltshash-Änderung für diese Zeile beobachtet hat — der Pipeline-Eingangsstempel. Unterschiedlich von `last_seen_at` (Adapter-Beobachtung) und `odds_changed_at` (quelleneigene Aktualisierung des Sportwettenanbieters). |
317320
| `is_live` | boolean | Ob das Event derzeit live läuft |
321+
| `event_uuid` | string\|undefined | Stabile kanonische Event-UUID aus dem SharpAPI-Atlas, sofern das Event gemappt ist. Während `event_id` die primäre Event-Kennung des Adapters trägt (oft die des ursprünglichen Sportwettenanbieters), ist `event_uuid` ein feed-stabiler Hash für Cross-Feed-Joins. Fehlt bei nicht gemappten Events. |
322+
| `external_event_id` | string\|undefined | Die native Event-ID des Sportwettenanbieters, sofern sie sich von `event_id` unterscheidet. Nützlich, um Zeilen in die UI oder API des Sportwettenanbieters zurückzuverknüpfen. |
323+
| `deep_link` | string\|undefined | Auflösungs-URL, die auf die Event- oder Wettschein-Seite des Sportwettenanbieters zeigt. Übergeben Sie `state=` (z. B. `state=nj`) in der Anfrage, um über staatsspezifische Subdomains zu routen, sofern die Buchmacher diese benötigen (BetMGM, Caesars, BetRivers). |
324+
| `market_id` | string\|undefined | Native Markt-Kennung des Sportwettenanbieters. Einige Buchmacher legen keine offen — fehlt, wenn unbekannt. |
325+
| `selection_id` | string\|undefined | Native Selektions-/Outcome-Kennung des Sportwettenanbieters. Einige Buchmacher legen keine offen — fehlt, wenn unbekannt. |
318326
| `player_name` | string\|undefined | Spielername (nur bei Player-Prop-Märkten) |
319327
| `stat_category` | string\|undefined | Statistikkategorie, z. B. `points`, `rebounds` (nur bei Player-Prop-Märkten) |
328+
| `home_pitcher` | string\|undefined | Nur MLB. Heim-Starter-Pitcher, sofern vom Buchmacher veröffentlicht. |
329+
| `away_pitcher` | string\|undefined | Nur MLB. Auswärts-Starter-Pitcher, sofern vom Buchmacher veröffentlicht. |
320330
| `public_bet_pct` | number\|undefined | Öffentlicher Wetttickets-Prozentsatz (0.0-1.0). Derzeit nur BetMGM. |
321331
| `max_bet` | number\|undefined | Maximaler Einsatzbetrag (USD) für diesen Markttyp. Derzeit nur Pinnacle. |
332+
| `volume` | number\|undefined | Gematchtes Volumen auf dieser Selektion. Nur Wettbörsen (Betfair, Novig, ProphetX, Polymarket). Einheiten folgen dem ursprünglichen Buchmacher (z. B. gematchter Einsatz bei Betfair, Aktien-Volumen bei Vorhersagemärkten). |
333+
| `volume_24h` | number\|undefined | Gematchtes Volumen der letzten 24 Stunden auf dieser Selektion. Nur Wettbörsen. |
334+
| `open_interest` | number\|undefined | Offenes Interesse (gematchter Einsatz / aktuell gehaltene Aktien) auf dieser Selektion. Nur Wettbörsen. |
335+
| `polymarket_resolution` | string\|undefined | Nur Polymarket. UMA Optimistic-Oracle-Resolutionsstatus, sobald der Markt beendet ist — einer aus `settled_normal`, `voided`, `disputed`, `proposed`, `unknown`. Fehlt bei laufenden Polymarket-Märkten und bei allen Nicht-Polymarket-Buchmachern. |
336+
337+
### Selektionstypen
338+
339+
`selection_type` trägt die kanonische Seiten-Kennung für jede `selection`. Die meisten Märkte sind zweiseitig (z. B. Moneyline, Point Spread, Total) und emittieren einen der einfachen Werte unten. Eine kleine Menge an Mehrachsen-Märkten (Fußball Doppelchance, BTTS-kombiniert, Ergebnis × O/U, MMA Round Betting, Tennis Set Betting, korrekter Endstand usw.) kodiert zwei Outcomes pro Selektion und emittiert **zusammengesetzte** Werte, die mit `_` verbunden sind.
340+
341+
| Familie | Werte | Wo sie erscheinen |
342+
|--------|--------|-------------------|
343+
| Zweiseitig (Team-Seite) | `home`, `away` | `moneyline`, `point_spread`, `puck_line`, `run_line`, `team_total`, `set_handicap`, die meisten Periodenmärkte |
344+
| Zweiseitig (Linien-Richtung) | `over`, `under` | `total_points`, `total_goals`, `total_runs`, `total_games`, `total_rounds`, `team_total`, alle `player_*_o_u`-Props |
345+
| Zweiseitig (Ja/Nein) | `yes`, `no` | `binary`, Prop-artige Ja/Nein-Märkte, Börsen-"Back/Lay"-Ausgänge, Polymarket-Vorhersagemärkte |
346+
| Zweiseitig (Parität) | `even`, `odd` | Total-Paritätsmärkte (z. B. Total-Punkte gerade/ungerade) |
347+
| Dreiseitig | `draw` | Dreiseitige Moneyline (Fußball 1X2), komplementäre Seite des Draw-No-Bet, "Kein Tor" bei `next_goal` |
348+
| Zusammengesetzt (Team × O/U) | `home_over`, `home_under`, `away_over`, `away_under` | Fußball `match_result_total_goals` ("Team A und Über N.5") und analoge Ergebnis-plus-Total-Märkte |
349+
| Zusammengesetzt (Team × BTTS) | `home_yes`, `home_no`, `away_yes`, `away_no`, `draw_yes`, `draw_no` | Fußball `match_result_both_teams_to_score` |
350+
| Zusammengesetzt (Doppelchance) | `home_draw`, `away_draw`, `home_away` | Fußball `double_chance` (1X / X2 / 12) und MMA-Doppelchance |
351+
| Zusammengesetzt (Runde / Methode) | `home_r1`, `home_r2`, `home_decision`, `away_r1` usw. | MMA `round_betting` und Method-of-Victory-Märkte |
352+
| Auffangwert | `other` | `game_prop`, "Kein Tor" bei `next_goal` und jede Selektion, bei der der kanonische Seiten-Mapper das Outcome nicht sauber zerlegen kann. Immer in geringem Volumen vorhanden; behandeln Sie ihn als opak. |
353+
354+
<Callout type="info">
355+
**Parsing zusammengesetzter Werte.** Zusammengesetzte `selection_type`-Strings verbinden die Team-Achse (`home` / `away` / `draw`) stets mit einem einzelnen Unterstrich mit der sekundären Achse. Um nur die Team-Achse ohne Parsing zu erhalten, lesen Sie [`team_side`](#schema-des-quoten-objekts) — es ist die rohe vom Adapter gesetzte Seite für dieselbe Zeile.
356+
</Callout>
357+
358+
<Callout type="warning">
359+
**Long-Tail-Märkte emittieren zusätzliche Formen.** Märkte wie `correct_score` (z. B. `"2_1"`), `set_betting` (z. B. `"0_2"`), `winning_margin`, `halftime_fulltime`, `first_goal` und `anytime_goal` kodieren Score-Level- oder zusammengesetzte Outcomes direkt in `selection_type`. Wenn Sie auf ein geschlossenes Enum angewiesen sind, filtern Sie auf die Familien oben und behandeln Sie jeden unbekannten Wert als opak — werfen Sie keinen Fehler.
360+
</Callout>
322361

323362
## Sortierung
324363

content/en/api-reference/odds.mdx

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,26 +308,65 @@ X-Request-Id: req_abc123def456
308308
| `away_team` | string | Away team name |
309309
| `market_type` | string | `moneyline`, `spread`, `total`, `player_prop`, etc. |
310310
| `selection` | string | The selection (team name, Over/Under, player name) |
311-
| `selection_type` | string | `home`, `away`, `over`, `under` |
311+
| `selection_type` | string | Canonical side identifier. See [Selection types](#selection-types) below for the full enum, including compound forms (e.g. `home_over`) emitted on multi-axis markets. |
312+
| `team_side` | string\|undefined | Raw team-side hint from the adapter — one of `home`, `away`, `draw`. Useful when `selection_type` carries a compound value (e.g. `home_over`) and you want just the team axis without parsing. Absent when the adapter did not stamp it. |
312313
| `odds_american` | number | American odds (e.g., -110, +150) |
313314
| `odds_decimal` | number | Decimal odds (e.g., 1.909) |
314315
| `odds_probability` | number | Implied probability (e.g., 0.5238) |
315316
| `line` | number \| null | Spread or total line value (`null` for moneyline) |
317+
| `is_alternate_line` | boolean\|undefined | `true` when this row's `line` differs from the canonical main line for its `(event, market_type, player)` group. Always `false` for markets with no line (moneyline, outright). Stable on [`/opportunities/ev`](/en/api-reference/opportunities-ev/) today; rolling out to `/odds` rows. Use to separate main-line and alt-line snapshots. |
316318
| `event_start_time` | string | ISO 8601 event start time |
317319
| `last_seen_at` | string | ISO 8601 timestamp of our adapter's last observation of this row. Updates every ingest cycle — this is the pipeline freshness signal. |
318320
| `odds_changed_at` | string | ISO 8601 timestamp of the sportsbook's own source update for this line, when available. On Pinnacle, carries forward while the price/line/`is_live` flag are unchanged (see [Understanding Pinnacle's `odds_changed_at`](/en/concepts/pinnacle-odds-changed-at/)). Use `last_seen_at` for pipeline freshness. |
321+
| `wire_received_at` | string\|undefined | ISO 8601 timestamp of when sharp-api-go last observed a content-hash change for this row — the pipeline-arrival stamp. Distinct from `last_seen_at` (adapter observation) and `odds_changed_at` (sportsbook's own source update). |
319322
| `is_live` | boolean | Whether the event is currently live |
323+
| `event_uuid` | string\|undefined | Stable canonical event UUID from the SharpAPI atlas, when the event is mapped. Where `event_id` carries the adapter's primary event identifier (often the originating sportsbook's), `event_uuid` is a feed-stable hash you can use for cross-feed joins. Absent for unmapped events. |
324+
| `external_event_id` | string\|undefined | The sportsbook's own native event ID, when distinct from `event_id`. Useful for round-tripping rows back to the sportsbook's UI or API. |
325+
| `deep_link` | string\|undefined | Resolver URL pointing to the sportsbook's event or bet-slip page. Pass `state=` (e.g. `state=nj`) on the request to route through state-specific subdomains for books that need them (BetMGM, Caesars, BetRivers). |
326+
| `market_id` | string\|undefined | The sportsbook's own native market identifier. Some books don't expose one — absent when unknown. |
327+
| `selection_id` | string\|undefined | The sportsbook's own native selection/outcome identifier. Some books don't expose one — absent when unknown. |
320328
| `player_name` | string\|undefined | Player name (player prop markets only) |
321329
| `stat_category` | string\|undefined | Stat category, e.g. `points`, `rebounds` (player prop markets only) |
330+
| `home_pitcher` | string\|undefined | MLB only. Home-team starting pitcher when published by the book. |
331+
| `away_pitcher` | string\|undefined | MLB only. Away-team starting pitcher when published by the book. |
322332
| `public_bet_pct` | number\|undefined | Public betting ticket percentage (0.0-1.0). Currently BetMGM only. |
323333
| `max_bet` | number\|undefined | Maximum wager amount (USD) for this market type. Currently Pinnacle only. |
334+
| `volume` | number\|undefined | Matched-volume on this selection. Exchange books only (Betfair, Novig, ProphetX, Polymarket). Units follow the originating book (e.g. matched stake for Betfair, share volume for prediction markets). |
335+
| `volume_24h` | number\|undefined | Trailing 24-hour matched volume on this selection. Exchange books only. |
336+
| `open_interest` | number\|undefined | Outstanding open interest (matched stake / shares currently held) on this selection. Exchange books only. |
337+
| `polymarket_resolution` | string\|undefined | Polymarket only. UMA optimistic-oracle resolution status when the market has terminated — one of `settled_normal`, `voided`, `disputed`, `proposed`, `unknown`. Absent for live (unresolved) Polymarket markets and for every non-Polymarket book. |
324338
| `home` | object\|undefined | **New (May 2026).** Nested home-team reference: `{id, numerical_id, name, abbreviation, logo, city, mascot, conference, division}`. See [Entity reference IDs](/en/concepts/entity-reference-ids/). |
325339
| `away` | object\|undefined | **New (May 2026).** Nested away-team reference: `{id, numerical_id, name, abbreviation, logo, city, mascot, conference, division}`. |
326340
| `sport_ref` | object\|undefined | **New (May 2026).** Nested sport reference: `{id, numerical_id, name}`. |
327341
| `league_ref` | object\|undefined | **New (May 2026).** Nested league reference: `{id, numerical_id, label}`. |
328342
| `market_ref` | object\|undefined | **New (May 2026).** Nested market reference: `{id, numerical_id, label}`. |
329343
| `sportsbook_ref` | object\|undefined | **New (May 2026).** Nested sportsbook reference: `{id, numerical_id, label}`. |
330344

345+
### Selection types
346+
347+
`selection_type` carries the canonical side identifier for each `selection`. Most markets are two-way (e.g. moneyline, point spread, total) and emit one of the simple values below. A small set of multi-axis markets (soccer double-chance, BTTS-combined, result × O/U, MMA round betting, tennis set betting, correct-score, etc.) encode two outcomes per selection and emit **compound** values joined by `_`.
348+
349+
| Family | Values | Where they appear |
350+
|--------|--------|-------------------|
351+
| Two-way (team side) | `home`, `away` | `moneyline`, `point_spread`, `puck_line`, `run_line`, `team_total`, `set_handicap`, most period markets |
352+
| Two-way (line direction) | `over`, `under` | `total_points`, `total_goals`, `total_runs`, `total_games`, `total_rounds`, `team_total`, all `player_*_o_u` props |
353+
| Two-way (yes/no) | `yes`, `no` | `binary`, prop-style yes/no markets, exchange "back/lay" outcomes, Polymarket prediction markets |
354+
| Two-way (parity) | `even`, `odd` | Total-parity markets (e.g. total points odd/even) |
355+
| Three-way | `draw` | Three-way moneyline (soccer 1X2), draw-no-bet's complementary side, `next_goal` "no goal" |
356+
| Compound (team × O/U) | `home_over`, `home_under`, `away_over`, `away_under` | Soccer `match_result_total_goals` ("Team A and Over N.5") and analogous result-plus-total markets |
357+
| Compound (team × BTTS) | `home_yes`, `home_no`, `away_yes`, `away_no`, `draw_yes`, `draw_no` | Soccer `match_result_both_teams_to_score` |
358+
| Compound (double chance) | `home_draw`, `away_draw`, `home_away` | Soccer `double_chance` (1X / X2 / 12) and MMA double-chance |
359+
| Compound (round / method) | `home_r1`, `home_r2`, `home_decision`, `away_r1`, etc. | MMA `round_betting` and method-of-victory markets |
360+
| Catch-all | `other` | `game_prop`, `next_goal` "no goal", and any selection where the canonical-side mapper cannot decompose the outcome cleanly. Always present in low volume; treat as opaque. |
361+
362+
<Callout type="info">
363+
**Parsing compound values.** Compound `selection_type` strings always join the team axis (`home` / `away` / `draw`) to the secondary axis with a single underscore. To recover just the team axis without parsing, read [`team_side`](#odds-object-schema) — it is the raw side stamped by the adapter for the same row.
364+
</Callout>
365+
366+
<Callout type="warning">
367+
**Long-tail markets emit additional forms.** Markets such as `correct_score` (e.g. `"2_1"`), `set_betting` (e.g. `"0_2"`), `winning_margin`, `halftime_fulltime`, `first_goal`, and `anytime_goal` encode score-level or compound outcomes directly in `selection_type`. If you depend on a closed enum, filter to the families above and treat any unrecognised value as opaque — do not error.
368+
</Callout>
369+
331370
### New (May 2026): nested reference blocks
332371

333372
Every odds row now carries six optional **nested reference objects** that bundle each entity's slug `id`, display label, and stable `numerical_id` directly with the row. The flat string fields (`sport`, `league`, `home_team`, `away_team`, `market_type`, `sportsbook`) remain unchanged — the new blocks are purely additive.

0 commit comments

Comments
 (0)