Markets
A Market is a betting offer within a sport event. The SDK exposes six kinds, all sport-specific. Each one has a stable kind string you narrow on to access its fields — see Sport discrimination.
Basketball
Section titled “Basketball”Moneyline
Section titled “Moneyline”market.kind === 'market:basketball_match.moneyline'
Win/lose head-to-head, by period.
| Field | Type | Notes |
|---|---|---|
homeTeam | string | |
awayTeam | string | |
period | BasketballPeriod | See periods below. |
selectionKind | 'home/away' | Two outcomes. |
Selection results: 'home', 'away'.
Handicap (spread)
Section titled “Handicap (spread)”market.kind === 'market:basketball_match.handicap'
Point spread applied to the home team.
| Field | Type | Notes |
|---|---|---|
homeTeam | string | |
awayTeam | string | |
period | BasketballPeriod | |
handicap | number | Negative = home favored. e.g. -7.5 means home wins by ≥ 8 to cover. |
selectionKind | 'home/away' |
The same match typically has many handicap markets simultaneously, one per available line — -10.5, -9.5, -8.5, etc. All exposed as separate Market entries on the parent event.
market.kind === 'market:basketball_match.total'
Combined points over/under a threshold.
| Field | Type | Notes |
|---|---|---|
homeTeam | string | |
awayTeam | string | |
period | BasketballPeriod | |
scope | 'match' | 'home' | 'away' | Whose points: combined, home only, or away only. |
cut | number | Total points threshold, e.g. 224.5. |
selectionKind | 'over/under' |
Selection results: 'over', 'under'.
Player prop (over/under)
Section titled “Player prop (over/under)”market.kind === 'market:basketball_match.player_prop_over_under'
Player statistical line — points, rebounds, assists, etc.
| Field | Type | Notes |
|---|---|---|
playerName | string | |
propType | PlayerPropType | See list below. |
cut | number | Threshold for the prop. |
selectionKind | 'over/under' |
PlayerPropType values: points, rebounds, assists, threes, steals, blocks, points_rebounds, points_assists, rebounds_assists, points_rebounds_assists, other.
Football
Section titled “Football”Moneyline (1X2)
Section titled “Moneyline (1X2)”market.kind === 'market:football_match.moneyline'
Three-way result: home win, draw, or away win.
| Field | Type | Notes |
|---|---|---|
homeTeam | string | |
awayTeam | string | |
selectionKind | 'home/draw/away' |
Selection results: 'home', 'draw', 'away'.
Tennis
Section titled “Tennis”Moneyline
Section titled “Moneyline”market.kind === 'market:tennis_match.moneyline'
Head-to-head match winner.
| Field | Type | Notes |
|---|---|---|
competitor1 | string | |
competitor2 | string | |
selectionKind | 'competitor1/competitor2' |
Selection results: 'competitor1', 'competitor2'.
Basketball periods
Section titled “Basketball periods”BasketballPeriod is a string-literal union:
'full_match''1st_half' | '2nd_half''1st_quarter' | '2nd_quarter' | '3rd_quarter' | '4th_quarter''overtime'Most NBA markets have entries for full_match, both halves, and all four quarters. Overtime appears only when relevant.
Synthetic markets
Section titled “Synthetic markets”Each market carries isSynthetic: boolean. true means the SDK derived this market rather than the bookmaker reporting it directly (e.g. a moneyline implied from a 0-handicap spread). Treat synthetic and reported markets the same way for reading — the distinction matters mainly for analytics on which originals the bookmaker actually publishes.
Common methods on Market
Section titled “Common methods on Market”market.selections—ReadonlyMap<SelectionId, Selection>.market.getSelection(id)— single lookup.market.getSelectionByResult(result)— find by outcome (e.g.getSelectionByResult('over')).market.calculateMargin()— bookmaker margin (overround) computed from current quotes.