{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/owlsinsight-com/json-schema/owlsinsight-com-closing-odds-response-schema.json",
  "title": "ClosingOddsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/owlsinsight-com-historical-data-api-openapi.yml#/components/schemas/ClosingOddsResponse",
  "properties": {
    "data": {
      "properties": {
        "dataQuality": {
          "$ref": "#/$defs/ClosingOddsDataQuality"
        },
        "odds": {
          "items": {
            "$ref": "#/$defs/ClosingOddsRow"
          },
          "type": "array"
        },
        "pagination": {
          "properties": {
            "hasMore": {
              "type": "boolean"
            },
            "limit": {
              "format": "double",
              "type": "number"
            },
            "offset": {
              "format": "double",
              "type": "number"
            },
            "total": {
              "format": "double",
              "type": "number"
            }
          },
          "type": "object",
          "x-owls-required": [
            "total",
            "limit",
            "offset",
            "hasMore"
          ]
        }
      },
      "type": "object",
      "x-owls-required": [
        "odds",
        "pagination",
        "dataQuality"
      ]
    },
    "success": {
      "type": "boolean"
    }
  },
  "type": "object",
  "x-owls-required": [
    "success",
    "data"
  ],
  "$defs": {
    "ClosingOddsDataQuality": {
      "description": "Per-response data quality for /history/closing-odds.\n\nThis endpoint never withholds rows. A price that cannot be a valid American odd\n(|price| < 100, which indicates a decimal coefficient stored in an integer\ncolumn) is omitted per FIELD, leaving the row and its other markets intact.",
      "properties": {
        "note": {
          "type": "string"
        },
        "rowsExcluded": {
          "description": "Always 0 — rows are never excluded by this endpoint.",
          "format": "double",
          "type": "number"
        },
        "suppressedFields": {
          "description": "Count of individual price fields nulled across this response.",
          "format": "double",
          "type": "number"
        }
      },
      "type": "object",
      "x-owls-required": [
        "suppressedFields",
        "rowsExcluded",
        "note"
      ]
    },
    "ClosingOddsRow": {
      "properties": {
        "awayTeam": {
          "type": "string"
        },
        "book": {
          "type": "string"
        },
        "eventId": {
          "type": "string"
        },
        "gameDate": {
          "type": "string"
        },
        "homeTeam": {
          "type": "string"
        },
        "lastUpdate": {
          "description": "Epoch SECONDS from the source. The column is BIGINT UNSIGNED, so this is a number.",
          "format": "double",
          "type": "number"
        },
        "moneyline": {
          "description": "`draw` is present ONLY for three-way sports (soccer). Two-outcome sports omit\nthe key entirely rather than sending `draw: null`, so `Object.keys(moneyline)`\nis safe and an MLB row never advertises an outcome that does not exist.\n\nFor soccer, computing implied probability from home+away alone will NOT\nreconcile — you must include the draw.",
          "properties": {
            "away": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "draw": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "home": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "type": "object",
          "x-owls-required": [
            "home",
            "away"
          ]
        },
        "source": {
          "$ref": "#/$defs/ClosingOddsSource",
          "description": "Provenance. Several sources can coexist for the same (event, book)."
        },
        "sport": {
          "type": "string"
        },
        "spread": {
          "description": "Every field null means the spread was captured but withheld: on a live-derived\nclose, a spread whose two points do not cancel or one known to be wrong for that\nbook and date (counted in `dataQuality.suppressedFields`). Absent means none was captured.",
          "properties": {
            "away": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "awayPrice": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "home": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "homePrice": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "type": "object",
          "x-owls-required": [
            "home",
            "away",
            "homePrice",
            "awayPrice"
          ]
        },
        "total": {
          "properties": {
            "line": {
              "description": "The totals line. Null only when the whole total was withheld (a live-derived\nclose known to be wrong for that book and date); the prices are then null too.\nThe API omits `total` when none was captured.",
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "overPrice": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            },
            "underPrice": {
              "format": "double",
              "type": [
                "number",
                "null"
              ]
            }
          },
          "type": "object",
          "x-owls-required": [
            "line",
            "overPrice",
            "underPrice"
          ]
        }
      },
      "type": "object",
      "x-owls-required": [
        "eventId",
        "sport",
        "book",
        "source"
      ]
    },
    "ClosingOddsSource": {
      "description": "Where a closing-odds row came from. These are NOT interchangeable:\n - `football-data`  the bookmaker's FINAL published closing price\n - `live-derived`   the last snapshot our own capture saw, which is only as\n                    close to the close as capture ran that day\n - `yahoo`/`oddsshark`/`espn`  the original third-party backfill (MLB + NBA)\nFor closing-line-value work prefer `football-data` where present.",
      "type": "string",
      "x-extensible-enum": [
        "espn",
        "football-data",
        "live-derived",
        "oddsshark",
        "yahoo"
      ]
    }
  }
}