-
Notifications
You must be signed in to change notification settings - Fork 11
Data Types: Standings
KCNilssen edited this page Dec 16, 2022
·
3 revisions
Attributes are expandable and collapsable - Link to Standings dataclass
standingstype : str
- A string indicating the type of standings.
league : league
- An object containing information about the league. Dataclass: League
id : int
- id number of the league
link : str
- link of the league
division : Division
- An object containing information about the division. Dataclass: Sport
id : int
- id number of the division
link : str
- link of the divison
sport : Sport
- An object containing information about the sport. Dataclass: Sport
id : int
- id number of the sport
link : str
- link of the sport
lastupdated : str
- A string indicating the last time the standing was updated.
teamrecords : List[Teamrecords]
- A list of Teamrecord objects containing the data for the teams standings. Dataclass: Teamrecords
team: Team
- The team for which the data belongs to. Dataclass: Team
id : int
- id number of the team
name : str
- name of the team
link : str
- The API link for the team
season: int
- The season for which the data belongs to.
streak: Streak
- The streak of the team. Dataclass: Streak
streaktype : str
- Steak type
streaknumber : int
- Streak number
streakcode : str
- Steak code
divisionrank: str
- The rank of the team in their division.
leaguerank: str
- The rank of the team in their league.
sportrank: str
- The rank of the team in their sport.
gamesplayed: int
- The number of games played by the team.
gamesback: str
- The number of games behind the leader in the division.
wildcardgamesback: str
- The number of games behind the leader in the wild card race.
leaguegamesback: str
- The number of games behind the leader in the league.
springleaguegamesback: str
- The number of games behind the leader in the spring league.
sportgamesback: str
- The number of games behind the leader in the sport.
divisiongamesback: str
- The number of games behind the leader in the division.
conferencegamesback: str
- The number of games behind the leader in the conference.
leaguerecord: OverallleagueRecord
- The overall league record of the team. Dataclass: OverallleagueRecord
wins : int
- Overall number of wins in league
losses : int
- Overall number of losses in league
pct : str
- Overall percentage in league
lastupdated: str
- The date when the data was last updated.
records: Records
- The records of the team. Dataclass: Records
splitrecords : Typerecords
- A list of split records. Dataclass: Typerecords
wins : int
- Number of wins in type
losses : int
- Number of losses in type
pct : str
- Percentage in type
type : str
- Type of record
divisionrecords : Divisionrecords
- A list of division records. Dataclass: Divisionrecords
wins : int
- Number of wins in division
losses : int
- Number of losses in division
pct : str
- Percentage in division
division : Divison
- Division. Dataclass: Division
id : int
- id number of the divison
name : str
- name of the division
link : str
- link of the division
overallrecords : Typerecords
- A list of overall records. Dataclass: Typerecords
wins : int
- Number of wins in type
losses : int
- Number of losses in type
pct : str
- Percentage in type
type : str
- Type of record
leaguerecords : Leaguerecords
- A list of league records. Dataclass: Leaguerecords
wins : int
- Number of wins in league
losses : int
- Number of losses in league
pct : str
- Percentage in league
league : League
- League. Dataclass: League
id : int
- id number of the league
name : str
- name of the league
link : str
- link of the league
expectedrecords : Typerecords
- A list of expected records. Dataclass: Typerecords
wins : int
- Number of wins in type
losses : int
- Number of losses in type
pct : str
- Percentage in type
type : str
- Type of record
runsallowed: int
- The number of runs allowed by the team.
runsscored: int
- The number of runs scored by the team.
divisionchamp: bool
- A flag indicating whether the team is the division champion.
divisionleader: bool
- A flag indicating whether the team is the leader in their division.
haswildcard: bool
- A flag indicating whether the team has a wild card spot.
clinched: bool
- A flag indicating whether the team has clinched a spot in the playoffs.
eliminationnumber: str
- The number of games the team needs to win or the number of games their opponents need to lose in order to be eliminated from playoff contention.
wildcardeliminationnumber: str
- The number of games the team needs to win or the number of games their opponents need to lose in order to be eliminated from wild card contention.
wins: int
- The number of wins of the team.
losses: int
- The number of losses of the team.
rundifferential: int
- The run differential of the team (runs scored minus runs allowed).
winningpercentage: str
- The winning percentage of the team.
wildcardrank: str
- The rank of the team in the wild card race.
wildcardleader: bool
- A flag indicating whether the team is the leader in the wild card race.
magicnumber: str
- The number of games the team needs to win or the number of games their opponents need to lose in order to clinch a spot in the playoffs.
clinchindicator: str
- Clinch indicator.
Description: Return
Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
league_id |
string/int | Yes | Insert leagueId to return all standings based on a particular standingType for a specific league. | |
season |
string | Yes | Insert year to return all standings based on a particular year. |
Other Parameters:
Name | Type | Required | Description | Default |
---|---|---|---|---|
standingsTypes |
string | No | Insert standingType to return all standings based on a particular year. Find standingTypes at https://statsapi.mlb.com/api/v1/standingsTypes | |
date |
string | Yes | Insert date to return standing information for on a particular date. Format: MM/DD/YYYY |
https://statsapi.mlb.com/api/v1/standings?leagueId=103&season=2018
import mlbstatsapi
mlb = mlbstatsapi.Mlb()
mlb.get_standings(league_id = 103, season = 2018)
Note: This information is provided for reference only, without warranty or guarantee, and is not official documentation provided by MLB. This package and its author are not affiliated with MLB or any MLB team. This API wrapper interfaces with MLB's Stats API. Use of MLB data is subject to the notice posted at http://gdx.mlb.com/components/copyright.txt.