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
28 changes: 24 additions & 4 deletions content/en/api-reference/odds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ X-Request-Id: req_abc123def456
| `stat_category` | string\|undefined | Stat category, e.g. `points`, `rebounds` (player prop markets only) |
| `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. |
| `home` | object\|undefined | **New (May 2026).** Nested home-team reference: `{id, numerical_id, name, abbreviation}`. See [Entity reference IDs](/en/concepts/entity-reference-ids). |
| `away` | object\|undefined | **New (May 2026).** Nested away-team reference: `{id, numerical_id, name, abbreviation}`. |
| `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}`. |
| `league_ref` | object\|undefined | **New (May 2026).** Nested league reference: `{id, numerical_id, label}`. |
| `market_ref` | object\|undefined | **New (May 2026).** Nested market reference: `{id, numerical_id, label}`. |
Expand All @@ -344,8 +344,28 @@ Every odds row now carries six optional **nested reference objects** that bundle
"selection": "New York Yankees",
"odds_american": -135,

"home": { "id": "new_york_yankees", "numerical_id": 20, "name": "New York Yankees", "abbreviation": "NYY" },
"away": { "id": "boston_red_sox", "numerical_id": 5, "name": "Boston Red Sox", "abbreviation": "BOS" },
"home": {
"id": "new_york_yankees",
"numerical_id": 20,
"name": "New York Yankees",
"abbreviation": "NYY",
"logo": "https://cdn.opticodds.com/team-logos/baseball/36.png",
"city": "New York",
"mascot": "Yankees",
"conference": "AL",
"division": "East Division"
},
"away": {
"id": "boston_red_sox",
"numerical_id": 5,
"name": "Boston Red Sox",
"abbreviation": "BOS",
"logo": "https://cdn.opticodds.com/team-logos/baseball/14.png",
"city": "Boston",
"mascot": "Red Sox",
"conference": "AL",
"division": "East Division"
},
"sport_ref": { "id": "baseball", "numerical_id": 3, "name": "Baseball" },
"league_ref": { "id": "mlb", "numerical_id": 354, "label": "MLB" },
"market_ref": { "id": "moneyline","numerical_id": 878, "label": "Moneyline" },
Expand Down
28 changes: 24 additions & 4 deletions content/en/api-reference/opportunities-arbitrage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ X-Request-Id: req_arb789xyz012
| `external_event_id` | string\|null | Sportsbook's native event ID |
| `selection_id` | string\|null | Sportsbook's selection/outcome ID |
| `market_id` | string\|null | Sportsbook's market ID |
| `home` | object\|undefined | **New (May 2026).** Nested home-team reference: `{id, numerical_id, name, abbreviation}`. See [Entity reference IDs](/en/concepts/entity-reference-ids). |
| `away` | object\|undefined | **New (May 2026).** Nested away-team reference: `{id, numerical_id, name, abbreviation}`. |
| `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}`. |
| `league_ref` | object\|undefined | **New (May 2026).** Nested league reference: `{id, numerical_id, label}`. |
| `market_ref` | object\|undefined | **New (May 2026).** Nested market reference: `{id, numerical_id, label}`. |
Expand All @@ -281,8 +281,28 @@ Every arbitrage leg now carries six optional nested reference objects, mirroring
"selection": "Los Angeles Lakers",
"odds_american": 145,

"home": { "id": "los_angeles_lakers", "numerical_id": 14, "name": "Los Angeles Lakers", "abbreviation": "LAL" },
"away": { "id": "boston_celtics", "numerical_id": 3, "name": "Boston Celtics", "abbreviation": "BOS" },
"home": {
"id": "los_angeles_lakers",
"numerical_id": 14,
"name": "Los Angeles Lakers",
"abbreviation": "LAL",
"logo": "https://cdn.opticodds.com/team-logos/basketball/13.png",
"city": "Los Angeles",
"mascot": "Lakers",
"conference": "Western",
"division": "Pacific Division"
},
"away": {
"id": "boston_celtics",
"numerical_id": 3,
"name": "Boston Celtics",
"abbreviation": "BOS",
"logo": "https://cdn.opticodds.com/team-logos/basketball/2.png",
"city": "Boston",
"mascot": "Celtics",
"conference": "Eastern",
"division": "Atlantic Division"
},
"sport_ref": { "id": "basketball", "numerical_id": 1, "name": "Basketball" },
"league_ref": { "id": "nba", "numerical_id": 87, "label": "NBA" },
"market_ref": { "id": "moneyline", "numerical_id": 878, "label": "Moneyline" },
Expand Down
4 changes: 2 additions & 2 deletions content/en/api-reference/opportunities-ev.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ X-Request-Id: req_abc123def456
| `oldest_odds_age_seconds` | number\|null | Age of the stalest odds used in the EV calculation (seconds) |
| `warnings` | string[] | Data quality warnings (e.g., `POTENTIALLY_STALE_ODDS`, `LIVE_STALE_ODDS`) |
| `detected_at` | string | ISO 8601 timestamp when the +EV was first detected |
| `home` | object\|undefined | **New (May 2026).** Nested home-team reference: `{id, numerical_id, name, abbreviation}`. See [Entity reference IDs](/en/concepts/entity-reference-ids). |
| `away` | object\|undefined | **New (May 2026).** Nested away-team reference: `{id, numerical_id, name, abbreviation}`. |
| `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}`. |
| `league_ref` | object\|undefined | **New (May 2026).** Nested league reference: `{id, numerical_id, label}`. |
| `market_ref` | object\|undefined | **New (May 2026).** Nested market reference: `{id, numerical_id, label}`. |
Expand Down
28 changes: 24 additions & 4 deletions content/en/api-reference/opportunities-middles.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ X-Request-Id: req_mid456abc789
| `stake_percent` | number | Recommended stake allocation (% of total) |
| `odds_age_seconds` | number\|null | Age of this side's odds at detection time |
| `deep_link` | string\|null | Direct link to place this bet at the sportsbook |
| `home` | object\|undefined | **New (May 2026).** Nested home-team reference: `{id, numerical_id, name, abbreviation}`. See [Entity reference IDs](/en/concepts/entity-reference-ids). |
| `away` | object\|undefined | **New (May 2026).** Nested away-team reference: `{id, numerical_id, name, abbreviation}`. |
| `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}`. |
| `league_ref` | object\|undefined | **New (May 2026).** Nested league reference: `{id, numerical_id, label}`. |
| `market_ref` | object\|undefined | **New (May 2026).** Nested market reference: `{id, numerical_id, label}`. |
Expand All @@ -264,8 +264,28 @@ X-Request-Id: req_mid456abc789
"line": -2.5,
"odds": { "american": -110, "decimal": 1.909, "probability": 0.524, "fair_probability": 0.524 },

"home": { "id": "kansas_city_chiefs", "numerical_id": 11, "name": "Kansas City Chiefs", "abbreviation": "KC" },
"away": { "id": "buffalo_bills", "numerical_id": 4, "name": "Buffalo Bills", "abbreviation": "BUF" },
"home": {
"id": "kansas_city_chiefs",
"numerical_id": 11,
"name": "Kansas City Chiefs",
"abbreviation": "KC",
"logo": "https://cdn.opticodds.com/team-logos/football/14.png",
"city": "Kansas City",
"mascot": "Chiefs",
"conference": "AFC",
"division": "AFC West"
},
"away": {
"id": "buffalo_bills",
"numerical_id": 4,
"name": "Buffalo Bills",
"abbreviation": "BUF",
"logo": "https://cdn.opticodds.com/team-logos/football/4.png",
"city": "Buffalo",
"mascot": "Bills",
"conference": "AFC",
"division": "AFC East"
},
"sport_ref": { "id": "football", "numerical_id": 2, "name": "Football" },
"league_ref": { "id": "nfl", "numerical_id": 90, "label": "NFL" },
"market_ref": { "id": "point_spread","numerical_id": 880, "label": "Point Spread" },
Expand Down
23 changes: 19 additions & 4 deletions content/en/api-reference/teams.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ for team in result['data'][:10]:
"numerical_id": 1042,
"name": "Arsenal",
"abbreviation": "ARS",
"logo": "https://cdn.opticodds.com/team-logos/soccer/12.png",
"city": "London",
"mascot": "Arsenal",
"conference": "England - Premier League",
"division": null,
"sport": "soccer",
"leagues": [
"EPL",
Expand All @@ -112,6 +117,11 @@ for team in result['data'][:10]:
"numerical_id": 318,
"name": "Alabama Crimson Tide",
"abbreviation": "ALA",
"logo": "https://cdn.opticodds.com/team-logos/basketball/333.png",
"city": "Alabama",
"mascot": "Crimson Tide",
"conference": "SEC",
"division": null,
"sport": "basketball",
"leagues": [
"NCAAB"
Expand Down Expand Up @@ -145,21 +155,26 @@ for team in result['data'][:10]:
| `numerical_id` | integer \| null | Stable integer key for the team (frozen, never reused). New (May 2026) — additive, optional. See [Entity reference IDs](/en/concepts/entity-reference-ids). |
| `name` | string | Display name (e.g., `Alabama Crimson Tide`) |
| `abbreviation` | string \| null | Short code (e.g., `ALA`, `ARS`, `NYY`). New (May 2026) — populated where a broadly-recognized abbreviation exists. |
| `logo` | string \| null | Full CDN URL for the team crest. New (May 2026) — populated for ~93% of teams. Treat the host as opaque. |
| `city` | string \| null | The team's geographic anchor (e.g., `Boston`, `Los Angeles`). New (May 2026). |
| `mascot` | string \| null | The team mascot / nickname portion of the name (e.g., `Yankees`, `Lakers`). New (May 2026). |
| `conference` | string \| null | League-defined conference (e.g., `AL`, `Eastern`, `AFC`). Format varies per league. New (May 2026). |
| `division` | string \| null | League-defined sub-grouping within the conference (e.g., `East Division`, `AFC West`). New (May 2026). |
| `sport` | string | Primary sport (e.g., `basketball`, `soccer`, `football`, `hockey`) |
| `leagues` | array | Leagues this team appears in (e.g., `["NBA", "NCAAB"]`) |
| `aliases` | array | Alternative names used by different sportsbooks (e.g., `["Alabama", "Bama"]`) |
| `event_count` | integer | Number of current events involving this team |
| `live_count` | integer | Number of currently live events involving this team |

### New (May 2026): `numerical_id` and `abbreviation`
### New (May 2026): `numerical_id`, `abbreviation`, and team metadata

`numerical_id` is a frozen, dense-from-1 integer assigned per team in the SharpAPI atlas (~5,000+ entries across all sports). `abbreviation` is the team's short code where one is broadly known (US major leagues, EPL, ATP/WTA — `NYY`, `ARS`, `LAL`, etc.).
`numerical_id` is a frozen, dense-from-1 integer assigned per team in the SharpAPI atlas (~24,000 entries across all sports). The new metadata fields (`abbreviation`, `logo`, `city`, `mascot`, `conference`, `division`) are sourced from the SharpAPI atlas and populated for the broad majority of teams (≈93% on `logo`, with comparable coverage on the rest).

- **Frozen:** `numerical_id` is never reused or remapped, even if the team renames or moves leagues.
- **Optional:** both fields are absent (or `null`) for teams that haven't been mapped or don't have a standard short code. The slug `id` and `name` are always present.
- **Optional:** every new field is absent (or `null`) for teams that haven't been mapped or for individual-sport competitors (tennis players, MMA fighters, golfers, drivers — they're not "teams" in the conventional sense). The slug `id` and `name` are always present.
- **Domain-scoped:** `numerical_id` is unique across teams only.

Every odds row and opportunity leg also carries `home` and `away` blocks with the same shape (`{id, numerical_id, name, abbreviation}`), so you don't need to second-fetch this endpoint just to label rows. See [Entity reference IDs](/en/concepts/entity-reference-ids) for the full contract.
Every odds row and opportunity leg also carries `home` and `away` blocks with the same shape (`{id, numerical_id, name, abbreviation, logo, city, mascot, conference, division}`), so you don't need to second-fetch this endpoint just to label rows. See [Entity reference IDs](/en/concepts/entity-reference-ids) for the full contract.

## Meta Object

Expand Down
42 changes: 38 additions & 4 deletions content/en/concepts/entity-reference-ids.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,28 @@ Each odds row (and each leg of an EV / arbitrage / middle opportunity) now carri

```json
{
"home": { "id": "new_york_yankees", "numerical_id": 20, "name": "New York Yankees", "abbreviation": "NYY" },
"away": { "id": "boston_red_sox", "numerical_id": 5, "name": "Boston Red Sox", "abbreviation": "BOS" },
"home": {
"id": "new_york_yankees",
"numerical_id": 20,
"name": "New York Yankees",
"abbreviation": "NYY",
"logo": "https://cdn.opticodds.com/team-logos/baseball/36.png",
"city": "New York",
"mascot": "Yankees",
"conference": "AL",
"division": "East Division"
},
"away": {
"id": "boston_red_sox",
"numerical_id": 5,
"name": "Boston Red Sox",
"abbreviation": "BOS",
"logo": "https://cdn.opticodds.com/team-logos/baseball/14.png",
"city": "Boston",
"mascot": "Red Sox",
"conference": "AL",
"division": "East Division"
},
"sport_ref": { "id": "baseball", "numerical_id": 3, "name": "Baseball" },
"league_ref": { "id": "mlb", "numerical_id": 354, "label": "MLB" },
"market_ref": { "id": "moneyline", "numerical_id": 878, "label": "Moneyline" },
Expand Down Expand Up @@ -79,20 +99,34 @@ Every reference endpoint adds `numerical_id` to its existing object schema. `/te
| [`/leagues`](/en/api-reference/leagues) | `numerical_id` | integer \| null | League-scoped domain |
| [`/sportsbooks`](/en/api-reference/sportsbooks) | `numerical_id` | integer \| null | Sportsbook-scoped domain |
| [`/markets`](/en/api-reference/markets) | `numerical_id` | integer \| null | Market-type-scoped domain |
| [`/teams`](/en/api-reference/teams) | `numerical_id`, `abbreviation` | integer \| null, string \| null | Team-scoped domain |
| [`/teams`](/en/api-reference/teams) | `numerical_id`, `abbreviation`, `logo`, `city`, `mascot`, `conference`, `division` | integer \| null, string \| null | Team-scoped domain. Latter five are atlas metadata sourced from OpticOdds. |

### Nested reference blocks on odds & opportunity legs

| Block | Where | Fields | Purpose |
|---|---|---|---|
| `home`, `away` | Every odds row, every opportunity leg | `id`, `numerical_id`, `name`, `abbreviation` | Resolve the two competitors without a separate `/teams` call. |
| `home`, `away` | Every odds row, every opportunity leg | `id`, `numerical_id`, `name`, `abbreviation`, `logo`, `city`, `mascot`, `conference`, `division` | Resolve the two competitors without a separate `/teams` call. |
| `sport_ref` | Same | `id`, `numerical_id`, `name` | Display-ready sport reference. |
| `league_ref` | Same | `id`, `numerical_id`, `label` | Display-ready league reference. |
| `market_ref` | Same | `id`, `numerical_id`, `label` | Display-ready market reference (canonical market type). |
| `sportsbook_ref` | Same | `id`, `numerical_id`, `label` | Display-ready sportsbook reference. |

All inner fields are **optional** within a block. A block may be present with a `null` `numerical_id` if the slug has been mapped but the integer assignment is pending; both `numerical_id` and the entire block may also be absent for unmapped entities.

### Team metadata fields

The `home` / `away` blocks expose five additional optional metadata fields beyond `id` / `numerical_id` / `name` / `abbreviation`. They are sourced from the SharpAPI atlas and populated for the broad majority of teams (≈93% on `logo`, with comparable coverage on the rest):

| Field | Example | Notes |
|---|---|---|
| `logo` | `"https://cdn.opticodds.com/team-logos/baseball/36.png"` | Full CDN URL for a team crest. Treat the host as opaque; SharpAPI may re-host the same asset under its own domain in the future. |
| `city` | `"New York"` | The team's geographic anchor. For multi-city teams (e.g. the New York Football Giants playing in NJ) we follow the league's conventional city. |
| `mascot` | `"Yankees"` | The team mascot / nickname portion of the full name. |
| `conference` | `"AL"`, `"AFC"`, `"Western"` | League-defined conference / grouping. Format varies per league. |
| `division` | `"East Division"`, `"NL East"`, `"Pacific Division"` | Sub-grouping within the conference, league-defined. |

Individual-sport competitors (tennis players, MMA fighters, golfers, drivers) generally have none of these fields populated — they are not "teams" in the conventional sense and inherit only `id` / `numerical_id` / `name`.

## Migration

There is nothing to migrate. Continue using the flat string fields if they cover your needs. Adopt the `*_ref` blocks and `numerical_id` selectively when:
Expand Down