GetOdds: Get Odds for Non-Settled Events in a Given Sport

Description Usage Arguments Details Value Examples

View source: R/GetOdds.R

Description

Queries all odds offered for a given sport, which can be filtered by league and/or event ID, and narrowed to include only live events.

Usage

1
2
3
GetOdds(sportid, leagueids = NULL, eventids = NULL, since = NULL,
  islive = 0, oddsformat = "AMERICAN", tableformat = "mainlines",
  force = TRUE)

Arguments

sportid

An integer giving the sport. If this is missing in interactive mode, a menu of options is presented to the user.

leagueids

A vector of league IDs, or NULL.

eventids

A vector of event IDs, or NULL.

since

To receive only listings updated since the last query, set since to the value of last from the previous fixtures response. Otherwise it will query all listings.

islive

When TRUE, retrieve only live events.

oddsformat

Format for the returned odds. One of "AMERICAN", "DECIMAL", "HONGKONG", "INDONESIAN", or "MALAY".

tableformat

One of

  • "mainlines" for mainlines only (the default);

  • "long" for a single record for each spread/total on an event;

  • "wide" for all lines as one record; or

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

force

Currently ignored.

Details

This function will raise an error if the API does not return HTTP status OK. For information on the possible errors, see the API documentation for Get Odds.

Value

A data frame of odds.

Examples

1
2
3
4
SetCredentials("TESTAPI","APITEST")
AcceptTermsAndConditions(accepted = TRUE)
# We can run without parameters, and will be given a selection of sports
GetOdds()

marcoblume/pinnacle.API documentation built on Sept. 11, 2019, 4:05 a.m.