toa_sports_odds: *Find odds for the sports which are accessible through the...

View source: R/toa_sports_odds.R

toa_sports_oddsR Documentation

Find odds for the sports which are accessible through the Odds API

Description

Get the odds for the sports which the Odds API provides coverage

   try(toa_sports_odds(sport_key = 'baseball_mlb', 
                       regions = 'us', 
                       markets = 'spreads', 
                       odds_format = 'decimal',
                       date_format = 'iso'))

Usage

toa_sports_odds(
  sport_key,
  regions = "us",
  markets = "spreads",
  odds_format = "decimal",
  date_format = "iso"
)

Arguments

sport_key

The sport_key to look up odds for. See toa_sports() for a full lookup of sport_key values.

regions

The region to pull odds from. Options include:

  • us

  • uk

  • us

  • eu

  • au Multiple can be specified if comma delimited.

markets

The type of odds to return. Multiple can be specified if comma delimited. Options include:

  • h2h

  • spreads

  • totals

odds_format

The format in which to return odds. Options include:

  • decimal

  • american

date_format

Date format. Options include:

  • iso

  • unix

Value

Sports for which The Odds API provides betting information for as a tibble:

col_name types
id character
sport_key character
sport_title character
commence_time character
home_team character
away_team character
bookmaker_key character
bookmaker character
last_update character
market_key character
outcomes_name character
outcomes_price numeric
outcomes_point numeric

Examples


   try(toa_sports_odds(sport_key = 'basketball_ncaab', 
                       regions = 'us', 
                       markets = 'spreads', 
                       odds_format = 'decimal',
                       date_format = 'iso'))



oddsapiR documentation built on March 31, 2023, 5:27 p.m.