# Odds Data Type - oddID
URL: https://sportsgameodds.com/docs/data-types/odds

Odds Data Type - oddID [#odds-data-type---oddid]

An `oddID` is a unique identifier for a specific betting option. It identifies a specific side/outcome to bet on within a specific market.

oddID Format [#oddid-format]

The oddID combines multiple identifiers into a single unique value:

```
{statID}-{statEntityID}-{periodID}-{betTypeID}-{sideID}
```

| Component                   | Description                    | Examples                             |
| --------------------------- | ------------------------------ | ------------------------------------ |
| [statID](stats)             | The statistic being wagered on | `points`, `touchdowns`, `assists`    |
| [statEntityID](stat-entity) | Who the stat applies to        | `home`, `away`, `all`, or a playerID |
| [periodID](periods)         | The time period covered        | `game`, `1h`, `1q`                   |
| [betTypeID](bet-types)      | The type of bet                | `ml`, `sp`, `ou`                     |
| [sideID](bet-types)         | Which side of the bet          | `home`, `away`, `over`, `under`      |

Example oddIDs [#example-oddids]

| oddID                                   | Description                                         |
| --------------------------------------- | --------------------------------------------------- |
| `points-home-game-ml-home`              | Moneyline bet on the home team to win the full game |
| `points-away-game-sp-away`              | Spread bet on the away team for the full game       |
| `points-all-game-ou-over`               | Over bet on total points for the full game          |
| `points-home-1h-ml-home`                | Moneyline bet on the home team to win the 1st half  |
| `assists-LEBRON_JAMES_NBA-game-ou-over` | Over bet on Lebron James assists for the full game  |

Accessing Odds [#accessing-odds]

Each event returned by the `/events` endpoint contains odds data in the `odds` field. The `odds` field is an object where each key is an `oddID` and the value contains all data related to that betting option. In other words, you can access odds data by looking at `odds.<oddID>` for a given oddID.

```json
{
  "eventID": "...",
  "odds": {
    "points-home-game-ml-home": {
      "oddID": "points-home-game-ml-home",
      "statID": "points",
      "statEntityID": "home",
      "periodID": "game",
      "betTypeID": "ml",
      "sideID": "home",
      "fairOdds": "-110",
      "bookOdds": "-115",
      "byBookmaker": {
        "draftkings": { "odds": "-112", "available": true },
        "fanduel": { "odds": "-118", "available": true }
      }
    },
    "points-all-game-ou-over": {
      "oddID": "points-all-game-ou-over",
      "statID": "points",
      "statEntityID": "all",
      "periodID": "game",
      "betTypeID": "ou",
      "sideID": "over",
      "fairOdds": "-108",
      "fairOverUnder": "224.5",
      "bookOdds": "-110",
      "bookOverUnder": "224.5",
      "byBookmaker": {
        "draftkings": { "odds": "-110", "overUnder": "224.5", "available": true }
      }
    }
  }
}
```

Key Odds Fields [#key-odds-fields]

| Field                             | Description                                       |
| --------------------------------- | ------------------------------------------------- |
| `fairOdds`                        | Consensus odds without juice (vig removed)        |
| `bookOdds`                        | Consensus odds across bookmakers (includes juice) |
| `fairSpread` / `bookSpread`       | The spread/handicap value (for spread bets)       |
| `fairOverUnder` / `bookOverUnder` | The over/under line (for O/U bets)                |
| `byBookmaker`                     | Odds broken down by individual bookmaker          |
| `started` / `ended`               | Whether the bet period has started or ended       |
| `score`                           | The final result value (when available)           |

Open/Close Odds by Bookmaker [#openclose-odds-by-bookmaker]

The `byBookmaker` object can include historical open and close values when requested with `includeOpenCloseOdds=true`:

| Field            | Description                                            |
| ---------------- | ------------------------------------------------------ |
| `openOdds`       | Odds when first available for betting at this book     |
| `closeOdds`      | Odds at event start time at this book                  |
| `openSpread`     | Spread when first available for betting at this book   |
| `closeSpread`    | Spread at event start time at this book                |
| `openOverUnder`  | O/U line when first available for betting at this book |
| `closeOverUnder` | O/U line at event start time at this book              |

These fields are **not included by default** to reduce response size. Add `includeOpenCloseOdds=true` to your request to include them.

Filtering by oddID [#filtering-by-oddid]

Use the `oddID` query parameter on the `/events` endpoint to request specific odds:

```
/events?oddID=points-home-game-ml-home,points-all-game-ou-over
```

Use `includeOpposingOdds=true` to automatically include the opposite side of each requested oddID.

See [Supported Markets](/v2/data-types/markets) for a complete list of oddID values supported for each league and bookmaker.