Models¶
The SDK uses Pydantic models for all API responses.
Core Models¶
oddsblaze.models.odds.OddsResponse
¶
Bases: BaseModel
Response from the Odds API endpoint.
Show JSON schema:
{
"$defs": {
"Event": {
"description": "A sporting event with associated odds.",
"properties": {
"id": {
"description": "Unique event identifier",
"title": "Id",
"type": "string"
},
"teams": {
"$ref": "#/$defs/Teams",
"description": "Participating teams"
},
"date": {
"description": "Event start time (UTC)",
"format": "date-time",
"title": "Date",
"type": "string"
},
"live": {
"description": "Whether the event is currently live",
"title": "Live",
"type": "boolean"
},
"odds": {
"default": [],
"description": "List of odds for this event",
"items": {
"$ref": "#/$defs/Odd"
},
"title": "Odds",
"type": "array"
}
},
"required": [
"id",
"teams",
"date",
"live"
],
"title": "Event",
"type": "object"
},
"League": {
"description": "A sports league.",
"properties": {
"id": {
"description": "Unique identifier (e.g., 'nba', 'nfl')",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full league name",
"title": "Name",
"type": "string"
},
"sport": {
"description": "Sport name (e.g., 'Basketball')",
"title": "Sport",
"type": "string"
}
},
"required": [
"id",
"name",
"sport"
],
"title": "League",
"type": "object"
},
"Links": {
"description": "Deep links to sportsbook betting slip.",
"properties": {
"desktop": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Desktop web deep link",
"title": "Desktop"
},
"mobile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Mobile app deep link",
"title": "Mobile"
}
},
"title": "Links",
"type": "object"
},
"Odd": {
"description": "Individual odds line.",
"properties": {
"id": {
"description": "Unique odds identifier",
"title": "Id",
"type": "string"
},
"market": {
"description": "Market name (e.g., 'Moneyline')",
"title": "Market",
"type": "string"
},
"name": {
"description": "Selection name (e.g., 'Celtics')",
"title": "Name",
"type": "string"
},
"price": {
"description": "Odds price in configured format",
"title": "Price",
"type": "string"
},
"main": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this is a main line",
"title": "Main"
},
"links": {
"anyOf": [
{
"$ref": "#/$defs/Links"
},
{
"type": "null"
}
],
"default": null,
"description": "Deep links to bet slip"
},
"sgp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Same Game Parlay identifier",
"title": "Sgp"
},
"selection": {
"anyOf": [
{
"$ref": "#/$defs/Selection"
},
{
"type": "null"
}
],
"default": null,
"description": "Parsed selection details"
},
"player": {
"anyOf": [
{
"$ref": "#/$defs/Player"
},
{
"type": "null"
}
],
"default": null,
"description": "Player info for props"
},
"updated": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "When this line was last updated",
"title": "Updated"
}
},
"required": [
"id",
"market",
"name",
"price"
],
"title": "Odd",
"type": "object"
},
"Player": {
"description": "A player with team information.",
"properties": {
"id": {
"description": "Unique player identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full player name",
"title": "Name",
"type": "string"
},
"position": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Player position",
"title": "Position"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Jersey number",
"title": "Number"
},
"team": {
"anyOf": [
{
"$ref": "#/$defs/Team"
},
{
"type": "null"
}
],
"default": null,
"description": "Player's team"
}
},
"required": [
"id",
"name"
],
"title": "Player",
"type": "object"
},
"Selection": {
"description": "Betting selection details.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection name (e.g., 'Over', 'Lakers')",
"title": "Name"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection side ('Over', 'Under', 'Home', 'Away')",
"title": "Side"
},
"line": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Handicap or total line",
"title": "Line"
}
},
"title": "Selection",
"type": "object"
},
"Sportsbook": {
"description": "A sportsbook.",
"properties": {
"id": {
"description": "Unique identifier (e.g., 'draftkings')",
"title": "Id",
"type": "string"
},
"name": {
"description": "Display name",
"title": "Name",
"type": "string"
},
"sgp": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether Same Game Parlay is supported",
"title": "Sgp"
}
},
"required": [
"id",
"name"
],
"title": "Sportsbook",
"type": "object"
},
"Team": {
"description": "A team.",
"properties": {
"id": {
"description": "Unique team identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full team name",
"title": "Name",
"type": "string"
},
"abbreviation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Team abbreviation (e.g., 'BOS')",
"title": "Abbreviation"
}
},
"required": [
"id",
"name"
],
"title": "Team",
"type": "object"
},
"Teams": {
"description": "Away and home teams for an event.",
"properties": {
"away": {
"$ref": "#/$defs/Team",
"description": "Away team"
},
"home": {
"$ref": "#/$defs/Team",
"description": "Home team"
}
},
"required": [
"away",
"home"
],
"title": "Teams",
"type": "object"
}
},
"description": "Response from the Odds API endpoint.",
"properties": {
"updated": {
"description": "Response generation timestamp",
"format": "date-time",
"title": "Updated",
"type": "string"
},
"league": {
"$ref": "#/$defs/League",
"description": "League information"
},
"sportsbook": {
"$ref": "#/$defs/Sportsbook",
"description": "Sportsbook information"
},
"events": {
"default": [],
"description": "List of events with odds",
"items": {
"$ref": "#/$defs/Event"
},
"title": "Events",
"type": "array"
}
},
"required": [
"updated",
"league",
"sportsbook"
],
"title": "OddsResponse",
"type": "object"
}
Fields:
-
updated(datetime) -
league(League) -
sportsbook(Sportsbook) -
events(list[Event])
oddsblaze.models.odds.Event
¶
Bases: BaseModel
A sporting event with associated odds.
Show JSON schema:
{
"$defs": {
"Links": {
"description": "Deep links to sportsbook betting slip.",
"properties": {
"desktop": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Desktop web deep link",
"title": "Desktop"
},
"mobile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Mobile app deep link",
"title": "Mobile"
}
},
"title": "Links",
"type": "object"
},
"Odd": {
"description": "Individual odds line.",
"properties": {
"id": {
"description": "Unique odds identifier",
"title": "Id",
"type": "string"
},
"market": {
"description": "Market name (e.g., 'Moneyline')",
"title": "Market",
"type": "string"
},
"name": {
"description": "Selection name (e.g., 'Celtics')",
"title": "Name",
"type": "string"
},
"price": {
"description": "Odds price in configured format",
"title": "Price",
"type": "string"
},
"main": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this is a main line",
"title": "Main"
},
"links": {
"anyOf": [
{
"$ref": "#/$defs/Links"
},
{
"type": "null"
}
],
"default": null,
"description": "Deep links to bet slip"
},
"sgp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Same Game Parlay identifier",
"title": "Sgp"
},
"selection": {
"anyOf": [
{
"$ref": "#/$defs/Selection"
},
{
"type": "null"
}
],
"default": null,
"description": "Parsed selection details"
},
"player": {
"anyOf": [
{
"$ref": "#/$defs/Player"
},
{
"type": "null"
}
],
"default": null,
"description": "Player info for props"
},
"updated": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "When this line was last updated",
"title": "Updated"
}
},
"required": [
"id",
"market",
"name",
"price"
],
"title": "Odd",
"type": "object"
},
"Player": {
"description": "A player with team information.",
"properties": {
"id": {
"description": "Unique player identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full player name",
"title": "Name",
"type": "string"
},
"position": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Player position",
"title": "Position"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Jersey number",
"title": "Number"
},
"team": {
"anyOf": [
{
"$ref": "#/$defs/Team"
},
{
"type": "null"
}
],
"default": null,
"description": "Player's team"
}
},
"required": [
"id",
"name"
],
"title": "Player",
"type": "object"
},
"Selection": {
"description": "Betting selection details.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection name (e.g., 'Over', 'Lakers')",
"title": "Name"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection side ('Over', 'Under', 'Home', 'Away')",
"title": "Side"
},
"line": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Handicap or total line",
"title": "Line"
}
},
"title": "Selection",
"type": "object"
},
"Team": {
"description": "A team.",
"properties": {
"id": {
"description": "Unique team identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full team name",
"title": "Name",
"type": "string"
},
"abbreviation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Team abbreviation (e.g., 'BOS')",
"title": "Abbreviation"
}
},
"required": [
"id",
"name"
],
"title": "Team",
"type": "object"
},
"Teams": {
"description": "Away and home teams for an event.",
"properties": {
"away": {
"$ref": "#/$defs/Team",
"description": "Away team"
},
"home": {
"$ref": "#/$defs/Team",
"description": "Home team"
}
},
"required": [
"away",
"home"
],
"title": "Teams",
"type": "object"
}
},
"description": "A sporting event with associated odds.",
"properties": {
"id": {
"description": "Unique event identifier",
"title": "Id",
"type": "string"
},
"teams": {
"$ref": "#/$defs/Teams",
"description": "Participating teams"
},
"date": {
"description": "Event start time (UTC)",
"format": "date-time",
"title": "Date",
"type": "string"
},
"live": {
"description": "Whether the event is currently live",
"title": "Live",
"type": "boolean"
},
"odds": {
"default": [],
"description": "List of odds for this event",
"items": {
"$ref": "#/$defs/Odd"
},
"title": "Odds",
"type": "array"
}
},
"required": [
"id",
"teams",
"date",
"live"
],
"title": "Event",
"type": "object"
}
Fields:
-
id(str) -
teams(Teams) -
date(datetime) -
live(bool) -
odds(list[Odd])
oddsblaze.models.odds.Odd
¶
Bases: BaseModel
Individual odds line.
Show JSON schema:
{
"$defs": {
"Links": {
"description": "Deep links to sportsbook betting slip.",
"properties": {
"desktop": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Desktop web deep link",
"title": "Desktop"
},
"mobile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Mobile app deep link",
"title": "Mobile"
}
},
"title": "Links",
"type": "object"
},
"Player": {
"description": "A player with team information.",
"properties": {
"id": {
"description": "Unique player identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full player name",
"title": "Name",
"type": "string"
},
"position": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Player position",
"title": "Position"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Jersey number",
"title": "Number"
},
"team": {
"anyOf": [
{
"$ref": "#/$defs/Team"
},
{
"type": "null"
}
],
"default": null,
"description": "Player's team"
}
},
"required": [
"id",
"name"
],
"title": "Player",
"type": "object"
},
"Selection": {
"description": "Betting selection details.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection name (e.g., 'Over', 'Lakers')",
"title": "Name"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection side ('Over', 'Under', 'Home', 'Away')",
"title": "Side"
},
"line": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Handicap or total line",
"title": "Line"
}
},
"title": "Selection",
"type": "object"
},
"Team": {
"description": "A team.",
"properties": {
"id": {
"description": "Unique team identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full team name",
"title": "Name",
"type": "string"
},
"abbreviation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Team abbreviation (e.g., 'BOS')",
"title": "Abbreviation"
}
},
"required": [
"id",
"name"
],
"title": "Team",
"type": "object"
}
},
"description": "Individual odds line.",
"properties": {
"id": {
"description": "Unique odds identifier",
"title": "Id",
"type": "string"
},
"market": {
"description": "Market name (e.g., 'Moneyline')",
"title": "Market",
"type": "string"
},
"name": {
"description": "Selection name (e.g., 'Celtics')",
"title": "Name",
"type": "string"
},
"price": {
"description": "Odds price in configured format",
"title": "Price",
"type": "string"
},
"main": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether this is a main line",
"title": "Main"
},
"links": {
"anyOf": [
{
"$ref": "#/$defs/Links"
},
{
"type": "null"
}
],
"default": null,
"description": "Deep links to bet slip"
},
"sgp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Same Game Parlay identifier",
"title": "Sgp"
},
"selection": {
"anyOf": [
{
"$ref": "#/$defs/Selection"
},
{
"type": "null"
}
],
"default": null,
"description": "Parsed selection details"
},
"player": {
"anyOf": [
{
"$ref": "#/$defs/Player"
},
{
"type": "null"
}
],
"default": null,
"description": "Player info for props"
},
"updated": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "When this line was last updated",
"title": "Updated"
}
},
"required": [
"id",
"market",
"name",
"price"
],
"title": "Odd",
"type": "object"
}
Fields:
-
id(str) -
market(str) -
name(str) -
price(str) -
main(Optional[bool]) -
links(Optional[Links]) -
sgp(Optional[str]) -
selection(Optional[Selection]) -
player(Optional[Player]) -
updated(Optional[datetime])
Schedule¶
oddsblaze.models.schedule.ScheduleResponse
¶
Bases: BaseModel
Response from the Schedule API endpoint.
Show JSON schema:
{
"$defs": {
"League": {
"description": "A sports league.",
"properties": {
"id": {
"description": "Unique identifier (e.g., 'nba', 'nfl')",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full league name",
"title": "Name",
"type": "string"
},
"sport": {
"description": "Sport name (e.g., 'Basketball')",
"title": "Sport",
"type": "string"
}
},
"required": [
"id",
"name",
"sport"
],
"title": "League",
"type": "object"
},
"ScheduleEvent": {
"description": "A scheduled sporting event.",
"properties": {
"id": {
"description": "Unique event identifier",
"title": "Id",
"type": "string"
},
"teams": {
"$ref": "#/$defs/Teams",
"description": "Participating teams"
},
"date": {
"description": "Event start time (UTC)",
"format": "date-time",
"title": "Date",
"type": "string"
},
"live": {
"description": "Whether the event is currently live",
"title": "Live",
"type": "boolean"
}
},
"required": [
"id",
"teams",
"date",
"live"
],
"title": "ScheduleEvent",
"type": "object"
},
"Team": {
"description": "A team.",
"properties": {
"id": {
"description": "Unique team identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full team name",
"title": "Name",
"type": "string"
},
"abbreviation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Team abbreviation (e.g., 'BOS')",
"title": "Abbreviation"
}
},
"required": [
"id",
"name"
],
"title": "Team",
"type": "object"
},
"Teams": {
"description": "Away and home teams for an event.",
"properties": {
"away": {
"$ref": "#/$defs/Team",
"description": "Away team"
},
"home": {
"$ref": "#/$defs/Team",
"description": "Home team"
}
},
"required": [
"away",
"home"
],
"title": "Teams",
"type": "object"
}
},
"description": "Response from the Schedule API endpoint.",
"properties": {
"updated": {
"description": "Response generation timestamp",
"format": "date-time",
"title": "Updated",
"type": "string"
},
"league": {
"$ref": "#/$defs/League",
"description": "League information"
},
"events": {
"default": [],
"description": "List of scheduled events",
"items": {
"$ref": "#/$defs/ScheduleEvent"
},
"title": "Events",
"type": "array"
}
},
"required": [
"updated",
"league"
],
"title": "ScheduleResponse",
"type": "object"
}
Fields:
-
updated(datetime) -
league(League) -
events(list[ScheduleEvent])
oddsblaze.models.schedule.ScheduleEvent
¶
Bases: BaseModel
A scheduled sporting event.
Show JSON schema:
{
"$defs": {
"Team": {
"description": "A team.",
"properties": {
"id": {
"description": "Unique team identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full team name",
"title": "Name",
"type": "string"
},
"abbreviation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Team abbreviation (e.g., 'BOS')",
"title": "Abbreviation"
}
},
"required": [
"id",
"name"
],
"title": "Team",
"type": "object"
},
"Teams": {
"description": "Away and home teams for an event.",
"properties": {
"away": {
"$ref": "#/$defs/Team",
"description": "Away team"
},
"home": {
"$ref": "#/$defs/Team",
"description": "Home team"
}
},
"required": [
"away",
"home"
],
"title": "Teams",
"type": "object"
}
},
"description": "A scheduled sporting event.",
"properties": {
"id": {
"description": "Unique event identifier",
"title": "Id",
"type": "string"
},
"teams": {
"$ref": "#/$defs/Teams",
"description": "Participating teams"
},
"date": {
"description": "Event start time (UTC)",
"format": "date-time",
"title": "Date",
"type": "string"
},
"live": {
"description": "Whether the event is currently live",
"title": "Live",
"type": "boolean"
}
},
"required": [
"id",
"teams",
"date",
"live"
],
"title": "ScheduleEvent",
"type": "object"
}
Fields:
-
id(str) -
teams(Teams) -
date(datetime) -
live(bool)
Other Responses¶
oddsblaze.models.grader.GraderResponse
¶
Bases: BaseModel
Response from the Grader API endpoint.
Show JSON schema:
{
"$defs": {
"GradedEvent": {
"description": "Event information for bet grading.",
"properties": {
"id": {
"description": "Event identifier",
"title": "Id",
"type": "string"
},
"teams": {
"$ref": "#/$defs/GradedTeams",
"description": "Teams and scores"
},
"status": {
"description": "Event status (e.g., 'Final')",
"title": "Status",
"type": "string"
}
},
"required": [
"id",
"teams",
"status"
],
"title": "GradedEvent",
"type": "object"
},
"GradedPlayer": {
"description": "Player information for bet grading.",
"properties": {
"id": {
"description": "Player identifier",
"title": "Id",
"type": "string"
},
"score": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Player's stat score if applicable",
"title": "Score"
}
},
"required": [
"id"
],
"title": "GradedPlayer",
"type": "object"
},
"GradedTeam": {
"description": "A team with score in a graded event.",
"properties": {
"name": {
"description": "Team name",
"title": "Name",
"type": "string"
},
"score": {
"description": "Final score",
"title": "Score",
"type": "integer"
}
},
"required": [
"name",
"score"
],
"title": "GradedTeam",
"type": "object"
},
"GradedTeams": {
"description": "Away and home teams with scores.",
"properties": {
"away": {
"$ref": "#/$defs/GradedTeam",
"description": "Away team score info"
},
"home": {
"$ref": "#/$defs/GradedTeam",
"description": "Home team score info"
}
},
"required": [
"away",
"home"
],
"title": "GradedTeams",
"type": "object"
},
"Selection": {
"description": "Betting selection details.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection name (e.g., 'Over', 'Lakers')",
"title": "Name"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection side ('Over', 'Under', 'Home', 'Away')",
"title": "Side"
},
"line": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Handicap or total line",
"title": "Line"
}
},
"title": "Selection",
"type": "object"
}
},
"description": "Response from the Grader API endpoint.",
"properties": {
"id": {
"description": "The graded odds ID",
"title": "Id",
"type": "string"
},
"event": {
"$ref": "#/$defs/GradedEvent",
"description": "Event information"
},
"market": {
"description": "Market name",
"title": "Market",
"type": "string"
},
"name": {
"description": "Selection name",
"title": "Name",
"type": "string"
},
"selection": {
"anyOf": [
{
"$ref": "#/$defs/Selection"
},
{
"type": "null"
}
],
"default": null,
"description": "Parsed selection details"
},
"player": {
"anyOf": [
{
"$ref": "#/$defs/GradedPlayer"
},
{
"type": "null"
}
],
"default": null,
"description": "Player score info for prop bets"
},
"result": {
"description": "Bet result",
"enum": [
"Win",
"Lose",
"Push"
],
"title": "Result",
"type": "string"
}
},
"required": [
"id",
"event",
"market",
"name",
"result"
],
"title": "GraderResponse",
"type": "object"
}
Fields:
-
id(str) -
event(GradedEvent) -
market(str) -
name(str) -
selection(Optional[Selection]) -
player(Optional[GradedPlayer]) -
result(Literal['Win', 'Lose', 'Push'])
oddsblaze.models.consensus.ConsensusResponse
¶
Bases: BaseModel
Response from the Consensus Odds API endpoint.
Show JSON schema:
{
"$defs": {
"ConsensusEvent": {
"description": "A sporting event with consensus odds.",
"properties": {
"id": {
"description": "Event identifier",
"title": "Id",
"type": "string"
},
"teams": {
"$ref": "#/$defs/Teams",
"description": "Participating teams"
},
"date": {
"description": "Event start time (UTC)",
"format": "date-time",
"title": "Date",
"type": "string"
},
"live": {
"description": "Whether event is live",
"title": "Live",
"type": "boolean"
},
"odds": {
"default": [],
"description": "List of consensus odds",
"items": {
"$ref": "#/$defs/ConsensusOdd"
},
"title": "Odds",
"type": "array"
}
},
"required": [
"id",
"teams",
"date",
"live"
],
"title": "ConsensusEvent",
"type": "object"
},
"ConsensusOdd": {
"description": "Individual consensus odds line with sportsbook breakdown.",
"properties": {
"id": {
"description": "Consensus odds ID",
"title": "Id",
"type": "string"
},
"market": {
"description": "Market name",
"title": "Market",
"type": "string"
},
"name": {
"description": "Selection name",
"title": "Name",
"type": "string"
},
"price": {
"description": "Consensus price (average or best available)",
"title": "Price",
"type": "string"
},
"selection": {
"anyOf": [
{
"$ref": "#/$defs/Selection"
},
{
"type": "null"
}
],
"default": null,
"description": "Parsed selection details"
},
"player": {
"anyOf": [
{
"$ref": "#/$defs/Player"
},
{
"type": "null"
}
],
"default": null,
"description": "Player details"
},
"sportsbooks": {
"default": [],
"description": "Prices from individual sportsbooks",
"items": {
"$ref": "#/$defs/SportsbookPrice"
},
"title": "Sportsbooks",
"type": "array"
}
},
"required": [
"id",
"market",
"name",
"price"
],
"title": "ConsensusOdd",
"type": "object"
},
"League": {
"description": "A sports league.",
"properties": {
"id": {
"description": "Unique identifier (e.g., 'nba', 'nfl')",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full league name",
"title": "Name",
"type": "string"
},
"sport": {
"description": "Sport name (e.g., 'Basketball')",
"title": "Sport",
"type": "string"
}
},
"required": [
"id",
"name",
"sport"
],
"title": "League",
"type": "object"
},
"Player": {
"description": "A player with team information.",
"properties": {
"id": {
"description": "Unique player identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full player name",
"title": "Name",
"type": "string"
},
"position": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Player position",
"title": "Position"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Jersey number",
"title": "Number"
},
"team": {
"anyOf": [
{
"$ref": "#/$defs/Team"
},
{
"type": "null"
}
],
"default": null,
"description": "Player's team"
}
},
"required": [
"id",
"name"
],
"title": "Player",
"type": "object"
},
"Selection": {
"description": "Betting selection details.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection name (e.g., 'Over', 'Lakers')",
"title": "Name"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection side ('Over', 'Under', 'Home', 'Away')",
"title": "Side"
},
"line": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Handicap or total line",
"title": "Line"
}
},
"title": "Selection",
"type": "object"
},
"Sportsbook": {
"description": "A sportsbook.",
"properties": {
"id": {
"description": "Unique identifier (e.g., 'draftkings')",
"title": "Id",
"type": "string"
},
"name": {
"description": "Display name",
"title": "Name",
"type": "string"
},
"sgp": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether Same Game Parlay is supported",
"title": "Sgp"
}
},
"required": [
"id",
"name"
],
"title": "Sportsbook",
"type": "object"
},
"SportsbookPrice": {
"description": "A sportsbook's price for consensus odds.",
"properties": {
"name": {
"description": "Sportsbook name",
"title": "Name",
"type": "string"
},
"price": {
"description": "Odds price",
"title": "Price",
"type": "string"
},
"timestamp": {
"description": "Last update timestamp",
"format": "date-time",
"title": "Timestamp",
"type": "string"
}
},
"required": [
"name",
"price",
"timestamp"
],
"title": "SportsbookPrice",
"type": "object"
},
"Team": {
"description": "A team.",
"properties": {
"id": {
"description": "Unique team identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full team name",
"title": "Name",
"type": "string"
},
"abbreviation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Team abbreviation (e.g., 'BOS')",
"title": "Abbreviation"
}
},
"required": [
"id",
"name"
],
"title": "Team",
"type": "object"
},
"Teams": {
"description": "Away and home teams for an event.",
"properties": {
"away": {
"$ref": "#/$defs/Team",
"description": "Away team"
},
"home": {
"$ref": "#/$defs/Team",
"description": "Home team"
}
},
"required": [
"away",
"home"
],
"title": "Teams",
"type": "object"
}
},
"description": "Response from the Consensus Odds API endpoint.",
"properties": {
"updated": {
"description": "Response generation timestamp",
"format": "date-time",
"title": "Updated",
"type": "string"
},
"league": {
"$ref": "#/$defs/League",
"description": "League information"
},
"sportsbook": {
"$ref": "#/$defs/Sportsbook",
"description": "Sportsbook information (Consensus)"
},
"events": {
"default": [],
"description": "List of events",
"items": {
"$ref": "#/$defs/ConsensusEvent"
},
"title": "Events",
"type": "array"
}
},
"required": [
"updated",
"league",
"sportsbook"
],
"title": "ConsensusResponse",
"type": "object"
}
Fields:
-
updated(datetime) -
league(League) -
sportsbook(Sportsbook) -
events(list[ConsensusEvent])
oddsblaze.models.historical.HistoricalResponse
¶
Bases: BaseModel
Response from the Historical Odds API endpoint.
Show JSON schema:
{
"$defs": {
"PricePoint": {
"description": "A price at a specific timestamp (CLV/OLV).",
"properties": {
"price": {
"description": "The odds price",
"title": "Price",
"type": "string"
},
"timestamp": {
"description": "Timestamp of the price",
"format": "date-time",
"title": "Timestamp",
"type": "string"
}
},
"required": [
"price",
"timestamp"
],
"title": "PricePoint",
"type": "object"
},
"Selection": {
"description": "Betting selection details.",
"properties": {
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection name (e.g., 'Over', 'Lakers')",
"title": "Name"
},
"side": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Selection side ('Over', 'Under', 'Home', 'Away')",
"title": "Side"
},
"line": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Handicap or total line",
"title": "Line"
}
},
"title": "Selection",
"type": "object"
},
"TimeSeriesEntry": {
"description": "An entry in the line movement history.",
"properties": {
"price": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The odds price at this time",
"title": "Price"
},
"locked": {
"description": "Whether the odds were locked/suspended",
"title": "Locked",
"type": "boolean"
},
"timestamp": {
"description": "Timestamp of the update",
"format": "date-time",
"title": "Timestamp",
"type": "string"
}
},
"required": [
"locked",
"timestamp"
],
"title": "TimeSeriesEntry",
"type": "object"
}
},
"description": "Response from the Historical Odds API endpoint.",
"properties": {
"updated": {
"description": "Response generation timestamp",
"format": "date-time",
"title": "Updated",
"type": "string"
},
"id": {
"description": "The odds ID",
"title": "Id",
"type": "string"
},
"market": {
"description": "Market name",
"title": "Market",
"type": "string"
},
"name": {
"description": "Selection name",
"title": "Name",
"type": "string"
},
"selection": {
"anyOf": [
{
"$ref": "#/$defs/Selection"
},
{
"type": "null"
}
],
"default": null,
"description": "Parsed selection details"
},
"olv": {
"anyOf": [
{
"$ref": "#/$defs/PricePoint"
},
{
"type": "null"
}
],
"default": null,
"description": "Opening Line Value"
},
"clv": {
"anyOf": [
{
"$ref": "#/$defs/PricePoint"
},
{
"type": "null"
}
],
"default": null,
"description": "Closing Line Value"
},
"entries": {
"default": [],
"description": "Line movement history",
"items": {
"$ref": "#/$defs/TimeSeriesEntry"
},
"title": "Entries",
"type": "array"
}
},
"required": [
"updated",
"id",
"market",
"name"
],
"title": "HistoricalResponse",
"type": "object"
}
Fields:
-
updated(datetime) -
id(str) -
market(str) -
name(str) -
selection(Optional[Selection]) -
olv(Optional[PricePoint]) -
clv(Optional[PricePoint]) -
entries(list[TimeSeriesEntry])
oddsblaze.models.markets.ActiveMarketsResponse
¶
Bases: BaseModel
Response from the Active Markets API endpoint.
Show JSON schema:
{
"$defs": {
"LeagueMarkets": {
"description": "A league with its active markets.",
"properties": {
"id": {
"description": "League identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "League name",
"title": "Name",
"type": "string"
},
"sport": {
"description": "Sport name",
"title": "Sport",
"type": "string"
},
"markets": {
"default": [],
"description": "Active markets in this league",
"items": {
"$ref": "#/$defs/Market"
},
"title": "Markets",
"type": "array"
}
},
"required": [
"id",
"name",
"sport"
],
"title": "LeagueMarkets",
"type": "object"
},
"Market": {
"description": "An active market.",
"properties": {
"id": {
"description": "Market identifier (e.g., 'Moneyline')",
"title": "Id",
"type": "string"
},
"name": {
"description": "Display name",
"title": "Name",
"type": "string"
},
"sportsbooks": {
"default": [],
"description": "List of sportsbook IDs supporting this market",
"items": {
"type": "string"
},
"title": "Sportsbooks",
"type": "array"
}
},
"required": [
"id",
"name"
],
"title": "Market",
"type": "object"
}
},
"description": "Response from the Active Markets API endpoint.",
"properties": {
"updated": {
"description": "Response generation timestamp",
"format": "date-time",
"title": "Updated",
"type": "string"
},
"leagues": {
"default": [],
"description": "List of leagues and their markets",
"items": {
"$ref": "#/$defs/LeagueMarkets"
},
"title": "Leagues",
"type": "array"
}
},
"required": [
"updated"
],
"title": "ActiveMarketsResponse",
"type": "object"
}
Fields:
-
updated(datetime) -
leagues(list[LeagueMarkets])
oddsblaze.models.polled.PolledResponse
¶
Bases: BaseModel
Response from the Last Polled API endpoint.
Show JSON schema:
{
"$defs": {
"PolledLeague": {
"description": "A league with polled sportsbooks.",
"properties": {
"id": {
"description": "League identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "League name",
"title": "Name",
"type": "string"
},
"sportsbooks": {
"default": [],
"description": "Poll status per sportsbook",
"items": {
"$ref": "#/$defs/PolledSportsbook"
},
"title": "Sportsbooks",
"type": "array"
}
},
"required": [
"id",
"name"
],
"title": "PolledLeague",
"type": "object"
},
"PolledSportsbook": {
"description": "A sportsbook's last polled status.",
"properties": {
"id": {
"description": "Sportsbook identifier",
"title": "Id",
"type": "string"
},
"name": {
"description": "Sportsbook name",
"title": "Name",
"type": "string"
},
"timestamp": {
"description": "Last poll timestamp",
"format": "date-time",
"title": "Timestamp",
"type": "string"
},
"last": {
"description": "Seconds elapsed since last poll",
"title": "Last",
"type": "integer"
}
},
"required": [
"id",
"name",
"timestamp",
"last"
],
"title": "PolledSportsbook",
"type": "object"
}
},
"description": "Response from the Last Polled API endpoint.",
"properties": {
"updated": {
"description": "Response generation timestamp",
"format": "date-time",
"title": "Updated",
"type": "string"
},
"leagues": {
"default": [],
"description": "List of leagues and poll statuses",
"items": {
"$ref": "#/$defs/PolledLeague"
},
"title": "Leagues",
"type": "array"
}
},
"required": [
"updated"
],
"title": "PolledResponse",
"type": "object"
}
Fields:
-
updated(datetime) -
leagues(list[PolledLeague])
Base Models¶
oddsblaze.models.base.League
¶
Bases: BaseModel
A sports league.
Show JSON schema:
{
"description": "A sports league.",
"properties": {
"id": {
"description": "Unique identifier (e.g., 'nba', 'nfl')",
"title": "Id",
"type": "string"
},
"name": {
"description": "Full league name",
"title": "Name",
"type": "string"
},
"sport": {
"description": "Sport name (e.g., 'Basketball')",
"title": "Sport",
"type": "string"
}
},
"required": [
"id",
"name",
"sport"
],
"title": "League",
"type": "object"
}
Fields:
-
id(str) -
name(str) -
sport(str)
oddsblaze.models.base.Sportsbook
¶
Bases: BaseModel
A sportsbook.
Show JSON schema:
{
"description": "A sportsbook.",
"properties": {
"id": {
"description": "Unique identifier (e.g., 'draftkings')",
"title": "Id",
"type": "string"
},
"name": {
"description": "Display name",
"title": "Name",
"type": "string"
},
"sgp": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Whether Same Game Parlay is supported",
"title": "Sgp"
}
},
"required": [
"id",
"name"
],
"title": "Sportsbook",
"type": "object"
}
Fields:
-
id(str) -
name(str) -
sgp(Optional[bool])