showOddsDF: showOddsDF - Takes a GetOdds JSON response and combines with...

Description Usage Arguments Value Examples

Description

showOddsDF - Takes a GetOdds JSON response and combines with Fixtures and Inrunning

Usage

1
2
3
showOddsDF(sportid, leagueids = NULL, since = NULL, islive = 0,
  force = TRUE, tableformat = "mainlines", namesLength = 3,
  attachLeagueInfo = TRUE, oddsformat = "AMERICAN", fixtures_since = NULL)

Arguments

sportid

(optional) The sportid to get odds from, if none is given, a list of options and a prompt are provided

leagueids

numeric vector of leagueids - can get as output from GetLeagues

since

numeric This is used to receive incremental updates. this will give all lines that have changed odds.

islive

boolean if TRUE retrieves ONLY live events

force

boolean default set to TRUE, forces a reload of the cache.

tableformat
  • 'mainlines' (default), only shows mainlines

  • 'long' for a single record for each spread/total on an event,

  • 'wide' for all lines as one record,

  • 'subtables' all lines for spreads/totals stored as nested tables

namesLength

how many identifiers to use in the names, default is 3

attachLeagueInfo

whether or not to include league information in the data

oddsformat

default AMERICAN, see API manual for more options bettable leagues

fixtures_since

if set, get only fixtures that were posted since last.

Value

a dataframe combining GetOdds and GetFixtures data, containing NA's where levels of factors do not have a value. Naming convention is as follows, Example: spread.altLineId.N is the altLineId associated with spread.hdp.(N+1) whereas spread.hdp refers to the mainline. spread.altLineId is the first alternate, and equivalent to spread.altLineId.0

Examples

1
2
3
4
SetCredentials("TESTAPI","APITEST")
AcceptTermsAndConditions(accepted=TRUE)
# Run without arguments, it will prompt you for the sport
showOddsDF()

pinnacle.API documentation built on May 2, 2019, 10:24 a.m.