Fetches current odds for a sport. The response uses the same event
shape as The Odds API v4 (events containing bookmakers, each with
markets, each with outcomes). Validate the returned R structures,
identities and supported filters when migrating an existing client.
Usage
pa_odds(
sport,
regions = "us",
markets = "h2h",
odds_format = c("decimal", "american"),
bookmakers = NULL,
event_ids = NULL,
commence_time_from = NULL,
commence_time_to = NULL,
sandbox = NULL
)Arguments
- sport
A sport key such as
"basketball_nba"or a short league name such as"nba","nfl","nhl"or"epl". Seepa_sports().- regions
Comma-separated regions string or character vector, default
"us".- markets
Markets to include, e.g.
"h2h,spreads,totals". Character vectors are collapsed with commas.- odds_format
"decimal"or"american".- bookmakers
Optional bookmaker keys to filter to.
- event_ids
Optional event ids to filter to (live mode only).
- commence_time_from, commence_time_to
Optional ISO 8601 bounds on event start time (live mode only).
- sandbox
Logical or
NULL.TRUEuses the keyless sandbox endpoint,FALSEthe live endpoint,NULL(default) defers to the globalpa_sandbox()toggle.