betfaiR

Having logged in using the betfair function, the environment contains the venues method. Which can be used to get the venues associated with the various horse racing and greyhound markets.

usage

bf$venues(filter = marketFilter())

arguments

param details
filter select desired markets, see marketFilter for various parameters to filter by, or the relevant help pages on Betfair. If nothing is entered, all venues are returned

return

The function returns a dataframe of venues associated with the markets selected by the filter parameter, the dataframe contains the following:

variable details
venue horse racing or greyhound venue (racecourse or racetrack)
marketCount number of markets associated with the venue

examples

library(betfaiR)
# login
bf <- betfair(usr = Sys.getenv("bf_usr"), pwd = Sys.getenv("bf_pwd"), key = Sys.getenv("bf_key"))
Login successful
# return all venues
tmp <- bf$venues()
head(tmp)
                             venue marketCount
1                          Kolkata           2
2                        Hyderabad           3
3 Parx Racing At Philadelphia Park          15
4                  Louisiana Downs          18
5                       San Isidro           9
6            Sam Houston Race Park          21
# return all venues from Great Britain
tmp <- bf$venues(filter = marketFilter(marketCountries = "GB"))
head(tmp)
      venue marketCount
1 Sheffield          24
2 Towcester          52
3 Newcastle          50
4   Kinsley          21
5    Harlow          40
6 Lingfield          33