{
  "asyncapi": "3.0.0",
  "info": {
    "title": "Lineval API stream",
    "version": "1.0.0",
    "description": "The stream of the Lineval API. The integration guide explains snapshots, deltas, resuming with `since` and close codes."
  },
  "servers": {
    "production": {
      "host": "api.lineval.com",
      "pathname": "/",
      "protocol": "wss",
      "security": [
        {
          "$ref": "#/components/securitySchemes/bearer"
        }
      ]
    }
  },
  "channels": {
    "stream": {
      "address": "/v1/stream",
      "description": "Query: products (required), sports, leagues (sport, league kept for compatibility), events, marketTypes, periods, groups, confidence (scores: confirmed), gradingProducts (grading: live, pregame, props; by default every product of lines your key includes), since (e.g. live:123,pregame:456).",
      "messages": {
        "snapshot_begin": {
          "$ref": "#/components/messages/snapshot_begin"
        },
        "snapshot": {
          "$ref": "#/components/messages/snapshot"
        },
        "snapshot_end": {
          "$ref": "#/components/messages/snapshot_end"
        },
        "event_upsert": {
          "$ref": "#/components/messages/event_upsert"
        },
        "event_remove": {
          "$ref": "#/components/messages/event_remove"
        },
        "market_upsert": {
          "$ref": "#/components/messages/market_upsert"
        },
        "market_remove": {
          "$ref": "#/components/messages/market_remove"
        },
        "result": {
          "$ref": "#/components/messages/result"
        },
        "grading": {
          "$ref": "#/components/messages/grading"
        },
        "scoresheet": {
          "$ref": "#/components/messages/scoresheet"
        },
        "scoresheet_withdrawn": {
          "$ref": "#/components/messages/scoresheet_withdrawn"
        },
        "feed_status": {
          "$ref": "#/components/messages/feed_status"
        },
        "heartbeat": {
          "$ref": "#/components/messages/heartbeat"
        }
      },
      "x-close-codes": [
        {
          "code": 1000,
          "meaning": "Closed normally, by you or by a proxy on the way",
          "action": "If you still want the stream, reconnect with `since`",
          "reconnect": true
        },
        {
          "code": 1001,
          "meaning": "A server or a proxy on the way is shutting down",
          "action": "Reconnect with `since`, after a short random wait (up to 1 s)",
          "reconnect": true
        },
        {
          "code": 1006,
          "meaning": "Never sent: your library reports it when the connection dropped with no close frame (network, proxy)",
          "action": "Reconnect with `since`, with back-off",
          "reconnect": true
        },
        {
          "code": 1011,
          "meaning": "An error of ours while serving the stream",
          "action": "Reconnect with `since`, with back-off; tell us if it repeats",
          "reconnect": true
        },
        {
          "code": 1012,
          "meaning": "The server is restarting (a deploy); another server takes your reconnect",
          "action": "Reconnect with `since` at once, after a random wait of up to 1 s",
          "reconnect": true
        },
        {
          "code": 1013,
          "meaning": "Starting up, or re-synced with its sources: what you hold may not match",
          "action": "Reconnect with `since`, after a short back-off",
          "reconnect": true
        },
        {
          "code": 4400,
          "meaning": "A query parameter is not valid; the reason names it",
          "action": "Do not retry the same URL: fix the request",
          "reconnect": false
        },
        {
          "code": 4401,
          "meaning": "No key, an unknown key, or a key revoked while connected",
          "action": "Do not retry: check your key with us",
          "reconnect": false
        },
        {
          "code": 4403,
          "meaning": "Your key does not include a product you asked for (or lost it)",
          "action": "Reconnect without that product, or ask us to add it",
          "reconnect": false
        },
        {
          "code": 4429,
          "meaning": "Either you were not keeping up (reason: `not keeping up with the stream`) or you are over your connection limit (reason: `over your connection limit`)",
          "action": "Not keeping up: reconnect with `since` and process faster. Connection limit: close another connection, or wait 30 s before retrying",
          "reconnect": true
        }
      ]
    }
  },
  "operations": {
    "stream": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/stream"
      },
      "summary": "The server sends these messages to the client"
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "httpApiKey",
        "name": "Authorization",
        "in": "header",
        "description": "Authorization: Bearer <key>, or the key as the WebSocket subprotocol (browsers)"
      }
    },
    "messages": {
      "snapshot_begin": {
        "name": "snapshot.begin",
        "summary": "A full snapshot of the product follows",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "snapshot.begin"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "type": "object"
            }
          }
        }
      },
      "snapshot": {
        "name": "snapshot",
        "summary": "One event with all its markets",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "snapshot"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "$ref": "#/components/schemas/EventWithMarkets"
            }
          }
        }
      },
      "snapshot_end": {
        "name": "snapshot.end",
        "summary": "The snapshot is complete; deltas follow",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "snapshot.end"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "type": "object",
              "properties": {
                "since": {
                  "type": "integer"
                }
              }
            }
          }
        }
      },
      "event_upsert": {
        "name": "event.upsert",
        "summary": "Add or replace an event (its markets stay)",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "event.upsert"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "$ref": "#/components/schemas/Event"
            }
          }
        }
      },
      "event_remove": {
        "name": "event.remove",
        "summary": "Drop an event and its markets",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "event.remove"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "type": "object",
              "properties": {
                "eventId": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "market_upsert": {
        "name": "market.upsert",
        "summary": "Add or replace a whole market",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "market.upsert"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "$ref": "#/components/schemas/Market"
            }
          }
        }
      },
      "market_remove": {
        "name": "market.remove",
        "summary": "Drop a market",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "market.remove"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "type": "object",
              "properties": {
                "eventId": {
                  "type": "string"
                },
                "marketId": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "result": {
        "name": "result",
        "summary": "An event's result, replacing any earlier one (racing). In a snapshot it follows its event",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "result"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "$ref": "#/components/schemas/Result"
            }
          }
        }
      },
      "grading": {
        "name": "grading",
        "summary": "Our verdicts on one product of lines of a game, replacing any earlier revision (grading). Only the products of lines your key includes",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "grading"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "$ref": "#/components/schemas/Grading"
            }
          }
        }
      },
      "scoresheet": {
        "name": "scoresheet",
        "summary": "A game's scoresheet, replacing any earlier revision (scores). In a snapshot it follows its event while the event is on the board",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "scoresheet"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "$ref": "#/components/schemas/Scoresheet"
            }
          }
        }
      },
      "scoresheet_withdrawn": {
        "name": "scoresheet.withdrawn",
        "summary": "A confirmed scoresheet is no longer confirmed (scores). Sent to every client whose filters include the game, also to one that asks for confirmed scoresheets only. Not in a snapshot",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "scoresheet.withdrawn"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "$ref": "#/components/schemas/ScoresheetWithdrawn"
            }
          }
        }
      },
      "feed_status": {
        "name": "feed.status",
        "summary": "ok, or degraded: treat open markets as suspended until ok",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "feed.status"
            },
            "seq": {
              "type": "integer",
              "description": "A point in the product's sequence, where to resume. After a snapshot, higher on every change; snapshot.begin, snapshot.end and feed.status carry the seq of the point they mark, which the message before may have too; inside a snapshot, each event's own, never higher than the snapshot's since"
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "string",
              "enum": [
                "live",
                "pregame",
                "props",
                "futures",
                "racing",
                "scores",
                "grading"
              ]
            },
            "data": {
              "type": "object",
              "properties": {
                "state": {
                  "enum": [
                    "ok",
                    "degraded"
                  ]
                }
              }
            }
          }
        }
      },
      "heartbeat": {
        "name": "heartbeat",
        "summary": "Sent every 15 s when nothing else is",
        "payload": {
          "type": "object",
          "required": [
            "type",
            "seq",
            "ts",
            "product",
            "data"
          ],
          "properties": {
            "type": {
              "const": "heartbeat"
            },
            "seq": {
              "type": [
                "integer",
                "null"
              ]
            },
            "ts": {
              "type": "string",
              "format": "date-time"
            },
            "product": {
              "type": "null"
            },
            "data": {
              "type": "object"
            }
          }
        }
      }
    },
    "schemas": {
      "Appearance": {
        "additionalProperties": false,
        "description": "One player's part in the game as the lineups give it: a fact, with how many sources give it.\nNo rule is applied: whether a prop of a player who did not play is void is the grading's.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "participantId": {
            "description": "The player's par_ id, the one player markets use when they spell the name as the lineup does",
            "title": "Participantid",
            "type": "string"
          },
          "team": {
            "$ref": "#/components/schemas/TeamSide"
          },
          "status": {
            "$ref": "#/components/schemas/AppearanceStatus",
            "description": "started; came_on: a substitute who came on; unused: on the bench and never came on. The status most sources give"
          },
          "minute": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "came_on: the minute he came on, as the game clock gives it, stoppage time apart (90+5 is minute 90, addedTime 5); null otherwise or when not given",
            "title": "Minute"
          },
          "addedTime": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Addedtime"
          },
          "sources": {
            "$ref": "#/components/schemas/SourceCount",
            "description": "agreeing: sources that give this status; disagreeing: sources that give him another"
          }
        },
        "required": [
          "name",
          "participantId",
          "team",
          "status",
          "sources"
        ],
        "title": "Appearance",
        "type": "object"
      },
      "AppearanceStatus": {
        "enum": [
          "started",
          "came_on",
          "unused"
        ],
        "title": "AppearanceStatus",
        "type": "string"
      },
      "BookRef": {
        "additionalProperties": false,
        "description": "The sportsbook whose line a market is: from /v1/catalog/books.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "BookRef",
        "type": "object"
      },
      "Clock": {
        "additionalProperties": false,
        "properties": {
          "period": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Current period id",
            "title": "Period"
          },
          "seconds": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Elapsed seconds in the period",
            "title": "Seconds"
          },
          "running": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Running"
          }
        },
        "title": "Clock",
        "type": "object"
      },
      "Confidence": {
        "description": "``confirmed``: two sources or more agree. ``provisional``: one says so. ``disputed``:\nthey disagree. Settle only on ``confirmed``.",
        "enum": [
          "confirmed",
          "provisional",
          "disputed"
        ],
        "title": "Confidence",
        "type": "string"
      },
      "Dividend": {
        "additionalProperties": false,
        "description": "What one winning combination of a pool pays. Pay ``stake / base * paid``.",
        "properties": {
          "marketType": {
            "description": "Market type id from /v1/catalog/market-types",
            "title": "Markettype",
            "type": "string"
          },
          "marketId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The market it settles; null when no market was published for that pool",
            "title": "Marketid"
          },
          "legs": {
            "description": "The winning combination; empty on a carryover",
            "items": {
              "$ref": "#/components/schemas/DividendLeg"
            },
            "title": "Legs",
            "type": "array"
          },
          "base": {
            "description": "The stake the dividend is quoted for. It differs by pool and by country (2.00, 1.00, 0.50, 0.20, 0.10\u2026): never assume it",
            "title": "Base",
            "type": "number"
          },
          "paid": {
            "description": "Paid per base staked, stake included; 0 on a carryover",
            "title": "Paid",
            "type": "number"
          },
          "note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'5 OF 6': a consolation dividend; 'CARRYOVER': nobody won and the pool carries over, so these bets lose",
            "title": "Note"
          }
        },
        "required": [
          "marketType",
          "legs",
          "base",
          "paid"
        ],
        "title": "Dividend",
        "type": "object"
      },
      "DividendLeg": {
        "additionalProperties": false,
        "description": "One position (single-race pools) or one race (multi-race pools) of a winning combination.",
        "properties": {
          "eventId": {
            "description": "The race of this leg",
            "title": "Eventid",
            "type": "string"
          },
          "numbers": {
            "description": "The runners that count here: more than one on a dead heat or a coupled entry; empty when anyRunner",
            "items": {
              "type": "string"
            },
            "title": "Numbers",
            "type": "array"
          },
          "participantIds": {
            "description": "The par_ ids of those runners that the race card listed",
            "items": {
              "type": "string"
            },
            "title": "Participantids",
            "type": "array"
          },
          "anyRunner": {
            "description": "Every runner counts in this leg (a race not run, or 'all')",
            "title": "Anyrunner",
            "type": "boolean"
          }
        },
        "required": [
          "eventId",
          "numbers",
          "participantIds",
          "anyRunner"
        ],
        "title": "DividendLeg",
        "type": "object"
      },
      "Event": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "sport": {
            "$ref": "#/components/schemas/Ref"
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "participants": {
            "items": {
              "$ref": "#/components/schemas/Participant"
            },
            "title": "Participants",
            "type": "array"
          },
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Startat"
          },
          "status": {
            "$ref": "#/components/schemas/EventStatus"
          },
          "score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Score"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "clock": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Clock"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Product specific. Racing: a RaceDetails (race number, distance, surface)",
            "title": "Details"
          },
          "rotation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Rotation"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Games with a home and an away side (live, pregame, props and the scores board); null elsewhere"
          },
          "schedule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schedule"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Live, pregame, props, futures and the scores board; null in racing"
          }
        },
        "required": [
          "id",
          "product",
          "sport",
          "league",
          "name",
          "participants",
          "status",
          "updatedAt"
        ],
        "title": "Event",
        "type": "object"
      },
      "EventStatus": {
        "enum": [
          "scheduled",
          "live",
          "interrupted",
          "finished",
          "postponed",
          "cancelled",
          "abandoned"
        ],
        "title": "EventStatus",
        "type": "string"
      },
      "EventWithMarkets": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/Product"
          },
          "sport": {
            "$ref": "#/components/schemas/Ref"
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "participants": {
            "items": {
              "$ref": "#/components/schemas/Participant"
            },
            "title": "Participants",
            "type": "array"
          },
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Startat"
          },
          "status": {
            "$ref": "#/components/schemas/EventStatus"
          },
          "score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Score"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "clock": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Clock"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string"
          },
          "details": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Product specific. Racing: a RaceDetails (race number, distance, surface)",
            "title": "Details"
          },
          "rotation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Rotation"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Games with a home and an away side (live, pregame, props and the scores board); null elsewhere"
          },
          "schedule": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Schedule"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Live, pregame, props, futures and the scores board; null in racing"
          },
          "markets": {
            "items": {
              "$ref": "#/components/schemas/Market"
            },
            "title": "Markets",
            "type": "array"
          }
        },
        "required": [
          "id",
          "product",
          "sport",
          "league",
          "name",
          "participants",
          "status",
          "updatedAt",
          "markets"
        ],
        "title": "EventWithMarkets",
        "type": "object"
      },
      "Finisher": {
        "additionalProperties": false,
        "properties": {
          "number": {
            "description": "Saddle cloth or trap number",
            "title": "Number",
            "type": "string"
          },
          "participantId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The runner's par_ id in the event; null when the race card did not list it",
            "title": "Participantid"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "position": {
            "description": "1, 2, 3; two runners share a position on a dead heat",
            "title": "Position",
            "type": "integer"
          }
        },
        "required": [
          "number",
          "name",
          "position"
        ],
        "title": "Finisher",
        "type": "object"
      },
      "Grading": {
        "additionalProperties": false,
        "description": "Our verdicts on the selections of one product of lines for one game. A new revision\nreplaces it whole.",
        "properties": {
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "product": {
            "$ref": "#/components/schemas/Product",
            "description": "The product of lines graded: live, pregame or props"
          },
          "sport": {
            "$ref": "#/components/schemas/Ref"
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "basis": {
            "description": "The revision of the game's scoresheet these verdicts were reached on",
            "title": "Basis",
            "type": "integer"
          },
          "rules": {
            "description": "The version of our rules applied, published in the guide",
            "title": "Rules",
            "type": "string"
          },
          "markets": {
            "description": "The selections with a verdict, by market, with the ids of the product's lines",
            "items": {
              "$ref": "#/components/schemas/MarketResult"
            },
            "title": "Markets",
            "type": "array"
          },
          "held": {
            "description": "The selections without a verdict yet, and why",
            "items": {
              "$ref": "#/components/schemas/HeldSelection"
            },
            "title": "Held",
            "type": "array"
          },
          "complete": {
            "description": "Every selection we grade has its verdict: nothing held, nothing left out (market types we do not grade are never listed). Markets we leave out without a verdict do not count: true says nothing about them",
            "title": "Complete",
            "type": "boolean"
          },
          "revision": {
            "description": "Grows with every change (it may skip numbers): a higher one replaces a lower one",
            "title": "Revision",
            "type": "integer"
          },
          "corrected": {
            "description": "A verdict published before changed or was withdrawn: anything settled on it must be checked",
            "title": "Corrected",
            "type": "boolean"
          },
          "updatedAt": {
            "description": "When this revision was published: what updatedSince filters on",
            "title": "Updatedat",
            "type": "string"
          }
        },
        "required": [
          "eventId",
          "product",
          "sport",
          "league",
          "basis",
          "rules",
          "markets",
          "held",
          "complete",
          "revision",
          "corrected",
          "updatedAt"
        ],
        "title": "Grading",
        "type": "object"
      },
      "HeldMarket": {
        "additionalProperties": false,
        "description": "A market of the race not settled yet: neither paid nor refunded in this result.",
        "properties": {
          "marketType": {
            "title": "Markettype",
            "type": "string"
          },
          "marketId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Marketid"
          },
          "reason": {
            "description": "Why it waits: awaiting_official_dividend (a pick 5 or pick 6 taken from the track's published program, whose official dividend or carryover can come after the race's final result)",
            "title": "Reason",
            "type": "string"
          },
          "until": {
            "description": "When it stops waiting, ISO 8601 in UTC. By then a corrected result either pays it or lists it in refunds",
            "title": "Until",
            "type": "string"
          }
        },
        "required": [
          "marketType",
          "reason",
          "until"
        ],
        "title": "HeldMarket",
        "type": "object"
      },
      "HeldSelection": {
        "additionalProperties": false,
        "properties": {
          "marketId": {
            "title": "Marketid",
            "type": "string"
          },
          "selectionId": {
            "title": "Selectionid",
            "type": "string"
          },
          "reason": {
            "description": "Why it has no verdict yet (see the guide, 'Grading'): awaiting_second_source, sources_disagree, regulation_unknown, props_on_hold, no_boxscore\u2026",
            "title": "Reason",
            "type": "string"
          }
        },
        "required": [
          "marketId",
          "selectionId",
          "reason"
        ],
        "title": "HeldSelection",
        "type": "object"
      },
      "League": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "ISO 3166-1 alpha-2, or null",
            "title": "Country"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "League",
        "type": "object"
      },
      "Market": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "type": {
            "description": "Market type id from /v1/catalog/market-types",
            "title": "Type",
            "type": "string"
          },
          "name": {
            "description": "Display name, in English",
            "title": "Name",
            "type": "string"
          },
          "period": {
            "description": "Period id from /v1/catalog/periods",
            "title": "Period",
            "type": "string"
          },
          "line": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Line"
          },
          "participant": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ParticipantRef"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The team or player the market is about (team totals, player props)"
          },
          "main": {
            "default": true,
            "description": "False on alternate lines",
            "title": "Main",
            "type": "boolean"
          },
          "book": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/BookRef"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The sportsbook whose line this is; null on our own lines. A book's main market keeps its id while its line moves"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "selections": {
            "items": {
              "$ref": "#/components/schemas/Selection"
            },
            "title": "Selections",
            "type": "array"
          },
          "updatedAt": {
            "title": "Updatedat",
            "type": "string"
          },
          "legs": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing: how many runners one combination names, in order for exacta (2), trifecta (3)\u2026; on a multi-race pool, how many races (pick 4: 4). null elsewhere",
            "title": "Legs"
          },
          "raceEventIds": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing multi-race pools: the races the pool covers, in order; the first is this market's event. null elsewhere",
            "title": "Raceeventids"
          }
        },
        "required": [
          "id",
          "eventId",
          "type",
          "name",
          "period",
          "status",
          "selections",
          "updatedAt"
        ],
        "title": "Market",
        "type": "object"
      },
      "MarketResult": {
        "additionalProperties": false,
        "properties": {
          "marketId": {
            "title": "Marketid",
            "type": "string"
          },
          "selections": {
            "items": {
              "$ref": "#/components/schemas/SelectionResult"
            },
            "title": "Selections",
            "type": "array"
          }
        },
        "required": [
          "marketId",
          "selections"
        ],
        "title": "MarketResult",
        "type": "object"
      },
      "Outcome": {
        "enum": [
          "win",
          "lose",
          "push",
          "half_win",
          "half_lose",
          "void"
        ],
        "title": "Outcome",
        "type": "string"
      },
      "Participant": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "role": {
            "$ref": "#/components/schemas/Role"
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Saddle cloth, trap or shirt number",
            "title": "Number"
          },
          "details": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Product specific. Racing: a RunnerDetails (jockey, trainer, weight, scratched, morning line)",
            "title": "Details"
          }
        },
        "required": [
          "id",
          "name",
          "role"
        ],
        "title": "Participant",
        "type": "object"
      },
      "ParticipantRef": {
        "additionalProperties": false,
        "description": "The team, player or competitor a market or selection is about.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing: the runner's saddle cloth or trap number; null elsewhere",
            "title": "Number"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "ParticipantRef",
        "type": "object"
      },
      "PeriodScore": {
        "additionalProperties": false,
        "properties": {
          "period": {
            "description": "Period id from /v1/catalog/periods",
            "title": "Period",
            "type": "string"
          },
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          }
        },
        "required": [
          "period"
        ],
        "title": "PeriodScore",
        "type": "object"
      },
      "PlayerLine": {
        "additionalProperties": false,
        "description": "One player's boxscore.",
        "properties": {
          "name": {
            "title": "Name",
            "type": "string"
          },
          "participantId": {
            "description": "The player's par_ id, the one player markets use when they spell the name as the boxscore does",
            "title": "Participantid",
            "type": "string"
          },
          "team": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/TeamSide"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "null when the boxscore does not say"
          },
          "stats": {
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "number"
                }
              ]
            },
            "description": "Stat key id from /v1/catalog/stat-keys -> value",
            "title": "Stats",
            "type": "object"
          }
        },
        "required": [
          "name",
          "participantId",
          "stats"
        ],
        "title": "PlayerLine",
        "type": "object"
      },
      "Price": {
        "additionalProperties": false,
        "properties": {
          "decimal": {
            "examples": [
              1.909
            ],
            "exclusiveMinimum": 1.0,
            "title": "Decimal",
            "type": "number"
          },
          "american": {
            "examples": [
              -110
            ],
            "title": "American",
            "type": "integer"
          }
        },
        "required": [
          "decimal",
          "american"
        ],
        "title": "Price",
        "type": "object"
      },
      "Product": {
        "enum": [
          "live",
          "pregame",
          "props",
          "futures",
          "racing",
          "scores",
          "grading"
        ],
        "title": "Product",
        "type": "string"
      },
      "Quote": {
        "additionalProperties": false,
        "description": "A line and its price at one moment: the book's opening line.",
        "properties": {
          "line": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Line"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "at": {
            "description": "When the line was posted",
            "title": "At",
            "type": "string"
          }
        },
        "required": [
          "at"
        ],
        "title": "Quote",
        "type": "object"
      },
      "RaceDetails": {
        "additionalProperties": false,
        "description": "``Event.details`` of a race.",
        "properties": {
          "raceNumber": {
            "title": "Racenumber",
            "type": "integer"
          },
          "distance": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "As the track states it: '6 1/2 Furlongs', '480m'",
            "title": "Distance"
          },
          "surface": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "'Dirt', 'Turf'\u2026; null when not stated",
            "title": "Surface"
          }
        },
        "required": [
          "raceNumber"
        ],
        "title": "RaceDetails",
        "type": "object"
      },
      "RacingResult": {
        "additionalProperties": false,
        "description": "``Result.racing``: the official numbers of a race.",
        "properties": {
          "final": {
            "description": "Settle only on true. false is provisional: show it, never settle on it",
            "title": "Final",
            "type": "boolean"
          },
          "corrected": {
            "description": "These numbers replace ones already published as final: anything settled on those must be checked",
            "title": "Corrected",
            "type": "boolean"
          },
          "offAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "When the race actually started: void any bet accepted after it; null when not known",
            "title": "Offat"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "ISO 4217 code of the dividends, when stated",
            "title": "Currency"
          },
          "finishers": {
            "description": "Positions 1 to 3 (4 where a place pays 4); empty when the race was not run",
            "items": {
              "$ref": "#/components/schemas/Finisher"
            },
            "title": "Finishers",
            "type": "array"
          },
          "dividends": {
            "description": "Win, place and show dividends and every pool that ends in this race. A pool can pay several (dead heats, consolations)",
            "items": {
              "$ref": "#/components/schemas/Dividend"
            },
            "title": "Dividends",
            "type": "array"
          },
          "refunds": {
            "items": {
              "$ref": "#/components/schemas/Refund"
            },
            "title": "Refunds",
            "type": "array"
          },
          "held": {
            "description": "Markets not settled yet: do not settle or refund them until a later result pays or refunds them",
            "items": {
              "$ref": "#/components/schemas/HeldMarket"
            },
            "title": "Held",
            "type": "array"
          },
          "scratched": {
            "items": {
              "$ref": "#/components/schemas/RunnerRef"
            },
            "title": "Scratched",
            "type": "array"
          }
        },
        "required": [
          "final",
          "corrected",
          "finishers",
          "dividends",
          "refunds",
          "scratched"
        ],
        "title": "RacingResult",
        "type": "object"
      },
      "Range": {
        "additionalProperties": false,
        "properties": {
          "min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Min"
          },
          "max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Max"
          }
        },
        "title": "Range",
        "type": "object"
      },
      "Ref": {
        "additionalProperties": false,
        "description": "A catalog entry referenced from an event: id from ``/v1/catalog`` plus its name.",
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "title": "Ref",
        "type": "object"
      },
      "Refund": {
        "additionalProperties": false,
        "description": "A pool the track refunded: every bet on it gets its stake back.",
        "properties": {
          "marketType": {
            "title": "Markettype",
            "type": "string"
          },
          "marketId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Marketid"
          }
        },
        "required": [
          "marketType"
        ],
        "title": "Refund",
        "type": "object"
      },
      "Regulation": {
        "additionalProperties": false,
        "description": "A game whose final may not be its score at the end of regulation time: that score, and\nhow the game went on. Every field null: the records do not say whether it went past\nregulation time; do not settle a regulation-time market on the final.",
        "properties": {
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "At the end of regulation time; null when not known for certain",
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          },
          "wentTo": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WentTo"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "null when the records do not say: overtime or the shootout in ice hockey, or not even whether it went past regulation time"
          },
          "shootout": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScorePair"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Penalties scored in the shootout; null without one"
          }
        },
        "title": "Regulation",
        "type": "object"
      },
      "Result": {
        "additionalProperties": false,
        "properties": {
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/EventStatus"
          },
          "score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Score"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "markets": {
            "items": {
              "$ref": "#/components/schemas/MarketResult"
            },
            "title": "Markets",
            "type": "array"
          },
          "settledAt": {
            "title": "Settledat",
            "type": "string"
          },
          "racing": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RacingResult"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing: finishers, dividends, refunds and scratches; null elsewhere"
          },
          "sport": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Ref"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The event's sport: a result outlives its event (racing)"
          },
          "league": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/League"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The event's league (the track, in racing)"
          }
        },
        "required": [
          "eventId",
          "status",
          "markets",
          "settledAt"
        ],
        "title": "Result",
        "type": "object"
      },
      "Role": {
        "enum": [
          "home",
          "away",
          "competitor",
          "runner",
          "player"
        ],
        "title": "Role",
        "type": "string"
      },
      "Rotation": {
        "additionalProperties": false,
        "description": "The game's rotation numbers: what sportsbooks print on the board and the ticket. Display and\ncross-reference only, never identity: numbers are reused, and the same game keeps its evt_ id when\nthey change.",
        "properties": {
          "away": {
            "title": "Away",
            "type": "integer"
          },
          "home": {
            "title": "Home",
            "type": "integer"
          },
          "draw": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The draw's number, in games with a three-way result; null otherwise",
            "title": "Draw"
          },
          "official": {
            "description": "true: the market's own numbers. false: provisional, or assigned by us while the market has none; they may change",
            "title": "Official",
            "type": "boolean"
          },
          "added": {
            "default": false,
            "description": "true: a game the books added outside the main schedule; its numbers are the books' own",
            "title": "Added",
            "type": "boolean"
          }
        },
        "required": [
          "away",
          "home",
          "official"
        ],
        "title": "Rotation",
        "type": "object"
      },
      "RunnerDetails": {
        "additionalProperties": false,
        "description": "``Participant.details`` of a runner.",
        "properties": {
          "jockey": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The rider; the driver in harness racing; null for greyhounds",
            "title": "Jockey"
          },
          "trainer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Trainer"
          },
          "weightLb": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Weight carried, in pounds",
            "title": "Weightlb"
          },
          "medication": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "As printed in the program, e.g. 'L' (furosemide)",
            "title": "Medication"
          },
          "scratched": {
            "description": "Withdrawn: it will not run",
            "title": "Scratched",
            "type": "boolean"
          },
          "morningLine": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The track's morning line: its forecast of the odds, printed before betting opens. It is NOT a price anyone can bet at; racing pays what the pool pays"
          },
          "morningLineFraction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The morning line as printed, e.g. '9/2'",
            "title": "Morninglinefraction"
          }
        },
        "required": [
          "scratched"
        ],
        "title": "RunnerDetails",
        "type": "object"
      },
      "RunnerRef": {
        "additionalProperties": false,
        "description": "A runner named by a result.",
        "properties": {
          "number": {
            "description": "Saddle cloth or trap number",
            "title": "Number",
            "type": "string"
          },
          "participantId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The runner's par_ id in the event; null when the race card did not list it",
            "title": "Participantid"
          },
          "name": {
            "title": "Name",
            "type": "string"
          }
        },
        "required": [
          "number",
          "name"
        ],
        "title": "RunnerRef",
        "type": "object"
      },
      "Schedule": {
        "additionalProperties": false,
        "description": "When the game starts, and when it was first going to. A changed start is data, not a rule: each\nclient applies its own.",
        "properties": {
          "originalStartAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The first start time we published for this game; it never changes",
            "title": "Originalstartat"
          },
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The current start time, the same as the event's startAt",
            "title": "Startat"
          },
          "timeConfirmed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "false while the start time is still to be announced (the date is known); null when unknown",
            "title": "Timeconfirmed"
          }
        },
        "title": "Schedule",
        "type": "object"
      },
      "Score": {
        "additionalProperties": false,
        "properties": {
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          },
          "periods": {
            "items": {
              "$ref": "#/components/schemas/PeriodScore"
            },
            "title": "Periods",
            "type": "array"
          }
        },
        "title": "Score",
        "type": "object"
      },
      "ScorePair": {
        "additionalProperties": false,
        "properties": {
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          }
        },
        "title": "ScorePair",
        "type": "object"
      },
      "Scoresheet": {
        "additionalProperties": false,
        "description": "The facts of how a game ended. A new revision replaces the sheet whole.",
        "properties": {
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "sport": {
            "$ref": "#/components/schemas/Ref"
          },
          "league": {
            "$ref": "#/components/schemas/League"
          },
          "participants": {
            "description": "Home and away, as in the event",
            "items": {
              "$ref": "#/components/schemas/Participant"
            },
            "title": "Participants",
            "type": "array"
          },
          "startAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Startat"
          },
          "status": {
            "$ref": "#/components/schemas/SheetStatus"
          },
          "score": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScorePair"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The final: sets in set sports. null when the game was not played, or when one source alone says it did not finish: a score nobody saw is never published"
          },
          "periods": {
            "description": "Period ids from /v1/catalog/periods. Only the periods we are sure of: extra time and shootouts are in regulation",
            "items": {
              "$ref": "#/components/schemas/PeriodScore"
            },
            "title": "Periods",
            "type": "array"
          },
          "regulation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Regulation"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "null when the final is the score at the end of regulation time"
          },
          "stats": {
            "items": {
              "$ref": "#/components/schemas/StatLine"
            },
            "title": "Stats",
            "type": "array"
          },
          "timeline": {
            "description": "Goals and cards, in order",
            "items": {
              "$ref": "#/components/schemas/TimelineEntry"
            },
            "title": "Timeline",
            "type": "array"
          },
          "players": {
            "items": {
              "$ref": "#/components/schemas/PlayerLine"
            },
            "title": "Players",
            "type": "array"
          },
          "appearances": {
            "description": "Who started, came on or stayed on the bench, from the lineups (soccer, games with player markets that need it); empty when no lineup was read",
            "items": {
              "$ref": "#/components/schemas/Appearance"
            },
            "title": "Appearances",
            "type": "array"
          },
          "confidence": {
            "$ref": "#/components/schemas/Confidence"
          },
          "sources": {
            "$ref": "#/components/schemas/SourceCount"
          },
          "revision": {
            "description": "Grows with every change of the facts (it may skip numbers): a higher one replaces a lower one",
            "title": "Revision",
            "type": "integer"
          },
          "corrected": {
            "description": "This sheet replaces a confirmed one with other facts, or withdraws its confirmation: anything settled on that one must be checked",
            "title": "Corrected",
            "type": "boolean"
          },
          "updatedAt": {
            "description": "When this revision was published: what updatedSince filters on",
            "title": "Updatedat",
            "type": "string"
          }
        },
        "required": [
          "eventId",
          "sport",
          "league",
          "participants",
          "status",
          "periods",
          "stats",
          "timeline",
          "players",
          "confidence",
          "sources",
          "revision",
          "corrected",
          "updatedAt"
        ],
        "title": "Scoresheet",
        "type": "object"
      },
      "ScoresheetWithdrawn": {
        "additionalProperties": false,
        "description": "A scoresheet that was confirmed is no longer: a new revision of it is provisional or disputed. Sent on the\nstream of scores to every client whose filters include the game, also to one that asks for confirmed\nscoresheets only, which never gets the new revision itself: anything settled on the confirmed one must be\nchecked. Not in a snapshot.",
        "properties": {
          "eventId": {
            "title": "Eventid",
            "type": "string"
          },
          "revision": {
            "description": "The revision of the scoresheet that is no longer confirmed",
            "title": "Revision",
            "type": "integer"
          },
          "confidence": {
            "$ref": "#/components/schemas/Confidence",
            "description": "Its confidence now: provisional or disputed"
          },
          "updatedAt": {
            "description": "When that revision was published",
            "title": "Updatedat",
            "type": "string"
          }
        },
        "required": [
          "eventId",
          "revision",
          "confidence",
          "updatedAt"
        ],
        "title": "ScoresheetWithdrawn",
        "type": "object"
      },
      "Selection": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "title": "Id",
            "type": "string"
          },
          "name": {
            "description": "Display name, in English",
            "title": "Name",
            "type": "string"
          },
          "side": {
            "$ref": "#/components/schemas/Side"
          },
          "participant": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ParticipantRef"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "line": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Over/under or handicap figure",
            "title": "Line"
          },
          "range": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Range"
              },
              {
                "type": "null"
              }
            ],
            "default": null
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Price"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "null when no price is available yet; always null in racing, which is pari-mutuel"
          },
          "status": {
            "$ref": "#/components/schemas/Status"
          },
          "opening": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Quote"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "A book's market: the first line and price the book posted for this selection; null on our own lines"
          },
          "leg": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing multi-race pools: which of the market's races this runner is in, 1 for the first; null elsewhere",
            "title": "Leg"
          },
          "couplingGroup": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "Racing: runners of one race with the same coupling group are a coupled entry (1, 1A, 1X): one betting interest. A bet on any of them is a bet on the entry, and a dividend that names any of them pays it. null when the runner is not coupled, and elsewhere",
            "title": "Couplinggroup"
          }
        },
        "required": [
          "id",
          "name",
          "side",
          "status"
        ],
        "title": "Selection",
        "type": "object"
      },
      "SelectionResult": {
        "additionalProperties": false,
        "properties": {
          "selectionId": {
            "title": "Selectionid",
            "type": "string"
          },
          "outcome": {
            "$ref": "#/components/schemas/Outcome"
          },
          "deadHeatFactor": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "0\u20131 when stakes are reduced",
            "title": "Deadheatfactor"
          }
        },
        "required": [
          "selectionId",
          "outcome"
        ],
        "title": "SelectionResult",
        "type": "object"
      },
      "SheetStatus": {
        "description": "How a game ended. Only ``finished`` was played out; ``retired``, ``abandoned`` and\n``incomplete`` stopped part way (their completed periods stand); the rest were not played.",
        "enum": [
          "finished",
          "postponed",
          "cancelled",
          "abandoned",
          "retired",
          "walkover",
          "not_played",
          "incomplete"
        ],
        "title": "SheetStatus",
        "type": "string"
      },
      "Side": {
        "description": "What a selection backs. ``participant``: the selection's ``participant`` (a player,\na futures candidate); ``other``: read the selection's ``name``.",
        "enum": [
          "home",
          "away",
          "draw",
          "home_or_draw",
          "draw_or_away",
          "home_or_away",
          "over",
          "under",
          "exact",
          "range",
          "yes",
          "no",
          "odd",
          "even",
          "participant",
          "other"
        ],
        "title": "Side",
        "type": "string"
      },
      "SourceCount": {
        "additionalProperties": false,
        "properties": {
          "agreeing": {
            "description": "Sources that report this sheet's final (all that report the game, when it has no score)",
            "title": "Agreeing",
            "type": "integer"
          },
          "disagreeing": {
            "description": "Sources that report another final",
            "title": "Disagreeing",
            "type": "integer"
          }
        },
        "required": [
          "agreeing",
          "disagreeing"
        ],
        "title": "SourceCount",
        "type": "object"
      },
      "StatLine": {
        "additionalProperties": false,
        "properties": {
          "key": {
            "description": "Stat key id from /v1/catalog/stat-keys",
            "title": "Key",
            "type": "string"
          },
          "home": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Home"
          },
          "away": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Away"
          }
        },
        "required": [
          "key"
        ],
        "title": "StatLine",
        "type": "object"
      },
      "Status": {
        "description": "Of a market or a selection. ``suspended`` keeps the last price, for display;\nit cannot be bet. ``closed`` is final: the market will not reopen.",
        "enum": [
          "open",
          "suspended",
          "closed"
        ],
        "title": "Status",
        "type": "string"
      },
      "TeamSide": {
        "enum": [
          "home",
          "away"
        ],
        "title": "TeamSide",
        "type": "string"
      },
      "TimelineEntry": {
        "additionalProperties": false,
        "properties": {
          "type": {
            "$ref": "#/components/schemas/TimelineType"
          },
          "minute": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The minute as the game clock gives it; stoppage time apart (a goal at 45+2 is minute 45, addedTime 2)",
            "title": "Minute"
          },
          "addedTime": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Addedtime"
          },
          "team": {
            "$ref": "#/components/schemas/TeamSide",
            "description": "A goal: the side it counted for (an own goal counts for the opponent of the player who scored it). A card: the player's side"
          },
          "player": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "title": "Player"
          },
          "participantId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "default": null,
            "description": "The player's par_ id, the one player markets use",
            "title": "Participantid"
          },
          "ownGoal": {
            "default": false,
            "title": "Owngoal",
            "type": "boolean"
          },
          "penalty": {
            "default": false,
            "title": "Penalty",
            "type": "boolean"
          }
        },
        "required": [
          "type",
          "team"
        ],
        "title": "TimelineEntry",
        "type": "object"
      },
      "TimelineType": {
        "enum": [
          "goal",
          "yellow_card",
          "red_card"
        ],
        "title": "TimelineType",
        "type": "string"
      },
      "WentTo": {
        "enum": [
          "extra_time",
          "shootout"
        ],
        "title": "WentTo",
        "type": "string"
      }
    }
  }
}
