From b2a361bcdb1cf55c0b4560f9156ff344d6898a10 Mon Sep 17 00:00:00 2001 From: "paperclip-resolver[bot]" <3736210+paperclip-resolver[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 23:38:59 -0400 Subject: [PATCH] docs(odds): document full selection_type enum + undocumented /odds fields MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reconcile the published /odds schema with what the Go API actually emits. Customer rogervtay (Pro tier, Crisp session_c8594804) flagged this in the SHA-3428 6-category bug report; tracking issue SHA-3434. E1 — selection_type previously listed only `home`, `away`, `over`, `under`. Real wire values also include `yes`, `no`, `even`, `odd`, `draw`, `other` plus compound forms emitted by multi-axis markets (team × O/U, team × BTTS, double-chance, MMA round/method, etc.). Added a `### Selection types` subsection in all four locales and a 23-value `enum` on the openapi.json `Odds` schema; both make clear that long-tail compounds (correct_score "2_1", set_betting, etc.) also pass through and should be treated as opaque rather than rejected. E2 — added schema rows + openapi properties for all nine fields the customer reported as undocumented but emitted: `event_uuid`, `team_side`, `market_id`, `selection_id`, `external_event_id`, `wire_received_at`, `deep_link`, `volume`, `volume_24h`, `open_interest`, `is_alternate_line` (documented as stable per the SHA-3431 B1 fix wiring), `home_pitcher`, `away_pitcher`, `polymarket_resolution`. Verified by reading the `Odds` struct in sharp-api-go (main.go:603–664) and against a live /api/v1/odds Polymarket sample. Typecheck + Nextra build + check-links (340/340 internal) pass. Fixes SHA-3434 --- content/de/api-reference/odds.mdx | 41 +++++++++++- content/en/api-reference/odds.mdx | 41 +++++++++++- content/es/api-reference/odds.mdx | 41 +++++++++++- content/pt-BR/api-reference/odds.mdx | 41 +++++++++++- public/openapi.json | 99 +++++++++++++++++++++++++++- 5 files changed, 257 insertions(+), 6 deletions(-) diff --git a/content/de/api-reference/odds.mdx b/content/de/api-reference/odds.mdx index ca37cd5..9adeead 100644 --- a/content/de/api-reference/odds.mdx +++ b/content/de/api-reference/odds.mdx @@ -306,19 +306,58 @@ X-Request-Id: req_abc123def456 | `away_team` | string | Name der Auswärtsmannschaft | | `market_type` | string | `moneyline`, `spread`, `total`, `player_prop` usw. | | `selection` | string | Die Auswahl (Mannschaftsname, Over/Under, Spielername) | -| `selection_type` | string | `home`, `away`, `over`, `under` | +| `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. | +| `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. | | `odds_american` | number | American Odds (z. B. -110, +150) | | `odds_decimal` | number | Dezimalquoten (z. B. 1.909) | | `odds_probability` | number | Implizite Wahrscheinlichkeit (z. B. 0.5238) | | `line` | number \| null | Spread- oder Total-Linienwert (`null` bei Moneyline) | +| `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. | | `event_start_time` | string | ISO 8601 Event-Startzeit | | `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. | | `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. | +| `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). | | `is_live` | boolean | Ob das Event derzeit live läuft | +| `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. | +| `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. | +| `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). | +| `market_id` | string\|undefined | Native Markt-Kennung des Sportwettenanbieters. Einige Buchmacher legen keine offen — fehlt, wenn unbekannt. | +| `selection_id` | string\|undefined | Native Selektions-/Outcome-Kennung des Sportwettenanbieters. Einige Buchmacher legen keine offen — fehlt, wenn unbekannt. | | `player_name` | string\|undefined | Spielername (nur bei Player-Prop-Märkten) | | `stat_category` | string\|undefined | Statistikkategorie, z. B. `points`, `rebounds` (nur bei Player-Prop-Märkten) | +| `home_pitcher` | string\|undefined | Nur MLB. Heim-Starter-Pitcher, sofern vom Buchmacher veröffentlicht. | +| `away_pitcher` | string\|undefined | Nur MLB. Auswärts-Starter-Pitcher, sofern vom Buchmacher veröffentlicht. | | `public_bet_pct` | number\|undefined | Öffentlicher Wetttickets-Prozentsatz (0.0-1.0). Derzeit nur BetMGM. | | `max_bet` | number\|undefined | Maximaler Einsatzbetrag (USD) für diesen Markttyp. Derzeit nur Pinnacle. | +| `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). | +| `volume_24h` | number\|undefined | Gematchtes Volumen der letzten 24 Stunden auf dieser Selektion. Nur Wettbörsen. | +| `open_interest` | number\|undefined | Offenes Interesse (gematchter Einsatz / aktuell gehaltene Aktien) auf dieser Selektion. Nur Wettbörsen. | +| `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. | + +### Selektionstypen + +`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. + +| Familie | Werte | Wo sie erscheinen | +|--------|--------|-------------------| +| Zweiseitig (Team-Seite) | `home`, `away` | `moneyline`, `point_spread`, `puck_line`, `run_line`, `team_total`, `set_handicap`, die meisten Periodenmärkte | +| Zweiseitig (Linien-Richtung) | `over`, `under` | `total_points`, `total_goals`, `total_runs`, `total_games`, `total_rounds`, `team_total`, alle `player_*_o_u`-Props | +| Zweiseitig (Ja/Nein) | `yes`, `no` | `binary`, Prop-artige Ja/Nein-Märkte, Börsen-"Back/Lay"-Ausgänge, Polymarket-Vorhersagemärkte | +| Zweiseitig (Parität) | `even`, `odd` | Total-Paritätsmärkte (z. B. Total-Punkte gerade/ungerade) | +| Dreiseitig | `draw` | Dreiseitige Moneyline (Fußball 1X2), komplementäre Seite des Draw-No-Bet, "Kein Tor" bei `next_goal` | +| 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 | +| Zusammengesetzt (Team × BTTS) | `home_yes`, `home_no`, `away_yes`, `away_no`, `draw_yes`, `draw_no` | Fußball `match_result_both_teams_to_score` | +| Zusammengesetzt (Doppelchance) | `home_draw`, `away_draw`, `home_away` | Fußball `double_chance` (1X / X2 / 12) und MMA-Doppelchance | +| Zusammengesetzt (Runde / Methode) | `home_r1`, `home_r2`, `home_decision`, `away_r1` usw. | MMA `round_betting` und Method-of-Victory-Märkte | +| 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. | + + +**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. + + + +**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. + ## Sortierung diff --git a/content/en/api-reference/odds.mdx b/content/en/api-reference/odds.mdx index addf8aa..adcc1fe 100644 --- a/content/en/api-reference/odds.mdx +++ b/content/en/api-reference/odds.mdx @@ -308,19 +308,33 @@ X-Request-Id: req_abc123def456 | `away_team` | string | Away team name | | `market_type` | string | `moneyline`, `spread`, `total`, `player_prop`, etc. | | `selection` | string | The selection (team name, Over/Under, player name) | -| `selection_type` | string | `home`, `away`, `over`, `under` | +| `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. | +| `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. | | `odds_american` | number | American odds (e.g., -110, +150) | | `odds_decimal` | number | Decimal odds (e.g., 1.909) | | `odds_probability` | number | Implied probability (e.g., 0.5238) | | `line` | number \| null | Spread or total line value (`null` for moneyline) | +| `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. | | `event_start_time` | string | ISO 8601 event start time | | `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. | | `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. | +| `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). | | `is_live` | boolean | Whether the event is currently live | +| `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. | +| `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. | +| `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). | +| `market_id` | string\|undefined | The sportsbook's own native market identifier. Some books don't expose one — absent when unknown. | +| `selection_id` | string\|undefined | The sportsbook's own native selection/outcome identifier. Some books don't expose one — absent when unknown. | | `player_name` | string\|undefined | Player name (player prop markets only) | | `stat_category` | string\|undefined | Stat category, e.g. `points`, `rebounds` (player prop markets only) | +| `home_pitcher` | string\|undefined | MLB only. Home-team starting pitcher when published by the book. | +| `away_pitcher` | string\|undefined | MLB only. Away-team starting pitcher when published by the book. | | `public_bet_pct` | number\|undefined | Public betting ticket percentage (0.0-1.0). Currently BetMGM only. | | `max_bet` | number\|undefined | Maximum wager amount (USD) for this market type. Currently Pinnacle only. | +| `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). | +| `volume_24h` | number\|undefined | Trailing 24-hour matched volume on this selection. Exchange books only. | +| `open_interest` | number\|undefined | Outstanding open interest (matched stake / shares currently held) on this selection. Exchange books only. | +| `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. | | `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/). | | `away` | object\|undefined | **New (May 2026).** Nested away-team reference: `{id, numerical_id, name, abbreviation, logo, city, mascot, conference, division}`. | | `sport_ref` | object\|undefined | **New (May 2026).** Nested sport reference: `{id, numerical_id, name}`. | @@ -328,6 +342,31 @@ X-Request-Id: req_abc123def456 | `market_ref` | object\|undefined | **New (May 2026).** Nested market reference: `{id, numerical_id, label}`. | | `sportsbook_ref` | object\|undefined | **New (May 2026).** Nested sportsbook reference: `{id, numerical_id, label}`. | +### Selection types + +`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 `_`. + +| Family | Values | Where they appear | +|--------|--------|-------------------| +| Two-way (team side) | `home`, `away` | `moneyline`, `point_spread`, `puck_line`, `run_line`, `team_total`, `set_handicap`, most period markets | +| Two-way (line direction) | `over`, `under` | `total_points`, `total_goals`, `total_runs`, `total_games`, `total_rounds`, `team_total`, all `player_*_o_u` props | +| Two-way (yes/no) | `yes`, `no` | `binary`, prop-style yes/no markets, exchange "back/lay" outcomes, Polymarket prediction markets | +| Two-way (parity) | `even`, `odd` | Total-parity markets (e.g. total points odd/even) | +| Three-way | `draw` | Three-way moneyline (soccer 1X2), draw-no-bet's complementary side, `next_goal` "no goal" | +| 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 | +| Compound (team × BTTS) | `home_yes`, `home_no`, `away_yes`, `away_no`, `draw_yes`, `draw_no` | Soccer `match_result_both_teams_to_score` | +| Compound (double chance) | `home_draw`, `away_draw`, `home_away` | Soccer `double_chance` (1X / X2 / 12) and MMA double-chance | +| Compound (round / method) | `home_r1`, `home_r2`, `home_decision`, `away_r1`, etc. | MMA `round_betting` and method-of-victory markets | +| 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. | + + +**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. + + + +**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. + + ### New (May 2026): nested reference blocks 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. diff --git a/content/es/api-reference/odds.mdx b/content/es/api-reference/odds.mdx index 0a2e7af..3e7f742 100644 --- a/content/es/api-reference/odds.mdx +++ b/content/es/api-reference/odds.mdx @@ -306,19 +306,58 @@ X-Request-Id: req_abc123def456 | `away_team` | string | Nombre del equipo visitante | | `market_type` | string | `moneyline`, `spread`, `total`, `player_prop`, etc. | | `selection` | string | La selección (nombre del equipo, Over/Under, nombre del jugador) | -| `selection_type` | string | `home`, `away`, `over`, `under` | +| `selection_type` | string | Identificador canónico del lado. Consulta [Tipos de selección](#tipos-de-selección) más abajo para el enum completo, incluyendo formas compuestas (p. ej. `home_over`) que se emiten en mercados multieje. | +| `team_side` | string\|undefined | Pista de lado del equipo en bruto desde el adaptador — uno de `home`, `away`, `draw`. Útil cuando `selection_type` lleva un valor compuesto (p. ej. `home_over`) y solo necesitas el eje de equipo sin tener que parsear. Ausente cuando el adaptador no lo selló. | | `odds_american` | number | Cuotas americanas (p. ej., -110, +150) | | `odds_decimal` | number | Cuotas decimales (p. ej., 1.909) | | `odds_probability` | number | Probabilidad implícita (p. ej., 0.5238) | | `line` | number \| null | Valor de la línea de spread o total (`null` para moneyline) | +| `is_alternate_line` | boolean\|undefined | `true` cuando el `line` de esta fila difiere de la línea principal canónica para su grupo `(event, market_type, player)`. Siempre `false` para mercados sin línea (moneyline, outright). Estable en [`/opportunities/ev`](/es/api-reference/opportunities-ev/) hoy; en despliegue progresivo a las filas de `/odds`. Úsalo para separar instantáneas de línea principal y líneas alternativas. | | `event_start_time` | string | Hora de inicio del evento en ISO 8601 | | `last_seen_at` | string | Marca de tiempo ISO 8601 de la última observación de esta fila por nuestro adaptador. Se actualiza en cada ciclo de ingesta — esta es la señal de frescura del pipeline. | | `odds_changed_at` | string | Marca de tiempo ISO 8601 de la propia actualización en origen de la casa de apuestas para esta línea, cuando esté disponible. En Pinnacle, se mantiene mientras el precio/línea/flag `is_live` no cambien (consulta [Entendiendo el `odds_changed_at` de Pinnacle](/es/concepts/pinnacle-odds-changed-at/)). Usa `last_seen_at` para la frescura del pipeline. | +| `wire_received_at` | string\|undefined | Marca de tiempo ISO 8601 del momento en que sharp-api-go detectó por última vez un cambio de hash de contenido para esta fila — el sello de llegada al pipeline. Distinto de `last_seen_at` (observación del adaptador) y de `odds_changed_at` (actualización propia de la casa de apuestas). | | `is_live` | boolean | Si el evento está actualmente en directo | +| `event_uuid` | string\|undefined | UUID canónico estable del evento desde el atlas de SharpAPI, cuando el evento está mapeado. Mientras `event_id` lleva el identificador principal del adaptador (a menudo el de la casa de apuestas originadora), `event_uuid` es un hash estable entre feeds que puedes usar para joins entre feeds. Ausente para eventos no mapeados. | +| `external_event_id` | string\|undefined | El ID de evento nativo de la propia casa de apuestas, cuando difiere de `event_id`. Útil para enlazar filas de vuelta a la UI o API de la casa de apuestas. | +| `deep_link` | string\|undefined | URL resolutiva que apunta a la página de evento o del cupón de la casa de apuestas. Pasa `state=` (p. ej. `state=nj`) en la solicitud para enrutar a subdominios específicos por estado en las casas que los requieren (BetMGM, Caesars, BetRivers). | +| `market_id` | string\|undefined | Identificador de mercado nativo de la casa de apuestas. Algunas casas no lo exponen — ausente cuando no se conoce. | +| `selection_id` | string\|undefined | Identificador de selección/resultado nativo de la casa de apuestas. Algunas casas no lo exponen — ausente cuando no se conoce. | | `player_name` | string\|undefined | Nombre del jugador (solo mercados de player props) | | `stat_category` | string\|undefined | Categoría estadística, p. ej. `points`, `rebounds` (solo mercados de player props) | +| `home_pitcher` | string\|undefined | Solo MLB. Pitcher abridor del equipo local cuando lo publica la casa de apuestas. | +| `away_pitcher` | string\|undefined | Solo MLB. Pitcher abridor del equipo visitante cuando lo publica la casa de apuestas. | | `public_bet_pct` | number\|undefined | Porcentaje de tickets de apuestas públicas (0.0-1.0). Actualmente solo en BetMGM. | | `max_bet` | number\|undefined | Monto máximo de apuesta (USD) para este tipo de mercado. Actualmente solo en Pinnacle. | +| `volume` | number\|undefined | Volumen casado en esta selección. Solo casas de intercambio (Betfair, Novig, ProphetX, Polymarket). Las unidades dependen de la casa originadora (p. ej. stake casado en Betfair, volumen de acciones en mercados de predicción). | +| `volume_24h` | number\|undefined | Volumen casado de las últimas 24 horas en esta selección. Solo casas de intercambio. | +| `open_interest` | number\|undefined | Interés abierto pendiente (stake casado / acciones actualmente mantenidas) sobre esta selección. Solo casas de intercambio. | +| `polymarket_resolution` | string\|undefined | Solo Polymarket. Estado de resolución del oráculo optimista UMA cuando el mercado ha terminado — uno de `settled_normal`, `voided`, `disputed`, `proposed`, `unknown`. Ausente en mercados Polymarket aún en vivo y en todas las casas no-Polymarket. | + +### Tipos de selección + +`selection_type` lleva el identificador canónico de lado para cada `selection`. La mayoría de mercados son a dos vías (p. ej. moneyline, point spread, total) y emiten uno de los valores simples siguientes. Un pequeño conjunto de mercados multieje (doble oportunidad de fútbol, BTTS combinado, resultado × O/U, round betting de MMA, set betting de tenis, marcador exacto, etc.) codifica dos resultados por selección y emite valores **compuestos** unidos por `_`. + +| Familia | Valores | Dónde aparecen | +|--------|--------|-----------------| +| Dos vías (lado del equipo) | `home`, `away` | `moneyline`, `point_spread`, `puck_line`, `run_line`, `team_total`, `set_handicap`, la mayoría de mercados por período | +| Dos vías (dirección de línea) | `over`, `under` | `total_points`, `total_goals`, `total_runs`, `total_games`, `total_rounds`, `team_total`, todos los props `player_*_o_u` | +| Dos vías (sí/no) | `yes`, `no` | `binary`, mercados de tipo prop sí/no, resultados de intercambio "back/lay", mercados de predicción de Polymarket | +| Dos vías (paridad) | `even`, `odd` | Mercados de paridad de totales (p. ej. total de puntos par/impar) | +| Tres vías | `draw` | Moneyline a tres vías (1X2 de fútbol), lado complementario del draw-no-bet, "sin gol" en `next_goal` | +| Compuesto (equipo × O/U) | `home_over`, `home_under`, `away_over`, `away_under` | `match_result_total_goals` de fútbol ("Equipo A y Over N.5") y mercados análogos resultado-más-total | +| Compuesto (equipo × BTTS) | `home_yes`, `home_no`, `away_yes`, `away_no`, `draw_yes`, `draw_no` | `match_result_both_teams_to_score` de fútbol | +| Compuesto (doble oportunidad) | `home_draw`, `away_draw`, `home_away` | `double_chance` de fútbol (1X / X2 / 12) y doble oportunidad de MMA | +| Compuesto (round / método) | `home_r1`, `home_r2`, `home_decision`, `away_r1`, etc. | `round_betting` de MMA y mercados de método de victoria | +| Comodín | `other` | `game_prop`, "sin gol" en `next_goal`, y cualquier selección donde el mapeador de lado canónico no pueda descomponer el resultado limpiamente. Siempre presente en volumen bajo; trátalo como opaco. | + + +**Parseo de valores compuestos.** Las cadenas compuestas de `selection_type` siempre unen el eje del equipo (`home` / `away` / `draw`) al eje secundario con un único guion bajo. Para recuperar solo el eje del equipo sin parsear, lee [`team_side`](#esquema-del-objeto-odds) — es el lado en bruto sellado por el adaptador para la misma fila. + + + +**Los mercados de cola larga emiten formas adicionales.** Mercados como `correct_score` (p. ej. `"2_1"`), `set_betting` (p. ej. `"0_2"`), `winning_margin`, `halftime_fulltime`, `first_goal` y `anytime_goal` codifican resultados a nivel de marcador o compuestos directamente en `selection_type`. Si dependes de un enum cerrado, filtra a las familias de arriba y trata cualquier valor no reconocido como opaco — no lances error. + ## Ordenación diff --git a/content/pt-BR/api-reference/odds.mdx b/content/pt-BR/api-reference/odds.mdx index cbea8dc..386d000 100644 --- a/content/pt-BR/api-reference/odds.mdx +++ b/content/pt-BR/api-reference/odds.mdx @@ -306,19 +306,58 @@ X-Request-Id: req_abc123def456 | `away_team` | string | Nome do time visitante | | `market_type` | string | `moneyline`, `spread`, `total`, `player_prop`, etc. | | `selection` | string | A seleção (nome do time, Over/Under, nome do jogador) | -| `selection_type` | string | `home`, `away`, `over`, `under` | +| `selection_type` | string | Identificador canônico do lado. Veja [Tipos de seleção](#tipos-de-seleção) abaixo para o enum completo, incluindo formas compostas (ex.: `home_over`) emitidas em mercados multieixo. | +| `team_side` | string\|undefined | Dica bruta de lado do time vinda do adaptador — um dentre `home`, `away`, `draw`. Útil quando `selection_type` carrega um valor composto (ex.: `home_over`) e você quer apenas o eixo de time sem precisar fazer parsing. Ausente quando o adaptador não o carimbou. | | `odds_american` | number | Odds americanas (ex.: -110, +150) | | `odds_decimal` | number | Odds decimais (ex.: 1.909) | | `odds_probability` | number | Probabilidade implícita (ex.: 0.5238) | | `line` | number \| null | Valor da linha de spread ou total (`null` para moneyline) | +| `is_alternate_line` | boolean\|undefined | `true` quando o `line` desta linha difere da linha principal canônica para seu grupo `(event, market_type, player)`. Sempre `false` para mercados sem linha (moneyline, outright). Estável em [`/opportunities/ev`](/pt-BR/api-reference/opportunities-ev/) hoje; em rollout para as linhas de `/odds`. Use para separar snapshots de linha principal e linhas alternativas. | | `event_start_time` | string | Hora de início do evento em ISO 8601 | | `last_seen_at` | string | Timestamp ISO 8601 da última observação desta linha pelo nosso adaptador. Atualiza a cada ciclo de ingestão — este é o sinal de frescor do pipeline. | | `odds_changed_at` | string | Timestamp ISO 8601 da atualização da própria fonte da casa de apostas para esta linha, quando disponível. Na Pinnacle, é mantido enquanto o preço/linha/flag `is_live` permanecerem inalterados (veja [Entendendo o `odds_changed_at` da Pinnacle](/pt-BR/concepts/pinnacle-odds-changed-at/)). Use `last_seen_at` para frescor do pipeline. | +| `wire_received_at` | string\|undefined | Timestamp ISO 8601 de quando o sharp-api-go observou pela última vez uma mudança no hash de conteúdo desta linha — o carimbo de chegada ao pipeline. Distinto de `last_seen_at` (observação do adaptador) e `odds_changed_at` (atualização da própria fonte da casa de apostas). | | `is_live` | boolean | Se o evento está atualmente ao vivo | +| `event_uuid` | string\|undefined | UUID canônico estável do evento do atlas do SharpAPI, quando o evento está mapeado. Enquanto `event_id` carrega o identificador primário do adaptador (frequentemente o da casa de apostas originadora), `event_uuid` é um hash estável entre feeds para joins cross-feed. Ausente para eventos não mapeados. | +| `external_event_id` | string\|undefined | O ID de evento nativo da própria casa de apostas, quando distinto de `event_id`. Útil para vincular linhas de volta à UI ou API da casa de apostas. | +| `deep_link` | string\|undefined | URL resolvedora apontando para a página de evento ou bilhete da casa de apostas. Passe `state=` (ex.: `state=nj`) na requisição para rotear via subdomínios específicos por estado em casas que os exigem (BetMGM, Caesars, BetRivers). | +| `market_id` | string\|undefined | Identificador nativo de mercado da casa de apostas. Algumas casas não o expõem — ausente quando desconhecido. | +| `selection_id` | string\|undefined | Identificador nativo de seleção/resultado da casa de apostas. Algumas casas não o expõem — ausente quando desconhecido. | | `player_name` | string\|undefined | Nome do jogador (apenas mercados de player prop) | | `stat_category` | string\|undefined | Categoria estatística, ex.: `points`, `rebounds` (apenas mercados de player prop) | +| `home_pitcher` | string\|undefined | Apenas MLB. Pitcher abridor do time da casa quando publicado pela casa de apostas. | +| `away_pitcher` | string\|undefined | Apenas MLB. Pitcher abridor do time visitante quando publicado pela casa de apostas. | | `public_bet_pct` | number\|undefined | Porcentagem de tickets de apostas públicos (0.0-1.0). Atualmente apenas BetMGM. | | `max_bet` | number\|undefined | Valor máximo de aposta (USD) para este tipo de mercado. Atualmente apenas Pinnacle. | +| `volume` | number\|undefined | Volume casado nesta seleção. Apenas casas de exchange (Betfair, Novig, ProphetX, Polymarket). As unidades seguem a casa originadora (ex.: stake casado na Betfair, volume de ações em mercados de previsão). | +| `volume_24h` | number\|undefined | Volume casado das últimas 24 horas nesta seleção. Apenas casas de exchange. | +| `open_interest` | number\|undefined | Interesse aberto pendente (stake casado / ações atualmente detidas) nesta seleção. Apenas casas de exchange. | +| `polymarket_resolution` | string\|undefined | Apenas Polymarket. Status de resolução do oráculo otimista UMA quando o mercado terminou — um dentre `settled_normal`, `voided`, `disputed`, `proposed`, `unknown`. Ausente em mercados Polymarket ainda ao vivo e em todas as casas não-Polymarket. | + +### Tipos de seleção + +`selection_type` carrega o identificador canônico de lado para cada `selection`. A maioria dos mercados é de duas vias (ex.: moneyline, point spread, total) e emite um dos valores simples abaixo. Um pequeno conjunto de mercados multieixo (dupla chance no futebol, BTTS combinado, resultado × O/U, round betting de MMA, set betting de tênis, placar exato, etc.) codifica dois resultados por seleção e emite valores **compostos** unidos por `_`. + +| Família | Valores | Onde aparecem | +|--------|--------|----------------| +| Duas vias (lado do time) | `home`, `away` | `moneyline`, `point_spread`, `puck_line`, `run_line`, `team_total`, `set_handicap`, a maioria dos mercados por período | +| Duas vias (direção da linha) | `over`, `under` | `total_points`, `total_goals`, `total_runs`, `total_games`, `total_rounds`, `team_total`, todos os props `player_*_o_u` | +| Duas vias (sim/não) | `yes`, `no` | `binary`, mercados estilo prop sim/não, resultados de exchange "back/lay", mercados de previsão Polymarket | +| Duas vias (paridade) | `even`, `odd` | Mercados de paridade de totais (ex.: total de pontos par/ímpar) | +| Três vias | `draw` | Moneyline a três vias (1X2 do futebol), lado complementar do draw-no-bet, "sem gol" em `next_goal` | +| Composto (time × O/U) | `home_over`, `home_under`, `away_over`, `away_under` | `match_result_total_goals` do futebol ("Time A e Over N.5") e mercados análogos resultado-mais-total | +| Composto (time × BTTS) | `home_yes`, `home_no`, `away_yes`, `away_no`, `draw_yes`, `draw_no` | `match_result_both_teams_to_score` do futebol | +| Composto (dupla chance) | `home_draw`, `away_draw`, `home_away` | `double_chance` do futebol (1X / X2 / 12) e dupla chance de MMA | +| Composto (round / método) | `home_r1`, `home_r2`, `home_decision`, `away_r1` etc. | `round_betting` de MMA e mercados de método de vitória | +| Coringa | `other` | `game_prop`, "sem gol" em `next_goal`, e qualquer seleção em que o mapeador de lado canônico não consegue decompor o resultado de forma limpa. Sempre presente em baixo volume; trate como opaco. | + + +**Parseando valores compostos.** Strings compostas de `selection_type` sempre unem o eixo de time (`home` / `away` / `draw`) ao eixo secundário com um único underscore. Para recuperar apenas o eixo de time sem parsing, leia [`team_side`](#schema-do-objeto-odds) — é o lado bruto carimbado pelo adaptador para a mesma linha. + + + +**Mercados de cauda longa emitem formas adicionais.** Mercados como `correct_score` (ex.: `"2_1"`), `set_betting` (ex.: `"0_2"`), `winning_margin`, `halftime_fulltime`, `first_goal` e `anytime_goal` codificam resultados de placar ou compostos diretamente em `selection_type`. Se você depende de um enum fechado, filtre para as famílias acima e trate qualquer valor não reconhecido como opaco — não lance erro. + ## Ordenação diff --git a/public/openapi.json b/public/openapi.json index 17b493f..322b842 100644 --- a/public/openapi.json +++ b/public/openapi.json @@ -13,8 +13,8 @@ "name": "Proprietary", "url": "https://sharpapi.io/terms" }, - "x-generated-at": "2026-04-23T20:18:17-04:00", - "x-commit-sha": "39e2c5d" + "x-generated-at": "2026-05-20T23:30:42-04:00", + "x-commit-sha": "13f97e3" }, "servers": [ { @@ -4391,8 +4391,43 @@ }, "selection_type": { "type": "string", + "description": "Canonical side identifier. Two-way markets emit one of the simple values listed in `enum`. Multi-axis markets (soccer double-chance, BTTS-combined, result × O/U, MMA round betting, tennis set betting, correct-score, etc.) emit compound forms joined by `_` — e.g. `home_over`, `away_under`, `home_yes`, `home_r1`. Long-tail markets such as `correct_score` and `set_betting` also encode score-level outcomes directly (e.g. `2_1`). Treat any unrecognised value as opaque rather than erroring. See the `/odds` page for the full table.", + "enum": [ + "home", + "away", + "over", + "under", + "yes", + "no", + "even", + "odd", + "draw", + "other", + "home_over", + "home_under", + "away_over", + "away_under", + "home_yes", + "home_no", + "away_yes", + "away_no", + "draw_yes", + "draw_no", + "home_draw", + "away_draw", + "home_away" + ], "example": "away" }, + "team_side": { + "type": "string", + "description": "Raw team-side hint from the adapter — 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.", + "enum": [ + "home", + "away", + "draw" + ] + }, "odds_american": { "type": "number", "example": 135 @@ -4412,6 +4447,10 @@ "description": "Point spread or total line (null for moneyline)", "example": null }, + "is_alternate_line": { + "type": "boolean", + "description": "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 today; rolling out to /odds rows." + }, "event_start_time": { "type": "string", "format": "date-time" @@ -4424,6 +4463,43 @@ "format": "date-time", "description": "When these odds were last updated" }, + "wire_received_at": { + "type": "string", + "format": "date-time", + "description": "Pipeline-arrival stamp — when sharp-api-go last observed a content-hash change for this row. Distinct from `last_seen_at` (adapter observation) and `odds_changed_at` (sportsbook's own source update)." + }, + "event_uuid": { + "type": "string", + "description": "Stable canonical event UUID from the SharpAPI atlas. Use for cross-feed joins; absent for unmapped events." + }, + "external_event_id": { + "type": "string", + "description": "The sportsbook's own native event ID, when distinct from `event_id`." + }, + "deep_link": { + "type": "string", + "description": "Resolver URL pointing to the sportsbook's event or bet-slip page. Pass `state=` on the request to route through state-specific subdomains for books that need them (BetMGM, Caesars, BetRivers)." + }, + "market_id": { + "type": "string", + "description": "Sportsbook's own native market identifier. Absent when the book does not expose one." + }, + "selection_id": { + "type": "string", + "description": "Sportsbook's own native selection/outcome identifier. Absent when the book does not expose one." + }, + "volume": { + "type": "number", + "description": "Matched volume on this selection. Exchange books only (Betfair, Novig, ProphetX, Polymarket). Units follow the originating book." + }, + "volume_24h": { + "type": "number", + "description": "Trailing 24-hour matched volume on this selection. Exchange books only." + }, + "open_interest": { + "type": "number", + "description": "Outstanding open interest on this selection. Exchange books only." + }, "player_name": { "type": "string", "nullable": true, @@ -4433,6 +4509,25 @@ "type": "string", "nullable": true, "description": "Stat category (player prop markets only)" + }, + "home_pitcher": { + "type": "string", + "description": "MLB only. Home-team starting pitcher when published by the book." + }, + "away_pitcher": { + "type": "string", + "description": "MLB only. Away-team starting pitcher when published by the book." + }, + "polymarket_resolution": { + "type": "string", + "description": "Polymarket only. UMA optimistic-oracle resolution status when the market has terminated. Absent for live (unresolved) markets and for non-Polymarket books.", + "enum": [ + "settled_normal", + "voided", + "disputed", + "proposed", + "unknown" + ] } } },