| Title: | Client for the 'Odds-API.io' Sports Betting Odds API |
|---|---|
| Description: | Query live and upcoming sports betting odds from the 'Odds-API.io' REST API <https://docs.odds-api.io>. Covers sports, bookmakers, leagues, events, per-event odds, value bets and arbitrage bets across 365+ bookmakers, returned as tidy data frames. An API key is required; a free tier is available. |
| Authors: | Markus Bjermeland [aut, cre] |
| Maintainer: | Markus Bjermeland <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.1 |
| Built: | 2026-09-18 20:22:06 UTC |
| Source: | https://github.com/odds-api-io/odds-api-r |
Returns arbitrage opportunities across the given bookmakers, including the legs and optimal stake split for each opportunity.
oa_arbitrage_bets( bookmakers, limit = NULL, include_event_details = FALSE, api_key = NULL )oa_arbitrage_bets( bookmakers, limit = NULL, include_event_details = FALSE, api_key = NULL )
bookmakers |
Character vector of bookmaker names to compare. Required by the API. |
limit |
Optional maximum number of results (default 50, max 500). |
include_event_details |
If |
api_key |
API key. Defaults to the |
A data frame with one row per arbitrage opportunity. The legs
and optimalStakes columns are list-columns of data frames.
## Not run: arbs <- oa_arbitrage_bets(c("Bet365", "SingBet"), include_event_details = TRUE) arbs[order(-arbs$profitMargin), ] ## End(Not run)## Not run: arbs <- oa_arbitrage_bets(c("Bet365", "SingBet"), include_event_details = TRUE) arbs[order(-arbs$profitMargin), ] ## End(Not run)
Returns the bookmakers covered by 'Odds-API.io'. This endpoint does not require an API key.
oa_bookmakers(api_key = NULL)oa_bookmakers(api_key = NULL)
api_key |
API key. Defaults to the |
A data frame with one row per bookmaker (columns name and
active).
## Not run: bookmakers <- oa_bookmakers() head(bookmakers) ## End(Not run)## Not run: bookmakers <- oa_bookmakers() head(bookmakers) ## End(Not run)
Returns upcoming, live or settled events. When to is omitted the API
returns events within the next 14 days, hard-capped at 5000 rows per
response; use limit and skip to paginate.
oa_events( sport, league = NULL, status = NULL, from = NULL, to = NULL, limit = NULL, skip = NULL, bookmaker = NULL, participant_id = NULL, api_key = NULL )oa_events( sport, league = NULL, status = NULL, from = NULL, to = NULL, limit = NULL, skip = NULL, bookmaker = NULL, participant_id = NULL, api_key = NULL )
sport |
Sport slug, e.g. |
league |
Optional league slug, e.g. |
status |
Optional statuses to include: any of |
from, to
|
Optional RFC 3339 date-times bounding the event window,
e.g. |
limit |
Optional maximum number of events (capped at 5000). |
skip |
Optional pagination offset, used together with |
bookmaker |
Optional bookmaker name; only events with odds from that bookmaker are returned. |
participant_id |
Optional team or participant id to filter by. |
api_key |
API key. Defaults to the |
A data frame with one row per event.
## Not run: events <- oa_events("football", league = "england-premier-league") live <- oa_events("football", status = c("pending", "live")) ## End(Not run)## Not run: events <- oa_events("football", league = "england-premier-league") live <- oa_events("football", status = c("pending", "live")) ## End(Not run)
List leagues for a sport
oa_leagues(sport, api_key = NULL)oa_leagues(sport, api_key = NULL)
sport |
Sport slug, e.g. |
api_key |
API key. Defaults to the |
A data frame with one row per league (columns name, slug and
eventsCount).
## Not run: leagues <- oa_leagues("football") head(leagues) ## End(Not run)## Not run: leagues <- oa_leagues("football") head(leagues) ## End(Not run)
Fetches odds for one event from up to 30 bookmakers and returns them as a tidy data frame with one row per price line.
oa_odds(event_id, bookmakers, api_key = NULL)oa_odds(event_id, bookmakers, api_key = NULL)
event_id |
Event id, from |
bookmakers |
Character vector of bookmaker names (max 30), e.g.
|
api_key |
API key. Defaults to the |
A data frame with one row per odds line, with columns eventId,
bookmaker, market, updatedAt and the price columns present in the
response (such as home, draw, away, hdp, over, under).
## Not run: odds <- oa_odds(123456, bookmakers = c("Bet365", "SingBet")) subset(odds, market == "ML") ## End(Not run)## Not run: odds <- oa_odds(123456, bookmakers = c("Bet365", "SingBet")) subset(odds, market == "ML") ## End(Not run)
Returns the sports covered by 'Odds-API.io'. This endpoint does not require an API key.
oa_sports(api_key = NULL)oa_sports(api_key = NULL)
api_key |
API key. Defaults to the |
A data frame with one row per sport (columns name and slug).
## Not run: sports <- oa_sports() head(sports) ## End(Not run)## Not run: sports <- oa_sports() head(sports) ## End(Not run)
Returns value betting opportunities for a bookmaker, calculated by comparing its odds against the market consensus.
oa_value_bets( bookmaker, sport = NULL, league = NULL, include_event_details = FALSE, api_key = NULL )oa_value_bets( bookmaker, sport = NULL, league = NULL, include_event_details = FALSE, api_key = NULL )
bookmaker |
Bookmaker name, e.g. |
sport |
Optional sport slug filter, e.g. |
league |
Optional league slug filter; requires |
include_event_details |
If |
api_key |
API key. Defaults to the |
A data frame with one row per value bet, including the bet side, expected value and bookmaker odds.
## Not run: vb <- oa_value_bets("Bet365", include_event_details = TRUE) vb[vb$expectedValue > 0.03, ] ## End(Not run)## Not run: vb <- oa_value_bets("Bet365", include_event_details = TRUE) vb[vb$expectedValue > 0.03, ] ## End(Not run)