getBetHistory: getBetHistory getBetHistory

Usage Arguments Author(s) Examples

Usage

1
getBetHistory(betTypesIncluded = 'S', detailed = TRUE, eventTypeIds = list(int = 7), marketId = 0, locale = NULL, timezone = NULL, marketTypesIncluded = list(MarketTypeEnum = 'O'), placedDateFrom = '2011-01-01T01:00:00Z', placedDateTo =  format(Sys.Date(), "%Y-%m-%dT%H:%M:%SZ"), recordCount = 100, sortBetsBy = 'BET_ID', startRecord = 1, service = Exchange)

Arguments

betTypesIncluded

betTypesIncluded

detailed

detailed

eventTypeIds

eventTypeIds

marketId

marketId

locale

locale

timezone

timezone

marketTypesIncluded

marketTypesIncluded

placedDateFrom

placedDateFrom

placedDateTo

placedDateTo

recordCount

recordCount

sortBetsBy

sortBetsBy

startRecord

startRecord

service

service

Author(s)

colin@betwise.co.uk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function(
  betTypesIncluded="S",
  detailed=TRUE,
  eventTypeIds=list(int=7),
  marketId=0,
  locale=NULL, timezone=NULL,
  marketTypesIncluded=list(MarketTypeEnum="O"),
  placedDateFrom="2011-01-01T01:00:00Z",
  placedDateTo=format(Sys.Date(),"%Y-%m-%dT%H:%M:%SZ"),
  recordCount=100,
  sortBetsBy="BET_ID",
  startRecord=1,
  service=Exchange)
{
  v <- .bfapi(match.call(), service=service, allowNull=TRUE)
  z <- .xmlp("errorCode", v)
  if(is.null(z)) return(v)
  if(z != "OK") return(z)
  x <- .xmlp("betHistoryItems",v)
  x <- .xml2list(x)
  names(x) <- c()
  x <- lapply(x,.xml2list)
  foreach(w=x) %do% {w$matches = .xmlarray2dataframe(w$matches);w}
  }

bwlewis/betfair documentation built on May 13, 2019, 9:05 a.m.