- Created by Martin Mand , last modified by Alexandru Iftimiciuc on Jan 12, 2021
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 7 Next »
Baseball rules can be found here: http://mlb.mlb.com/mlb/official_info/official_rules
This document describes the baseball match state contract.
Match Summary Message
The Match Summary message complements the Match Details message by summarising the important match information for rapid, easy access.
{ "BatterPlayerId":389877, "CustomerId":6105, "FirstBasePlayerId":456210, "FirstBaseOccupied":false, "FixtureId":4462599, "IsReliable":true, "MessageTimestampUtc":"2017-03-08T13:29:14.52Z", "Phase":InProgress, "MatchDuration": null, "WinningPitcher": null, "LosingPitcher": null, "SavingPitcher": null, "BallInPlay":Unknown, "PitchCount":{}, "PitcherPlayerId":5884211, "SecondBasePlayerId":456211, "SecondBaseOccupied":false, "ThirdBasePlayerId": 456212, "ThirdBaseOccupied":false, "TotalErrors": {}, "TotalHits": {}, "TotalRuns": {}, "Innings": {} }
Element | Type | Description |
---|---|---|
BatterPlayerId | String | An immutable identifier for the batter |
CustomerId | Integer | An immutable identifier for the customer |
FirstBasePlayerId | String | An immutable identifier for the first base |
FirstBaseOccupied | Boolean | True if the base has been occupied |
FixtureId | String | An immutable identifier for the event |
IsReliable | Boolean | True if all summarised information is reliable. False if at least one of the summarised collections is unreliable. |
MessageTimestampUtc | Datetime | The time that the message is sent, UTC |
Phase | MatchPhase | The phase of play during which the action happened, possible values are: |
BallInPlay | Enum | Indicates whether the ball is in play or not. Possible values are: No Unknown (Default) |
PitchCount | PitchCount | A collection of PitchCount objects that summarises the pitch count |
PitcherPlayerId | String | An immutable identifier for the pitcher |
SecondBasePlayerId | String | An immutable identifier for the second base |
SecondBaseOccupied | Boolean | True if the base has been occupied |
ThirdBasePlayerId | String | An immutable identifier for the third base |
ThirdBaseOccupied | Boolean | True if the base has been occupied |
TotalErrors | Score | A collection of TotalErrors objects that summarises the total errors |
TotalHits | Score | A collection of TotalHits objects that summarises the total hits |
TotalRuns | Score | A collection of TotalRuns objects that summarises the total runs |
Innings | ArrayOfInningDetails | A collection of Innings objects that summarises the inning details |
MatchDuration | Not currently used (null) | |
WinningPitcher | Not currently used (null) | |
LosingPitcher | Not currently used (null) | |
SavingPitcher | Not currently used (null) |
PitchCount
A collection of objects describing Pitch.
{ "Balls":1, "Strikes":2, "TotalPitches":3 }
Element | Type | Description |
---|---|---|
Balls | Integer | Describes total balls by the current Pitcher |
Strikes | Integer | Describes Strikes by the current Pitcher |
TotalPitches | Integer | Describes total pitches by the current Pitcher |
Score
A collection of objects describing Score.
{ "Home":0, "Away":0 }
Element | Type | Description |
---|---|---|
Home | Integer | Integer count of Home total errors |
Away | Integer | Integer count of Away total errors |
ArrayOfInningDetails
A collection of objects describing the Inning
{ "Errors":{}, "Hits":{}, "InningNumber":1, "LeftOnBase":{}, "Outs":{}, "Runs":{}, "Status": Finished }
Element | Type | Description |
---|---|---|
Errors | Score | A collection of Errors objects that summarises the total errors |
Hits | Score | A collection of Hits objects that summarises the total hits |
InningNumber | Integer | Describes the inning played |
LeftOnBase | Score | A collection of LeftOnBase objects that summarises the players on base |
Outs | Score | A collection of Outs objects that summarises the total outs |
Runs | Score | A collection of Runs objects that summarises the total runs |
Status | InningStatus | Describes the Inning status, possible values are: |
Top | PlateAppearances StartedAtUtc FinishedAtUtc Substitutions NumberOfOuts Runs PitcherStatistics | |
Bottom | PlateAppearances StartedAtUtc FinishedAtUtc Substitutions NumberOfOuts Runs PitcherStatistics |
Match Details Message
The Match Details message contains the details of the game so far, including points scored, errors committed and runs.
{ "BatterPlayerId":512331, "CustomerId":6105, "FirstBasePlayerId":456210, "FirstBaseOccupied":false, "FixtureId":4462599, "IsReliable":true, "MessageTimestampUtc":"2017-03-08T13:29:14.52Z", "Phase":PreGame,"MatchDuration": null, "WinningPitcher": null, "LosingPitcher": null, "SavingPitcher": null, "BallInPlay":Unknown, "PitchCount":{}, "PitcherPlayerId":5884211, "SecondBasePlayerId":456211, "SecondBaseOccupied":false, "ThirdBasePlayerId": 456212, "ThirdBaseOccupied":false, "TotalErrors": {}, "TotalHits": {}, "TotalRuns": {}, "AwayBattingLineup": {}, "AwayPlayers": {}, "AwayStartingLineup": {}, "HomeBattingLineup": {}, "HomePlayers": {}, "HomeStartingLineup": {}, "Innings": {} }
Element | Type | Description |
---|---|---|
BatterPlayerId | String | An immutable identifier for the batter |
CustomerId | Integer | An immutable identifier for the customer |
FirstBasePlayerId | String | An immutable identifier for the first base |
FirstBaseOccupied | Boolean | True if the base has been occupied |
FixtureId | String | An immutable identifier for the event |
IsReliable | Boolean | True if all summarised information is reliable. False if at least one of the summarised collections is unreliable. |
MessageTimestampUtc | Datetime | The time that the message is sent, UTC |
Phase | MatchPhase | The phase of play during which the action happened |
BallInPlay | Enum | Indicates whether the ball is in play or not. Possible values are: No Unknown (Default) |
PitchCount | PitchCount | A collection of PitchCount objects that summarises the pitch count |
PitcherPlayerId | String | An immutable identifier for the pitcher |
SecondBasePlayerId | String | An immutable identifier for the second base |
SecondBaseOccupied | Boolean | True if the base has been occupied |
ThirdBasePlayerId | String | An immutable identifier for the third base |
ThirdBaseOccupied | Boolean | True if the base has been occupied |
TotalErrors | TotalErrors | A collection of TotalErrors objects that summarises the total errors |
TotalHits | TotalHits | A collection of TotalHits objects that summarises the total hits |
TotalRuns | TotalRuns | A collection of TotalRuns objects that summarises the total runs |
AwayBattingLineup | BattingLineup | A collection of BattingLineup objects that summarises batting line up |
AwayPlayers | ArrayOfPlayer | An Array Of Player objects that summarises players in team |
AwayStartingLineup | ArrayOfLineupEntry | An Array Of Player objects that summarises staring line up for a team |
HomeBattingLineup | BattingLineup | A collection of BattingLineup objects that summarises batting line up |
HomePlayers | ArrayOfPlayer | An Array Of Player objects that summarises players in team |
HomeStartingLineup | ArrayOfLineupEntry | An Array Of Player objects that summarises staring line up for a team |
Innings | ArrayOfInningDetails | A collection of Innings objects that summarises the inning details |
MatchDuration | Not currently used (null) | |
WinningPitcher | Not currently used (null) | |
LosingPitcher | Not currently used (null) | |
SavingPitcher | Not currently used (null) |
BattingLineup
A collection of objects describing Batting line up
{ "CurrentBatterId":621637, "LineupEntry":6105 }
Element | Type | Description |
---|---|---|
CurrentBatterId | String | An immutable identifier for the current batter |
LineupEntry | ArrayOfLineupEntry |
|
ArrayOfLineupEntry
A collection of objects describing line up
{ "BattingSlot":1, "PlayerId":551022, "Position":ShortStop }
Element | Type | Description |
---|---|---|
BattingSlot | Integer | Player order for the batting slot |
PlayerId | String | An immutable identifier for the pitcher |
Position | PlayerPosition | Player position, possible values: |
ArrayOfPlayer
A collection of objects describing players
{ "BattingHand":Left, "PlayerId":551022, "Name":Stephen Drew, "SourceId":null, "ThrowingHand":Right }
Element | Type | Description |
---|---|---|
BattingHand | Hand | Describes players batting hand, possible values are: |
PlayerId | String | An immutable identifier for the pitcher |
Name | String | Player name |
SourceId | String | An immutable identifier for the pitcher |
ThrowingHand | Hand | Describes players throwing hand, possible values are: |
- No labels