### Get Player Percent to Play Data (API Example) Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/player-percent-to-play Demonstrates how to fetch player percent-to-play data for a specific league using GET requests. Supports pagination and filtering by player or team. ```bash GET /player/{league}/percent-to-play URL Parameters: league: string (e.g., "nfl", "nba", "mlb") Query Parameters: cursor: string (Omit for first page) order: string ("desc" or "asc") personId: long (Optional) teamId: int (Optional) ``` -------------------------------- ### GET /event/{league}/lineup/{date?} Source: https://docs.unabated.com/guide/release-notes/101525 Retrieves starting lineups for events on a specific date. Returns lineups for both teams, including projected and confirmed lineups. ```APIDOC ## GET /event/{league}/lineup/{date?} ### Description Get starting lineups for events on a specific date, which defaults to the current date if not provided. Returns lineups for both participating teams, showing projected and confirmed lineups along with player positions and basic information. ### Method GET ### Endpoint `/event/{league}/lineup/{date?}` ### Parameters #### Path Parameters - **league** (string) - Required - The league identifier. - **date** (string) - Optional - The date for which to retrieve lineups in YYYY-MM-DD format. Defaults to today. ### Request Example ```json { "example": "GET /event/mlb/lineup/2023-10-27" } ``` ### Response #### Success Response (200) - **homeTeamLineup** (array) - Starting lineup for the home team. - **awayTeamLineup** (array) - Starting lineup for the away team. #### Response Example ```json { "example": { "homeTeamLineup": [ { "playerName": "Player One", "position": "P", "status": "Confirmed" } ], "awayTeamLineup": [ { "playerName": "Player Two", "position": "C", "status": "Projected" } ] } } ``` ``` -------------------------------- ### GET /event/{league}/lineup/{date?} Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/event-lineups Fetches the starting lineups for events in a given league. You can optionally specify a date; otherwise, it defaults to the current date. ```APIDOC ## GET /event/{league}/lineup/{date?} ### Description Get starting lineups for events in a specific league. Optionally filter by date (defaults to today). ### Method GET ### Endpoint `/event/{league}/lineup/{date?}` ### Parameters #### Path Parameters - **league** (string) - Required - League identifier (e.g., "nfl", "nba", "mlb") - **date** (string) - Optional - Date in YYYY-MM-DD format (e.g., "2025-10-15"). Defaults to today if not provided. ### Response #### Success Response (200) - **leagueId** (int) - League identifier - **date** (string) - Date for the lineup in YYYY-MM-DD format - **event** (object) - Event information - **teams** (array) - Array of team lineups - **meta** (object) - Metadata about the lineup ### Response Example ```json { "leagueId": 1, "date": "2025-10-15", "event": { "id": 12345, "name": "Example Game", "eventStart": "2025-10-15T19:00:00Z", "statusId": 1 }, "teams": [ { "side": "HOME", "team": { "id": 101, "name": "Home Team" }, "lineupStatus": "CONFIRMED", "confirmedAt": "2025-10-15T18:00:00Z", "starters": [ { "position": "PG", "player": { "id": 1001, "firstName": "John", "lastName": "Doe" } } ] } ], "meta": { "createdAt": "2025-10-15T09:00:00Z", "updatedAt": "2025-10-15T17:00:00Z" } } ``` ### Event Fields - **id** (long) - Event identifier - **name** (string) - Event name - **eventStart** (datetime) - Event start time (UTC) - **statusId** (int) - Event status ID (1=PREGAME, 2=LIVE, 3=FINAL, etc.) ### Team Lineup Fields - **side** (string) - Side of the event: "AWAY" or "HOME" - **team** (object) - Team information - **lineupStatus** (string) - Lineup status: "PROJECTED" or "CONFIRMED" - **confirmedAt** (datetime) - When the lineup was confirmed (null if projected) - **starters** (array) - Array of starting players ### Team Fields - **id** (long) - Team identifier - **name** (string) - Team name ### Starter Fields - **position** (string) - Player position (e.g., "PG", "SG", "SF", "PF", "C" for NBA) - **player** (object) - Player information ### Player Fields - **id** (long) - Player identifier - **firstName** (string) - Player first name - **lastName** (string) - Player last name ### Meta Fields - **createdAt** (datetime) - Date the item was created (UTC) - **updatedAt** (datetime) - Date the item was last updated (UTC) ``` -------------------------------- ### Market Key Examples Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/odds These examples demonstrate the practical application of the market key format for both pregame and live markets. ```plaintext eid940356:bt72:bst0:pt1:pregame eid940356:bt104:bst1:pt2:live ``` -------------------------------- ### Side Key Examples Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/odds These examples illustrate the side key format for both team-based and player prop markets. ```plaintext si0:tid75 si1:tid84 ``` -------------------------------- ### Get Teams by League and Market Type (Example) Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/teams This example demonstrates how to retrieve a list of teams for a specific league and market type. The response is a JSON object where keys are team IDs and values contain team information. Ensure you provide valid 'league' and 'marketType' parameters. ```json { "{teamId}": { "[...fields]" } } ``` -------------------------------- ### GET /player/{league}/percent-to-play Source: https://docs.unabated.com/guide/release-notes/101525 Retrieves player availability percentages for their next game, including event and team context. Supports filtering and pagination. ```APIDOC ## GET /player/{league}/percent-to-play ### Description Get player availability percentages indicating the likelihood a player will participate in their next game. Supports cursor-based pagination with 50 items per page. You can filter by `personId` or `teamId` and includes event and team context. ### Method GET ### Endpoint `/player/{league}/percent-to-play` ### Parameters #### Path Parameters - **league** (string) - Required - The league identifier. #### Query Parameters - **personId** (string) - Optional - Filter by player ID. - **teamId** (string) - Optional - Filter by team ID. ### Request Example ```json { "example": "GET /player/nba/percent-to-play?personId=456" } ``` ### Response #### Success Response (200) - **players** (array) - A list of player availability data. - **nextCursor** (string) - Cursor for the next page of results. #### Response Example ```json { "example": { "players": [ { "playerId": "456", "percentToPlay": 0.75, "team": "Team A", "eventContext": "Next game vs Team B" } ], "nextCursor": "anotherCursorString" } } ``` ``` -------------------------------- ### GET /tournament/{league} Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/tournaments Retrieves a list of all tournaments for a specific league. The league should be provided using its short name format (e.g., 'mlb', 'nfl'). ```APIDOC ## GET /tournament/{league} ### Description Retrieve a list of all tournaments for a specific league. ### Method GET ### Endpoint `https://data.unabated.com/tournament/{league}` ### Parameters #### Path Parameters - **league** (String) - Required - The short name of the league for which to retrieve tournament data (e.g., `mlb`, `nfl`). ### Response #### Success Response (200) - **id** (Integer) - The unique identifier for the tournament. - **name** (String or null) - The name of the tournament. - **leagueId** (Integer) - The identifier of the league the tournament belongs to. - **seasonId** (Integer or null) - The identifier of the season associated with the tournament. - **surfaceType** (String or null) - The type of surface for the tournament, if applicable. - **bestOf** (Integer or null) - The number of matches/games in a series, if applicable. - **modifiedOn** (String or null) - The last modification date and time in ISO 8601 format. #### Response Example ```json [ { "id": 101, "name": "World Series", "leagueId": 1, "seasonId": 2023, "surfaceType": null, "bestOf": 7, "modifiedOn": "2023-10-27T10:00:00Z" }, { "id": 102, "name": "All-Star Game", "leagueId": 1, "seasonId": 2023, "surfaceType": null, "bestOf": null, "modifiedOn": "2023-07-11T20:00:00Z" } ] ``` ``` -------------------------------- ### GET /bettype Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/bet-types Retrieve a listing of all available bet types. You can filter the results by specifying a `changedSince` date. ```APIDOC ## GET /bettype ### Description Retrieve a listing of all available bet types. You can optionally filter the results to include only those bet types that have been changed or added since a specified date. ### Method GET ### Endpoint https://data.unabated.com/bettype ### Parameters #### Query Parameters - **changedSince** (String) - Optional - The datetime after which changes or additions occurred to the bet types (in UTC time, ISO 8601 format). If null or empty, then all bet types are returned. ### Request Example ``` https://data.unabated.com/bettype?changedSince=2023-10-27T10:00:00Z ``` ### Response #### Success Response (200) - **id** (Integer) - The unique identifier for the bet type. - **name** (String or null) - The display name of the bet type. - **description** (String or null) - A detailed description of the bet type, if available. - **betOn** (String or null) - Indicates what is being bet on (e.g., `team`, `player`, `event`). - **sides** (String or null) - Describes the sides for this bet type (e.g., `team`, `ou`, `player`, `yes-no`). - **canDraw** (Boolean) - Indicates if the bet type can result in a draw. - **hasPoints** (Boolean) - Indicates if the bet type involves point values. - **active** (Boolean) - Indicates if the bet type is currently active. - **selectionCountType** (String or Null) - Describes how selections are counted for this bet type (e.g., `1`, `2`, `3`, `M`). - **betRange** (String or null) - The range for this bet type (e.g., `event`, `season`). - **betTypeId** (Integer) - The unique identifier for the bet type. Currently a duplicate of `id`. - **isFuture** (Boolean) - Indicates if the bet type is a future bet. - **modifiedOn** (String or null) - The last modification date and time in ISO 8601 format, if available. #### Response Example ```json [ { "id": 1, "name": "Moneyline", "description": "Bet on which team will win the game.", "betOn": "team", "sides": "team", "canDraw": false, "hasPoints": false, "active": true, "selectionCountType": "1", "betRange": "event", "betTypeId": 1, "isFuture": false, "modifiedOn": "2023-10-26T12:00:00Z" } ] ``` ``` -------------------------------- ### Fetch Next Page of Player Percent to Play Data (API Example) Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/player-percent-to-play Illustrates how to use the `nextCursor` from a previous response to retrieve the subsequent page of player percent-to-play data. ```bash GET /player/nba/percent-to-play?cursor=eyJpZCI6MTIzNDUsImRpcmVjdGlvbiI6Im5leHQifQ== ``` -------------------------------- ### GET /team/{league} Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/teams Retrieve a listing of all available teams within a league. You can optionally filter results by a specific modification date. ```APIDOC ## GET /team/{league} ### Description Retrieve a listing of all available teams within a league. You can optionally filter results by a specific modification date. ### Method GET ### Endpoint `https://data.unbated.com/team/{league}` ### Parameters #### Path Parameters - **league** (String) - Required - The league for which to retrieve data. Short name format (e.g. `mlb`, `nfl`, etc.). #### Query Parameters - **changedSince** (String) - Optional - The datetime after which changes or additions occurred to the teams (in UTC time, ISO 8601 format). Will only return those rows. If null/empty, then all teams are returned. ### Response #### Success Response (200) - **name** (String or null) - The name of the team. - **abbreviation** (String or null) - The abbreviation of the team name. - **logoUrl** (String or null) - URL to the logo image of the team. - **leagueId** (Integer) - The identifier of the league the team belongs to. - **divisionId** (Integer or null) - The identifier of the division the team belongs to, if any. - **divisionAbbreviation** (String or null) - The abbreviation of the division name, if any. - **conferenceAbbreviation** (String or null) - The abbreviation of the conference name, if any. - **partnerTeamData** (Object or null) - Partner-specific team data with partner keys and associated team IDs. - **modifiedOn** (String or null) - The last modification date and time in ISO 8601 format. - **id** (Integer) - The unique identifier for the team. #### Response Example ```json [ { "name": "New York Yankees", "abbreviation": "NYY", "logoUrl": "https://example.com/logos/yankees.png", "leagueId": 1, "divisionId": 10, "divisionAbbreviation": "AL East", "conferenceAbbreviation": "AL", "partnerTeamData": null, "modifiedOn": "2023-10-27T10:00:00Z", "id": 101 } ] ``` ``` -------------------------------- ### GET /market/{league}/{marketType}/sources Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/market-sources This endpoint returns only market sources which currently have odds available for the specified league and market type. ```APIDOC ## GET /market/{league}/{marketType}/sources ### Description Retrieve a listing of market sources with applicable market data for the league and marketType specified. ### Method GET ### Endpoint https://data.unabated.com/market/{league}/{marketType}/sources ### Parameters #### Path Parameters - **league** (String) - Required - The league for which to retrieve data. Short name format (e.g. `mlb`, `nfl`, etc.) - **marketType** (String) - Required - Type of market (see odds) ### Response #### Success Response (200) - The response is a JSON array containing market source objects with details about each sportsbook including branding, status, and operational information. #### Response Example ```json [ { "sourceName": "Example Sportsbook", "sourceStatus": "active", "sourceBrandingUrl": "https://example.com/logo.png" } ] ``` ``` -------------------------------- ### GET /player/{league} Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/players Retrieve a list of all players in a specific league. You can optionally filter the results by a modification date. ```APIDOC ## GET /player/{league} ### Description Retrieve a list of all players in a specific league. You can optionally filter the results by a modification date. ### Method GET ### Endpoint `https://data.unabated.com/player/{league}` ### Parameters #### Path Parameters - **league** (String) - Required - The league for which to retrieve data. Short name format (e.g. `mlb`, `nfl`, etc.). #### Query Parameters - **changedSince** (String) - Optional - The datetime after which changes or additions occurred to the players (in UTC time, ISO 8601 format). Will only return those rows. If null/empty, then all players are returned. ### Response #### Success Response (200) - **headshotUrl** (String or null) - URL to the player's headshot image, if available. - **firstName** (String or null) - The first name of the player. - **lastName** (String or null) - The last name of the player. - **preferredName** (String or null) - The preferred name of the player, if available. - **jerseyNumber** (Integer or null) - The jersey number of the player, if available. - **country** (String or null) - The country of the player. - **priorityType** (String or null) - The priority level of the player (e.g., "low"). - **height** (Integer or null) - The height of the player in inches. - **weight** (Integer or null) - The weight of the player in pounds. - **position** (String or null) - The position of the player, if available. - **birthDate** (String or null) - The birth date of the player. - **leagueId** (Integer) - The identifier of the league the player belongs to. - **teamId** (Integer or null) - The identifier of the team the player belongs to, if any. - **partnerPlayerData** (Object or null) - Partner-specific player data with partner keys and associated player IDs. - **modifiedOn** (String or null) - The last modification date and time in ISO 8601 format. - **id** (Integer) - The unique identifier for the player. #### Response Example ```json [ { "headshotUrl": "https://example.com/headshot.jpg", "firstName": "Jane", "lastName": "Doe", "preferredName": "Janie", "jerseyNumber": 23, "country": "USA", "priorityType": "high", "height": 65, "weight": 130, "position": "Guard", "birthDate": "1990-05-15T00:00:00Z", "leagueId": 1, "teamId": 101, "partnerPlayerData": { "partnerA": 12345 }, "modifiedOn": "2023-10-27T10:00:00Z", "id": 5001 } ] ``` ``` -------------------------------- ### GET /player/{league}/percent-to-play Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/player-percent-to-play Retrieves player percent-to-play data for a given league. Supports pagination and filtering by player or team. ```APIDOC ## GET /player/{league}/percent-to-play ### Description Get player percent-to-play data for a specific league with cursor-based pagination. Returns 50 items per page. ### Method GET ### Endpoint `/player/{league}/percent-to-play` ### Parameters #### Path Parameters - **league** (string) - Required - League identifier (e.g., "nfl", "nba", "mlb") #### Query Parameters - **cursor** (string) - Optional - Cursor for pagination (opaque base64-encoded string). Omit for first page. - **order** (string) - Optional - Sort order: "desc" (default, newest first) or "asc" (oldest first) - **personId** (long) - Optional - Filter by specific player ID - **teamId** (int) - Optional - Filter by specific team ID ### Response #### Success Response (200) - **data** (array) - Array of player percent-to-play items. - **success** (boolean) - Indicates whether the operation was successful. - **messages** (array) - Collection of messages (errors, warnings, info). - **pagination** (object) - Pagination information. ##### Pagination Object - **nextCursor** (string) - Cursor to use for fetching the next page. Empty string if no next page. - **previousCursor** (string) - Cursor to use for fetching the previous page. Empty string if no previous page. ##### Player Percent to Play Item Fields - **leagueId** (int) - League identifier. - **person** (object) - Player information. - **event** (object) - Event information. - **team** (object) - Team information. - **percentToPlay** (decimal) - Percent chance the player will play in the next game (0-100). - **notes** (string) - Additional notes or description. - **meta** (object) - Metadata about the item. ##### Person Fields - **id** (long) - Player identifier. - **firstName** (string) - Player first name. - **lastName** (string) - Player last name. ##### Event Fields - **id** (long) - Event identifier. - **name** (string) - Event name. - **eventStart** (datetime) - Event start time (UTC). - **statusId** (int) - Event status ID (1=PREGAME, 2=LIVE, 3=FINAL, etc.). ##### Team Fields - **id** (long) - Team identifier. - **name** (string) - Team name. ##### Meta Fields - **createdAt** (datetime) - Date the item was created (UTC). - **updatedAt** (datetime) - Date the item was last updated (UTC). ### Request Example ```json { "example": "request body" } ``` ### Response Example ```json { "data": [ { "leagueId": 1, "person": { "id": 12345, "firstName": "LeBron", "lastName": "James" }, "event": { "id": 67890, "name": "Lakers vs. Celtics", "eventStart": "2023-10-27T19:30:00Z", "statusId": 1 }, "team": { "id": 200, "name": "Los Angeles Lakers" }, "percentToPlay": 95.5, "notes": "Expected to play.", "meta": { "createdAt": "2023-10-26T10:00:00Z", "updatedAt": "2023-10-26T10:00:00Z" } } ], "success": true, "messages": [], "pagination": { "nextCursor": "eyJpZCI6MTIzNDUsImRpcmVjdGlvbiI6Im5leHQifQ==", "previousCursor": "" } } ``` ### Filtering Example To fetch percent-to-play data for a specific player: ``` GET /player/nba/percent-to-play?personId=12345 ``` To fetch percent-to-play data for a specific team: ``` GET /player/nba/percent-to-play?teamId=200 ``` ``` -------------------------------- ### Filter Player Percent to Play Data by Player ID (API Example) Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/player-percent-to-play Shows how to filter the player percent-to-play data to retrieve information for a specific player using their `personId`. ```bash GET /player/nba/percent-to-play?personId=12345 ``` -------------------------------- ### Filter Player Percent to Play Data by Team ID (API Example) Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/player-percent-to-play Demonstrates how to filter the player percent-to-play data to retrieve information for a specific team using their `teamId`. ```bash GET /player/nba/percent-to-play?teamId=200 ``` -------------------------------- ### Alternate Lines Example Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/odds The 'alternateLines' array provides additional betting options with different point spreads and prices for a given market. ```JSON "alternateLines": [ { "marketId": 43907422, "marketLineId": 3181318560, "marketSourceId": 91, "alternateNumber": 1, "points": 231.5, "price": -120, "sourcePrice": -120, "statusId": 1, "sequenceNumber": 1749141120194, "edge": -0.0842, "modifiedOn": "2025-06-05T16:32:07.592989Z" } ] ``` -------------------------------- ### GET /player/{league}/news Source: https://docs.unabated.com/guide/release-notes/101525 Retrieves paginated player news items, including injury updates, status changes, and team news. Supports filtering and ordering. ```APIDOC ## GET /player/{league}/news ### Description Get paginated player news items including injury updates, status changes, and team news. Supports cursor-based pagination with 25 items per page. You can filter by `personId` or `teamId` and order the results using the `order` parameter. ### Method GET ### Endpoint `/player/{league}/news` ### Parameters #### Path Parameters - **league** (string) - Required - The league identifier. #### Query Parameters - **personId** (string) - Optional - Filter news by player ID. - **teamId** (string) - Optional - Filter news by team ID. - **order** (string) - Optional - Sort order for news items (e.g., 'asc', 'desc'). ### Request Example ```json { "example": "GET /player/nfl/news?personId=123&order=desc" } ``` ### Response #### Success Response (200) - **items** (array) - A list of player news items. - **nextCursor** (string) - Cursor for the next page of results. #### Response Example ```json { "example": { "items": [ { "playerId": "123", "headline": "Player X out for season due to injury.", "timestamp": "2023-10-27T10:00:00Z" } ], "nextCursor": "someCursorString" } } ``` ``` -------------------------------- ### Get Player News with Pagination (HTTP) Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/player-news Fetches player news for a given league, supporting cursor-based pagination and sorting. Returns up to 25 items per page. Requires elevated access. ```HTTP GET /player/{league}/news # URL Parameters # league: string (e.g., "nfl", "nba", "mlb") # Query Parameters # cursor: string (Omit for first page) # order: string ("desc" or "asc") # personId: long (Optional) # teamId: int (Optional) ``` ```HTTP GET /player/nfl/news?cursor=eyJpZCI6MTIzNDUsImRpcmVjdGlvbiI6Im5leHQifQ== ``` ```HTTP GET /player/nfl/news?personId=67890 ``` ```HTTP GET /player/nfl/news?teamId=100 ``` -------------------------------- ### GET /bettype Source: https://docs.unabated.com/reference Retrieves bet type information. Supports filtering by 'changedSince' and 'api-version'. Requires API key authentication. ```APIDOC ## GET /bettype ### Description Retrieves information about bet types. This endpoint allows filtering results based on the last modification date and API version. ### Method GET ### Endpoint /bettype ### Query Parameters - **changedSince** (string) - Optional - Filters results to include only those modified since the specified date and time. - **api-version** (string) - Optional - Specifies the API version to use for the request. ### Headers - **X-API-Version** (string) - Optional - Specifies the API version. This might be redundant with the query parameter. - **X-Api-Key** (string) - Required - Your secret API key for authentication. ### Request Example ```bash curl 'https://data.unabated.com/bettype?changedSince=2023-01-01T00:00:00Z&api-version=1.0' \ --header 'X-API-Version: 1.0' \ --header 'X-Api-Key: YOUR_SECRET_TOKEN' ``` ### Response #### Success Response (200) - **data** (array) - An array of bet type objects. - **id** (integer) - The unique identifier for the bet type. - **name** (string) - The name of the bet type. - **description** (string) - A description of the bet type. - **betOn** (string) - The entity the bet is placed on. - **sides** (string) - Information about the sides involved in the bet. - **canDraw** (boolean) - Indicates if a draw is possible for this bet type. - **hasPoints** (boolean) - Indicates if points are applicable to this bet type. - **active** (boolean) - Indicates if the bet type is currently active. - **selectionCountType** (string) - The type of selection count. - **betRange** (string) - The range for the bet. - **betTypeId** (integer) - The unique identifier for the bet type. - **isFuture** (boolean) - Indicates if this is a future bet type. - **modifiedOn** (string) - The date and time the bet type was last modified. - **success** (boolean) - Indicates if the request was successful. - **messages** (array) - An array of messages related to the request. - **pagination** (object) - Pagination details. - **nextCursor** (string) - Cursor for the next page of results. - **previousCursor** (string) - Cursor for the previous page of results. #### Response Example ```json { "data": [ { "id": 1, "name": "Example Bet Type", "description": "This is an example bet type.", "betOn": "Team A", "sides": "Home/Away", "canDraw": false, "hasPoints": true, "active": true, "selectionCountType": "Single", "betRange": "Full Time", "betTypeId": 1, "isFuture": false, "modifiedOn": "2023-10-27T10:00:00Z" } ], "success": true, "messages": [], "pagination": { "nextCursor": null, "previousCursor": null } } ``` ``` -------------------------------- ### Market Source Line Object Example Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/odds This object details odds information from a specific book or source. It includes market IDs, odds ('price'), points, status, and edge. ```JSON "91": { "marketId": 43907422, "marketLineId": 3181318560, "marketSourceId": 91, "points": 230.5, "price": -110, "sourcePrice": -110, "sourceFormat": 1, "statusId": 1, "sequenceNumber": 1749141120194, "edge": -0.0642, "bestAltPrice": -110, "bestAltPoints": 230.5, "bestAltEdge": -0.0842, "disabled": false, "marketLineKey": "", "modifiedOn": "2025-06-05T16:32:07.592989Z", "alternateLines": [ /* Array of alternate line objects */ ] } ``` -------------------------------- ### GET /event/{league}/upcoming Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/events Retrieves a listing of all scheduled, cancelled, postponed, and delayed events within our markets window. Supports filtering by league and changes since a specific datetime. ```APIDOC ## GET /event/{league}/upcoming ### Description Retrieve a listing of all scheduled, cancelled, postponed, and delayed events, that are within our “markets window”. ### Method GET ### Endpoint `https://data.unabated.com/event/{league}/upcoming` ### Parameters #### Path Parameters - **league** (String) - Required - The league for which to retrieve data. Short name format (e.g. `mlb`, `nfl`, etc.). #### Query Parameters - **changedSince** (String) - Optional - The datetime after which changes or additions occurred to the events (in UTC time, ISO 8601 format). Will only return those rows. If null/empty, then all events are returned. ### Response #### Success Response (200) - **eventId** (Integer) - The unique static key of the event/game. - **name** (String or null) - The name of the event. - **eventStart** (String) - The scheduled start time of the game in ISO 8601 format (in UTC). - **eventEnd** (String or null) - The end time of the event in ISO 8601 format (in UTC), if any. For future use. - **statusId** (Integer) - See `event status` static lookup data. - **leagueId** (Integer) - The identifier of the league the event belongs to. - **seasonId** (Integer or null) - The identifier of the season. - **seasonPartId** (Integer or null) - The identifier of the part of the season. - **tournamentId** (Integer or null) - The identifier of the tournament, if any. - **gameClock** (String or null) - Contains a description of the game state. Typically the game clock. Example: 12:45 1H - **periodTypeId** (Integer or null) - Period Type (see Period Types table for valid values) that the game is currently in. - **overtimeNumber** (Integer or null) - A number indicating how many overtime periods the game went to. Examples: An MLB game that goes to the 12th inning will have the number 12. A CFB game which goes into 3 overtimes will have a 3. - **eventTeams** (Array) - An array of team objects participating in the event. Each object has fields including id, rotationNumber, and score. - **partnerEventData** (Object or null) - Partner-specific event data with partner keys and associated event IDs. - **modifiedOn** (String or null) - The last modification date and time in ISO 8601 format. #### Event Team Fields - **teamId** (Integer) - The identifier of the team. - **rotationNumber** (Integer or null) - The rotation number assigned to the team, if any. - **score** (Integer or null) - The current score for the team, if available. - **sideIndex** (Integer or null) - The side of the event for this team when known. 0 = Away or Over, 1 = Home or Under. - **name** (String or null) - The display name of the team, if available. #### Response Example ```json { "eventId": 12345, "name": "Example Game", "eventStart": "2023-10-27T18:00:00Z", "eventEnd": null, "statusId": 1, "leagueId": 1, "seasonId": 101, "seasonPartId": 1, "tournamentId": null, "gameClock": "10:30 2Q", "periodTypeId": 2, "overtimeNumber": 0, "eventTeams": [ { "teamId": 201, "rotationNumber": 1, "score": 14, "sideIndex": 1, "name": "Home Team" }, { "teamId": 202, "rotationNumber": 2, "score": 7, "sideIndex": 0, "name": "Away Team" } ], "partnerEventData": { "partnerA": { "eventId": "A123" } }, "modifiedOn": "2023-10-27T17:00:00Z" } ``` ``` -------------------------------- ### Market Key Format Example Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/odds Market keys are standardized strings used for identifying specific betting markets. This format includes event ID, bet type, bet subtype, period type ID, and game state. ```plaintext eid{eventId}:bt{betTypeId}:bst{betSubType}:pt{periodTypeId}:pid{personId}:tid{teamId}:sid{sideIndex}:{gameState} ``` -------------------------------- ### Event Lineup Subscription API Source: https://docs.unabated.com/guide/graphql-api-realtime-updates/subscriptions/event-lineup Subscribe to real-time event lineup updates for one or more leagues. Receive immediate notifications when starting lineups are projected, confirmed, or updated. ```APIDOC ## POST /websites/unabated/eventLineup ### Description Subscribe to real-time event lineup updates for one or more leagues. Receive immediate notifications when starting lineups are projected, confirmed, or updated. ### Method POST ### Endpoint /websites/unabated/eventLineup ### Parameters #### Query Parameters - **leagueIds** (array of integers) - Optional - Array of league IDs to subscribe to (e.g., `[1, 3]` for NFL and NBA). If omitted, you will receive updates for all leagues you have access to. ### Request Body This endpoint uses a GraphQL subscription and does not have a request body in the traditional sense. The subscription definition is sent as the request payload. ### Request Example ```graphql subscription { eventLineup(leagueIds: [3]) { eventLineup { leagueId date event { id name eventStart statusId } teams { side team { id name } lineupStatus confirmedAt starters { position player { id firstName lastName } } } meta { createdAt updatedAt } } messageTimestamp messageId correlationId } } ``` ### Response #### Success Response (200 OK) - **eventLineup** (object) - The event lineup data. - **messageTimestamp** (string) - Timestamp when the message was generated. - **messageId** (string) - Unique identifier for this message (for internal use). - **correlationId** (string) - Correlation identifier for message tracking (for internal use). #### Response Example ```json { "data": { "eventLineup": { "eventLineup": { "leagueId": 3, "date": "2024-03-15", "event": { "id": 12345, "name": "Team A vs Team B", "eventStart": "2024-03-15T19:00:00Z", "statusId": 1 }, "teams": [ { "side": "HOME", "team": { "id": 678, "name": "Team A" }, "lineupStatus": "PROJECTED", "confirmedAt": null, "starters": [ { "position": "PG", "player": { "id": 901, "firstName": "John", "lastName": "Doe" } } ] } ], "meta": { "createdAt": "2024-03-15T18:55:00Z", "updatedAt": "2024-03-15T18:55:00Z" } }, "messageTimestamp": "2024-03-15T18:55:05Z", "messageId": "msg-abc-123", "correlationId": "corr-xyz-789" } } } ``` ``` -------------------------------- ### Side Key Format Example Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/odds Side keys are used to identify market participants within the 'sides' object. The format varies depending on whether it's a team or a player prop. ```plaintext si{sideIndex}:tid{teamId} si{sideIndex}:pid{playerId} ``` -------------------------------- ### Iterating Through All Markets - JavaScript Source: https://docs.unabated.com/guide/rest-api-point-in-time-data/queries/market-data/odds Provides a JavaScript example for iterating through all available odds data. It traverses leagues, period types, game states, and individual markets, logging market information. This is useful for a comprehensive data overview. ```javascript // Iterate through leagues for (const [leagueCode, leagueData] of Object.entries(response.odds)) { // Iterate through period types for (const [periodName, periodData] of Object.entries(leagueData.periodTypes)) { // Iterate through game states (pregame/live) for (const [gameState, markets] of Object.entries(periodData)) { if (gameState === 'periodTypeId') continue; // Skip metadata // Iterate through markets for (const [marketKey, marketData] of Object.entries(markets)) { // Process market data console.log(`Market: ${marketKey}`); console.log(`Event: ${marketData.eventName}`); } } } } ```