ASD Platform
Odds & Markets API

Odds & Markets API

Markets and money lines

Every oddType the Odds & Markets API serves, how a price is represented for athlete and team sports, and how to convert decimal odds.

Markets for athlete and field sports (surfing, racing, motocross, bull riding, combat) come from one endpoint, selected by oddType. Team sports with their own routes (curling, lacrosse, table tennis, jai alai) return money line, spread and total groups instead. This page covers both, then shows how to work with the prices.

Requesting a market

GET /api/v1/public/events/{eventId}/{oddType}
curl -s "https://api.altsportsdata.com/api/v1/public/events/$EVENT_ID/eventWinner" \
  -H "X-API-Key: $ALTSPORTSDATA_API_KEY"
import os
import httpx

BASE = "https://api.altsportsdata.com/api/v1/public"
HEADERS = {"X-API-Key": os.environ["ALTSPORTSDATA_API_KEY"]}

def get_market(event_id: str, odd_type: str, **params: str | int) -> dict:
    resp = httpx.get(f"{BASE}/events/{event_id}/{odd_type}", headers=HEADERS, params=params)
    resp.raise_for_status()
    body = resp.json()
    return body["data"] if isinstance(body, dict) and "data" in body else body  # unwrap the envelope when present

market = get_market(os.environ["EVENT_ID"], "eventWinner")
for outcome in market["eventWinner"]:
    print(outcome["athlete"]["lastName"], outcome["odds"], outcome["status"])
const BASE = "https://api.altsportsdata.com/api/v1/public";

async function getMarket(eventId: string, oddType: string, params: Record<string, string> = {}) {
  const url = new URL(`${BASE}/events/${eventId}/${oddType}`);
  for (const [k, v] of Object.entries(params)) url.searchParams.set(k, v);
  const resp = await fetch(url, { headers: { "X-API-Key": process.env.ALTSPORTSDATA_API_KEY! } });
  if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
  const body = await resp.json();
  return body.data ?? body; // unwrap the envelope when present
}

const market = await getMarket(process.env.EVENT_ID!, "eventWinner");
for (const o of market.eventWinner) console.log(o.athlete.lastName, o.odds, o.status);

The response is an EventOddsResponse. It carries the event identifiers (publicId, eventId, numericEventId), the oddType you asked for, the sport and competition keys, and one array per market type. The array named after your oddType holds the rows.

Check the competition's supportedMarkets on GET /sports before you ask for a market. If the event has no odds for that oddType, the endpoint returns 404.

Every oddType

oddTypeWhat it pricesRow schema
eventWinnerEach athlete to win the contest.EventWinnerDto
secondPlaceEach athlete to place second overall.EventWinnerDto
holeShotEach athlete to be first at the first turn.EventWinnerDto
heatWinnerAn athlete to win a heat or grouped matchup within a heat, against the heat's known participants. Grouped by round, then heat.EventHeatOddsResponse
fastestLapEach athlete to set the fastest lap of the contest.FastestLapDto
headToHeadOne athlete to finish ahead of another overall, for formats with no native head-to-head segment.PlayerHeadToHeadDto
overUnderOver or under a stat line for an athlete. Narrow it with overUnderSubMarketType.OverUnderOddsDto
multiOverUnderWhich athletes finish over a given stat value at the end of the event.MultiOverUnderDto
podiumsAn athlete to finish first, second or third.EventWinnerDto
showsAn athlete to finish first or second.EventWinnerDto
propBetsPropositions outside the standard markets, for example "Reaches quarterfinals". May or may not be tied to one athlete.PropBetsDto
dreamTeamDream team combinations.DreamTeamDto
eventExactaAthletes to finish in an exact order across the event.ProjectionExactasResponse
heatExactaAthletes to finish in an exact order within a heat.ProjectionExactasHeatResponse
raceTop10Each athlete to finish in the top 10.EventWinnerDto
raceTop5Each athlete to finish in the top 5.EventWinnerDto
raceTop3Top 3 finish. Accepted as an oddType, but the response schema has no raceTop3 array; see the note below.Not documented
teamMarketsPBR Teams-series games only: the team money line plus match-scoped and team-scoped qualified-rides totals.TeamMarketDto

raceTop3

The live spec accepts raceTop3 as an oddType but EventOddsResponse defines no raceTop3 field. Confirm the response shape with the account team before you build on it. For a top-3 finish, podiums is fully documented.

Modifiers

