{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/owlsinsight-com/json-schema/owlsinsight-com-prophet-xodds-response-schema.json",
  "title": "ProphetXOddsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/owlsinsight-com-prophetx-api-openapi.yml#/components/schemas/ProphetXOddsResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/ProphetXSnapshot"
    },
    "meta": {
      "$ref": "#/$defs/ProphetXOddsMeta"
    },
    "success": {
      "type": "boolean"
    }
  },
  "type": "object",
  "x-owls-required": [
    "success",
    "data",
    "meta"
  ],
  "$defs": {
    "ProphetXCompetitor": {
      "description": "Competitor inside a ProphetX event. Stable fields — the server-side\npublisher always emits these five keys for every competitor.\n\n`seq` indicates home/away: 0 = home, 1 = away.",
      "properties": {
        "abbreviation": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "id": {
          "format": "double",
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "seq": {
          "description": "0 = home, 1 = away",
          "format": "double",
          "type": "number"
        },
        "winner": {
          "type": "boolean"
        }
      },
      "type": "object",
      "x-owls-required": [
        "id",
        "name",
        "displayName",
        "seq",
        "abbreviation",
        "winner"
      ]
    },
    "ProphetXEventData": {
      "description": "One event inside a ProphetX REST response.\n\nThe `event` field uses the stable `ProphetXRawEvent` shape (id, name, sport,\ntournament, competitors, scheduled, status) with an index signature for any\nextra ProphetX fields. The `markets` field is a keyed map of raw\nProphetX market payloads, typed as {@link ProphetXMarket}: the fields every\nentry carries are required, the ones that depend on which envelope ProphetX\nsent are optional, and everything else passes through the index signature.",
      "properties": {
        "event": {
          "$ref": "#/$defs/ProphetXRawEvent"
        },
        "lastUpdate": {
          "description": "ISO timestamp of the last ingest for this event.",
          "type": "string"
        },
        "markets": {
          "additionalProperties": {
            "$ref": "#/$defs/ProphetXMarket"
          },
          "description": "Keyed by `\"{market_id}:{line}\"`. See {@link ProphetXMarket} for the shape.",
          "type": "object"
        }
      },
      "type": "object",
      "x-owls-required": [
        "event",
        "markets",
        "lastUpdate"
      ]
    },
    "ProphetXKind": {
      "description": "`game` = main game lines (moneyline/spread/total). `prop` = player/team props.",
      "type": "string",
      "x-extensible-enum": [
        "game",
        "prop"
      ]
    },
    "ProphetXMarket": {
      "description": "One `markets` entry: ProphetX's own market payload, verbatim.",
      "properties": {
        "categoryID": {
          "format": "double",
          "type": "number"
        },
        "categoryName": {
          "description": "e.g. \"Game Lines\", \"Runs\".",
          "type": "string"
        },
        "favouriteMarketLine": {
          "anyOf": [
            {
              "$ref": "#/$defs/ProphetXMarketLine"
            },
            {
              "type": "null"
            }
          ],
          "description": "ProphetX's market-favourite line. FREQUENTLY NOT THIS KEY'S LINE: measured\n2026-09-02, 531 of 1,321 entries carrying it quoted a different line than\nthe key (same id, different `line` and prices). Never read prices from it;\nthe book for this key is `selections` / `marketLines[0]` only."
        },
        "highRisk": {
          "type": "boolean"
        },
        "id": {
          "format": "double",
          "type": "number"
        },
        "line": {
          "description": "The line this entry is keyed on; 0 for moneylines."
        },
        "marketLines": {
          "items": {
            "$ref": "#/$defs/ProphetXMarketLine"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "market_id": {
          "format": "double",
          "type": "number"
        },
        "name": {
          "description": "e.g. \"Run Line\", \"Cam Smith Total Runs\".",
          "type": "string"
        },
        "outcomes": {
          "description": "Absent on delta-shaped entries, where the labels sit under\n`marketLines[0].outcomes` instead — {@link prophetxOutcomes } resolves it.",
          "items": {
            "$ref": "#/$defs/ProphetXOutcome"
          },
          "type": "array"
        },
        "ref_ids": {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "selections": {
          "description": "Sides, each levels-best-first or null. NULL AT THE TOP LEVEL on\ndelta-shaped spread/total entries — read `marketLines[0].selections`\nthen, or call {@link prophetxBook }.",
          "items": {
            "items": {
              "$ref": "#/$defs/ProphetXSelectionLevel"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "type": [
            "array",
            "null"
          ]
        },
        "sportEventId": {
          "format": "double",
          "type": "number"
        },
        "sport_event_id": {
          "format": "double",
          "type": "number",
          "x-go-name": "SportEventIdAlt",
          "x-owls-identifier": "sportEventIdAlt"
        },
        "status": {
          "type": "string"
        },
        "subType": {
          "description": "e.g. `spread`, `total`, `player_total_runs`.",
          "type": "string"
        },
        "totalStake": {
          "description": "ProphetX market-level aggregate (catalog-shaped entries). Not executable liquidity.",
          "format": "double",
          "type": "number"
        },
        "traded_value": {
          "description": "ProphetX market-level aggregate (delta-shaped entries). Not executable liquidity.",
          "format": "double",
          "type": "number"
        },
        "type": {
          "description": "`moneyline` | `spread` | `total`, plus ProphetX's own extra values.",
          "type": "string",
          "x-extensible-enum": [
            "moneyline",
            "spread",
            "total"
          ]
        }
      },
      "type": "object",
      "x-owls-required": [
        "market_id",
        "type",
        "line"
      ]
    },
    "ProphetXMarketLine": {
      "description": "One line of a spread/total market as ProphetX groups it.",
      "properties": {
        "favourite": {
          "type": "boolean"
        },
        "highRisk": {
          "type": "boolean"
        },
        "id": {
          "format": "double",
          "type": "number"
        },
        "name": {
          "description": "e.g. \"Fixed home -1.5\", \"Fixed total 8.5\".",
          "type": "string"
        },
        "outcomes": {
          "items": {
            "$ref": "#/$defs/ProphetXOutcome"
          },
          "type": "array"
        },
        "selections": {
          "description": "Sides, each an array of levels (best first) or null when empty.",
          "items": {
            "items": {
              "$ref": "#/$defs/ProphetXSelectionLevel"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "type": [
            "array",
            "null"
          ]
        },
        "type": {
          "type": "string"
        }
      },
      "type": "object",
      "x-owls-required": [
        "id"
      ]
    },
    "ProphetXOddsMeta": {
      "properties": {
        "available": {
          "type": "boolean"
        },
        "bookmaker": {
          "type": "string",
          "x-extensible-enum": [
            "prophetx"
          ]
        },
        "exchange": {
          "description": "Always `true` for ProphetX — indicates this is a betting exchange, not a traditional book.",
          "type": "boolean"
        },
        "freshness": {
          "properties": {
            "ageSeconds": {
              "format": "double",
              "type": "number"
            },
            "stale": {
              "type": "boolean"
            }
          },
          "type": "object",
          "x-owls-required": [
            "ageSeconds",
            "stale"
          ]
        },
        "kind": {
          "$ref": "#/$defs/ProphetXKind"
        },
        "requestedSports": {
          "description": "Echo of the sports that matched the filter (slug form).",
          "items": {
            "$ref": "#/$defs/ProphetXSportSlug"
          },
          "type": "array"
        }
      },
      "type": "object",
      "x-owls-required": [
        "bookmaker",
        "exchange",
        "requestedSports",
        "available",
        "freshness"
      ]
    },
    "ProphetXOutcome": {
      "description": "One outcome of a ProphetX market. `outcomes[i]` pairs with `selections[i]`.",
      "properties": {
        "abbreviatedName": {
          "type": "string"
        },
        "competitorId": {
          "format": "double",
          "type": "number"
        },
        "displayLine": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "id": {
          "format": "double",
          "type": "number"
        },
        "line": {
          "format": "double",
          "type": "number"
        },
        "lineID": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "outcome_link": {
          "description": "Bet-slip deep link, synthesized by the API when ProphetX gives it the ids.",
          "type": "string"
        }
      },
      "type": "object",
      "x-owls-required": [
        "id"
      ]
    },
    "ProphetXRawEvent": {
      "description": "Raw ProphetX event metadata. The stable top-level fields are typed\n(id, name, sport, tournament, competitors, etc.) while ProphetX's other\nextension fields pass through via the index signature. Matches the shape\nof `ProphetXEvent` in the nba-odds-app source of truth.",
      "properties": {
        "competitors": {
          "items": {
            "$ref": "#/$defs/ProphetXCompetitor"
          },
          "type": "array"
        },
        "displayName": {
          "type": "string"
        },
        "id": {
          "format": "double",
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "scheduled": {
          "description": "ISO 8601 timestamp — event start time.",
          "type": "string"
        },
        "sport": {
          "properties": {
            "id": {
              "format": "double",
              "type": "number"
            },
            "name": {
              "type": "string"
            }
          },
          "type": "object",
          "x-owls-required": [
            "id",
            "name"
          ]
        },
        "status": {
          "description": "ProphetX status string (e.g. `not_started`, `live`, `ended`, `closed`).",
          "type": "string"
        },
        "tournament": {
          "properties": {
            "id": {
              "format": "double",
              "type": "number"
            },
            "name": {
              "type": "string"
            }
          },
          "type": "object",
          "x-owls-required": [
            "id",
            "name"
          ]
        }
      },
      "type": "object",
      "x-owls-required": [
        "id",
        "name",
        "sport",
        "tournament",
        "scheduled",
        "status",
        "competitors"
      ]
    },
    "ProphetXSelectionLevel": {
      "description": "One resting price level on one side of a ProphetX market.",
      "properties": {
        "abbreviatedName": {
          "type": "string"
        },
        "competitorId": {
          "description": "Present on team markets.",
          "format": "double",
          "type": "number"
        },
        "displayLine": {
          "type": "string"
        },
        "displayName": {
          "type": "string"
        },
        "displayOdds": {
          "type": "string"
        },
        "id": {
          "description": "Outcome id — equals `outcomes[i].id` for the side this level sits in.",
          "format": "double",
          "type": "number"
        },
        "line": {
          "description": "Spread or total for this level; 0 on moneylines.",
          "format": "double",
          "type": "number"
        },
        "lineID": {
          "description": "ProphetX line id; also used by `outcome_link`.",
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "odds": {
          "description": "American odds, integer (e.g. -162, 142).",
          "format": "double",
          "type": "number"
        },
        "stake": {
          "description": "The resting order's stake as ProphetX reports it. Equals what `value`\nwins on an untouched order, but stays at the original figure after a\npartial fill — derive payout from `value` and `odds`, not from this.",
          "format": "double",
          "type": "number"
        },
        "value": {
          "description": "Amount available for YOU to bet at this price right now, in dollars.",
          "format": "double",
          "type": "number"
        }
      },
      "type": "object",
      "x-owls-required": [
        "id",
        "odds",
        "line",
        "value",
        "stake",
        "lineID"
      ]
    },
    "ProphetXSnapshot": {
      "properties": {
        "sports": {
          "additionalProperties": {
            "items": {
              "$ref": "#/$defs/ProphetXEventData"
            },
            "type": "array"
          },
          "description": "Keyed by raw ProphetX sport name — e.g. `Basketball`, `Ice Hockey`, `Golf`.",
          "type": "object"
        },
        "timestamp": {
          "description": "ISO timestamp of the snapshot.",
          "type": "string"
        },
        "totalEvents": {
          "description": "Total number of events across all sports in the response.",
          "format": "double",
          "type": "number"
        }
      },
      "type": "object",
      "x-owls-required": [
        "sports",
        "timestamp",
        "totalEvents"
      ]
    },
    "ProphetXSportSlug": {
      "description": "Valid ProphetX sport slugs accepted by REST filter and WS subscription.",
      "type": "string",
      "x-extensible-enum": [
        "american_football",
        "baseball",
        "basketball",
        "boxing",
        "cross_sport",
        "golf",
        "ice_hockey",
        "mma",
        "motorsport",
        "soccer",
        "tennis"
      ]
    }
  }
}