{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/owlsinsight-com/json-schema/owlsinsight-com-v2-book-response-schema.json",
  "title": "V2BookResponse",
  "description": "Any v2 book's raw board. `data` is keyed by the book's market or event id and holds the book's own JSON. `league` is null on a merged response, which then lists `leagues`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/owlsinsight-com-source-api-v2-api-openapi.yml#/components/schemas/V2BookResponse",
  "properties": {
    "data": {
      "$ref": "#/$defs/RawJson"
    },
    "etag": {
      "type": "string"
    },
    "league": {
      "type": [
        "string",
        "null"
      ]
    },
    "leagues": {
      "items": {
        "$ref": "#/$defs/V2LeagueSlice"
      },
      "type": "array"
    },
    "marketCount": {
      "format": "double",
      "type": "number"
    },
    "meta": {
      "$ref": "#/$defs/V2Meta"
    },
    "sport": {
      "type": "string"
    },
    "success": {
      "type": "boolean"
    }
  },
  "type": "object",
  "$defs": {
    "RawJson": {
      "description": "The book's own JSON, served verbatim. Decode without strict typing."
    },
    "V2LeagueSlice": {
      "description": "One league's share of a merged response: the `data` keys it contributed.",
      "properties": {
        "leagueKey": {
          "type": "string"
        },
        "leagueName": {
          "type": "string"
        },
        "marketCount": {
          "format": "double",
          "type": "number"
        },
        "marketIds": {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    },
    "V2Meta": {
      "properties": {
        "ageSeconds": {
          "format": "double",
          "type": "number"
        },
        "cacheTimestamp": {
          "type": "string"
        },
        "cached": {
          "type": "boolean"
        },
        "duplicateMarketIdsDropped": {
          "format": "double",
          "type": "number"
        },
        "leagueCount": {
          "format": "double",
          "type": "number"
        },
        "leaguesOmitted": {
          "format": "double",
          "type": "number"
        },
        "marketsOmitted": {
          "format": "double",
          "type": "number"
        },
        "merged": {
          "type": "boolean"
        },
        "source": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "x-extensible-enum": [
            "no-data",
            "ok",
            "partial",
            "stale"
          ]
        },
        "timestamp": {
          "type": "string"
        },
        "truncated": {
          "type": "boolean"
        }
      },
      "type": "object"
    }
  }
}