Pointing a SportsGameOdds client at SockOdds

SockOdds is the Australian extension of the SportsGameOdds v2 schema, so an existing SGO integration needs one change: the base URL.

  1. Change the base URL to https://api.sockodds.com/v2 and the key to an SockOdds key.
  2. Keep your parsing: eventID, odds[oddID], byBookmaker, opposingOddID, status, the envelope — all unchanged.
  3. Expect the leagueIDs SGO doesn't carry (AFL, AFLW, NRL, RUGBYLEAGUE_NRLW, RUGBYLEAGUE_STATE_ORIGIN, RUGBYUNION_INTERNATIONALS, IPL) and Australian bookmakerIDs (sportsbet, unibet, tab, playup, tabtouch, betright, …).
  4. Replace any stream subscription with polling every ~2 minutes (/stream/events answers 501).
  5. Read the extra signals: decimal on every book, info.stale, notice.

SDK

import SportsGameOdds from "sports-odds-api";

const client = new SportsGameOdds({ apiKeyHeader: "YOUR_API_KEY", baseURL: "https://api.sockodds.com/v2" });
const res = await client.events.get({ leagueID: ["AFL"] });
console.log(res.data);
from sports_odds_api import SportsGameOdds

client = SportsGameOdds(api_key_header="YOUR_API_KEY", base_url="https://api.sockodds.com/v2")
res = client.events.get({ league_id: ["afl"] })
print(res.data)
require "sports_odds_api"

client = SportsOddsAPI::Client.new(api_key_header: "YOUR_API_KEY", base_url: "https://api.sockodds.com/v2")
res = client.events.get({ league_id: ["afl"] })
puts res.data
client := sportsoddsapi.NewClient(option.WithAPIKeyHeader("YOUR_API_KEY"), option.WithBaseURL("https://api.sockodds.com/v2"))
res, err := client.Events.Get({ leagueID: ["AFL"] })
if err != nil { log.Fatal(err) }
fmt.Println(res.Data)
SportsGameOddsClient client = SportsGameOddsOkHttpClient.builder()
    .apiKeyHeader("YOUR_API_KEY").baseUrl("https://api.sockodds.com/v2").build();
var res = client.events.get({ leagueID: ["AFL"] });
System.out.println(res.items());

Differences at a glance

SockOddsSportsGameOdds
Base URLhttps://api.sockodds.com/v2https://api.sportsgameodds.com/v2
Key prefixso_live_…
Bookmakers25, 21 Australian85+, US/EU
Australian codesAFL, AFLW, NRL, NRLW, State of Origin, rugby union, IPLNot carried
Streaming501WebSocket on All-Star
Open/close oddsNot snapshottedincludeOpenCloseOdds
Extra fieldsdecimal, info.stale, links.betslip
ShapeIdenticalIdentical

Using both feeds for two markets is common: join on eventID and oddID.

Need help?FAQ · Email · Contact