Query parameterValuesApplies to
exactasType2, 3, 4Exacta markets. 2 is an exacta (first two in order), 3 a trifecta, 4 a superfecta. The spec itself only labels it "Exactas Type". Each row's athletes array lists the athletes in the priced order.
overUnderSubMarketTypefinishingPosition, points, gapToLeadersoddType=overUnder only. Picks which stat the line is set on.
curl -s "https://api.altsportsdata.com/api/v1/public/events/$EVENT_ID/overUnder?overUnderSubMarketType=finishingPosition" \
  -H "X-API-Key: $ALTSPORTSDATA_API_KEY"

Money lines for athlete sports

There is no moneyline oddType. For an athlete or field sport, the winner market is eventWinner, and each row is one athlete's price to win. An EventWinnerDto row has:

FieldTypeMeaning
outcomeIdstringID of this outcome. Use it to reference the selection.
idstringID of the odd.
referenceIdnumberNumeric ID of the odd.
positionnumberThe finishing position the odd refers to (for example 1 for a win).
probabilitydecimalProbability between 0 and 1.
oddsdecimalDecimal odds: the probability translated to a price, including any pre-agreed margin.
statusenumMarket status: OPEN, SUSPENDED, CLOSED, COMPLETED or VOID.
settlementenumNOT_SET until settled, then WIN, LOSE or VOID.
updatedAtstringWhen the price last changed.
athleteAthleteResponseName, nationality, gender, stance, team and other athlete details.

The same row shape serves secondPlace, holeShot, podiums, shows, raceTop5 and raceTop10. fastestLap rows use FastestLapDto, which has the same fields.

Accept bets only while status is OPEN. Settle from settlement, not from your own reading of results.

Prop bets settle differently

PropBetsDto.settlement uses its own values: OPEN, PAYOUT, DRAW and VOID. Every other athlete market uses WIN, LOSE, VOID and NOT_SET.

Other athlete market shapes

  • heatWinner returns rounds (roundId, roundName, roundNo, roundStatus), each with heats (heatId, heatName, heatNo, heatStatus), each with athletes. Every athlete entry carries outcomeId, odds, probability, seedNo, status and settlement.
  • headToHead returns eventParticipant1 and eventParticipant2, each with odds, position, status, settlement and athlete, plus winnerParticipantId once decided.
  • overUnder returns statValue (the line), finalStatValue (the result once declared), status, athlete, and over and under sides. Each side has outcomeId, odds and settlement. The sides carry no probability field, so derive it from odds if you need it.
  • multiOverUnder returns statValue and a selections array. Each selection has probability, odds, status, settlement, finalStatValue and athlete.
  • heatExacta is grouped by round (roundId, name, roundNo, roundStatus) and then heats, like heatWinner.
  • eventExacta rows return athletes (the order), position, odds, probability, trueProbability, hasModifiedProbability, holdingPercentage, voided, draw, status and settlement.

Money lines for team sports

Team sports have their own odds routes. The prices sit in named groups instead of oddType arrays.

RouteTop-level markets
GET /events/gsoc/{id}/odds (curling)matchWinner, ends (per end), futures
GET /events/nll/{id}/odds (lacrosse)matchWinner
GET /events/mltt/{id}/odds (table tennis)eventWinner (whole event), games (per game)
GET /events/jaialai/{id}/oddseventWinner, matchWinner, sets, futures

Each market group has a groupId, a publicId and up to three sub-markets: moneyLine, spread and total. Each sub-market has a marketId, a status and a selection list. futures groups are the exception: they carry groupId, type and a moneyLine array only.

{
  "matchWinner": {
    "groupId": "match",
    "publicId": "…",
    "moneyLine": {
      "marketId": "…",
      "status": "ACTIVE",
      "selection": [
        { "outcomeId": "…", "name": "Fireballs", "probability": 42.75, "odds": 2.34, "settlement": "LOSER" },
        { "outcomeId": "…", "name": "Away team", "probability": 57.25, "odds": 1.66, "settlement": "WINNER" }
      ]
    },
    "spread": { "marketId": "…", "status": "…", "selection": [{ "outcomeId": "…", "name": "…", "value": -1.5, "isHomeTeam": true, "odds": 1.9, "probability": 0.5 }] },
    "total": { "marketId": "…", "status": "…", "selection": [{ "outcomeId": "…", "type": "OVER", "ends": 8.5, "odds": 1.9, "probability": 0.5 }] }
  }
}

