Migration Guide — V1 to V2 API
SockOdds has only ever served the v2 schema. This page exists for teams arriving from a SportsGameOdds v1 integration: the changes below are the v1 → v2 differences you must make, and the resulting v2 code runs against SockOdds unchanged.
Overview of changes
- Combined /odds and /events endpoints — everything is on
/v2/events; there is no/v2/odds. - Deeplinks on events —
links.bookmakersandlinks.betslip. - Bookmaker prices persist when unavailable — every
byBookmakerentry carriesavailable; filter on it. - Unique playerIDs —
PLAYER_NAME_NUMBER_LEAGUE(PATRICK_MAHOMES_1_NFL), the same across teams. - Many more request options on the events endpoint.
Upgrade guide
Swap the base URL
- https://api.sportsgameodds.com/v1/...
+ https://api.sockodds.com/v2/...Point v1/events and v1/odds at the combined v2/events
- /v1/events...
- /v1/odds...
+ /v2/events...Odds field renames
odds→fairOddsspread→fairSpreadoverUnder→fairOverUnderisFallbackOdds→ removed (no placeholder even-money prices)
Status field renames
hasMarketOdds/hasAnyOdds→oddsPresentanyOddsAvailable/marketOddsAvailable→oddsAvailablenextUpdateAt→ removed (useinfo.lastUpdatedAt)
Add includeAltLines if you need alt lines
Alt lines are off by default in v2.
Filter unavailable byBookmaker odds
+ Event.odds.<oddID>.byBookmaker.<bookmakerID>.availablePlayer name paths
Player.firstName→Player.names.firstNameon/players(event players keep the flat fields)
New features & non-breaking changes
- The API key can be a query param (
?apiKey=). - New params on
/v2/events:type,oddsPresent,includeOpposingOdds(aliasincludeOpposingOddIDs),includeAltLines,bookmakerID,teamID,playerID,live,started,ended,cancelled,finalized,includeOpenCloseOdds(accepted; no snapshots yet). marketNameon every market;decimalon every bookmaker entry.- Default/max limits:
/events10/100;/teamsand/players50/250.