The values above are illustrative; ACTIVE, LOSER, 42.75 and 2.34 are the spec's own examples. Note that the probability here looks like a percentage. The fields are from the spec:

  • Money line selection (BaseSelectionDto): outcomeId, name (the team), probability, odds (decimal, with margin), settlement.
  • Spread selection (SpreadWithSelectionDto): the money line fields plus value (the spread) and isHomeTeam.
  • Total selection (TotalSelectionDto): outcomeId, type (OVER or UNDER), ends (the line), odds, probability, settlement, homeLineup, awayLineup.

MLTT routes use their own selection shapes: settlement is shown as NOT_SET before settling, money line selections also carry isHomeTeam, and totals use sets (the points line) instead of ends. Jai alai totals also use sets.

In some groups spread and total are arrays of sub-markets rather than a single one (for example jai alai matchWinner, MLTT eventWinner and GSOC ends). Check the reference for the route you use.

PBR team games: teamMarkets

PBR Teams-series games use oddType=teamMarkets on the standard markets endpoint. Each TeamMarketDto has id, referenceId, marketType (for example moneyline), name, line, status and updatedAt.

  • Money line: line is null and outcomes lists one entry per team, each with outcomeId, name, team (id, name, isHomeTeam), odds, probability and settlement.
  • Totals: line is the qualified-rides threshold, with named over and under sides. team names the team for a team-scoped total and is null for the match total.

Market status and settlement

There is no settlement endpoint. Read market state and results from the odds objects themselves, and poll them until they settle.

Status tells you whether a market can take bets:

ValueWhereMeaning
OPENstatus / marketStatus on athlete and futures marketsOpen for betting.
SUSPENDEDsameTemporarily not taking bets. Hold, then check again.
CLOSEDsameNo longer taking bets; awaiting result.
COMPLETEDsameResult is in. Read settlement.
VOIDsameMarket voided.
ACTIVEstatus on team-sport group holders (moneyLine, spread, total)Spec example value. These group statuses are free strings, not an enum.

Settlement uses a different vocabulary depending on the market:

SchemasValues
EventWinnerDto, FastestLapDto, SelectionDto, OverUnderOdds, exacta rows, DreamTeamDtoWIN, LOSE, VOID, NOT_SET
TeamMarketOutcomeDto, TeamMarketSelectionDtoFree string; NOT_SET before settlement
PropBetsDtoOPEN, PAYOUT, DRAW, VOID
GSOC, NLL and jai alai team selections (BaseSelectionDto, SpreadWithSelectionDto, TotalSelectionDto)WINNER or LOSER (free string described as "winner or loser")

Map each vocabulary to your own settlement states per schema, not with one global lookup.

Check the probability scale per market

probability is not on one scale across the API. On EventWinnerDto and similar athlete rows it is between 0 and 1. On team selections (BaseSelectionDto, TotalSelectionDto), futures Odd rows, and the heatWinner, propBets and exacta rows, the spec examples look like percentages (for example 42.75). Check the range of the field for each market you consume, or derive probability from odds with 1 / odds.

Working with the prices

All prices are decimal odds. A decimal price is the total return per unit staked, stake included: a 1 unit bet at 2.50 returns 2.50.

All prices are marginated decimal odds. The API does not return American or fractional odds; convert them yourself as shown below.

Implied probability is 1 / odds. Because odds includes the pre-agreed margin, 1 / odds is a little higher than the true probability, and the implied probabilities of a whole market add up to more than 1. The difference is the margin.

American odds from a decimal price d:

  • If d >= 2.0: American = +(d - 1) × 100. Example: 2.50 → +150.
  • If d < 2.0: American = -100 / (d - 1). Example: 1.344 → -291.
def to_american(decimal_odds: float) -> int:
    if decimal_odds >= 2.0:
        return round((decimal_odds - 1) * 100)
    return round(-100 / (decimal_odds - 1))

def implied_probability(decimal_odds: float) -> float:
    return 1 / decimal_odds

def market_margin(decimal_prices: list[float]) -> float:
    """Overround of a complete market, e.g. 0.05 for a 5% margin."""
    return sum(1 / d for d in decimal_prices) - 1
export const toAmerican = (d: number): number =>
  d >= 2 ? Math.round((d - 1) * 100) : Math.round(-100 / (d - 1));

export const impliedProbability = (d: number): number => 1 / d;

/** Overround of a complete market, e.g. 0.05 for a 5% margin. */
export const marketMargin = (prices: number[]): number =>
  prices.reduce((sum, d) => sum + 1 / d, 0) - 1;

Fractional odds are d - 1 expressed as a fraction, so 2.50 is 3/2.

On this page