getAccountStatement: Get Account Statement

View source: R/getAccountStatement.R

getAccountStatementR Documentation

Get Account Statement

Description

getAccountStatement returns an account statement via the Betfair API.

Usage

getAccountStatement(
  localeString = NULL,
  fromRecordValue = 0,
  recordCountValue = NULL,
  fromDate = NULL,
  toDate = NULL,
  includeItemValue = NULL,
  walletValue = NULL,
  suppress = FALSE,
  flag = FALSE,
  sslVerify = TRUE
)

Arguments

localeString

String. The language to be used where applicable. If not specified, the customer account default is returned. Default is NULL. This function will convert NULL to 0 as it requires a value to increment in the loop where there are more than 100 records. Optional.

fromRecordValue

int. Specifies the first record that will be returned. Records start at index zero. Default parameter value is NULL, which Betfair interprets as 0. Optional.

recordCountValue

int. Specifies the maximum number of records to be returned. Note that there is a page size limit of 100. If the number is greater than 100 then the function will loop to gather all records. Optional

fromDate

Datetime (ISO 8601 format). Upper bound of date range (inclusive). Default value is NULL, which means that the latest available items will be in range. This parameter is currently only applied when includeItem is set to ALL or not specified, else items are NOT bound by itemDate. Optional.

toDate

Datetime (ISO 8601 format). Lower bound of date range (inclusive). Default value is NULL, which means that the oldest available items will be in range. This itemDataRange is currently only applied when includeItem is set to ALL or not specified, else items are NOT bound by itemDate. Optional.

includeItemValue

string. Determines Which items are include. The default value is NULL, which Betfair interprets as "ALL" (include all items). THe alternative values are "DEPOSITS_WITHDRAWALS" (include payments only), "EXCHANGE" (include exchange bets only) and "POKER_ROOM" (include poker transactions only). Optional.

walletValue

string. Specifies from Which wallet to return statementItems. The default value is NULL, which returns UK wallet info. THe alternative value is "AUSTRALIAN", which corresponds to the Austrailian wallet. Optional.

suppress

Boolean. By default, this parameter is set to FALSE, meaning that a warning is posted when the getAccountStatement call throws an error. Changing this parameter to TRUE will suppress this warning.

flag

Boolean. RCurl::postForm returns a warning if there's more records than the limit of 100 that can be returned in one call. By default, this parameter is set to FALSE, meaning this warning is not flagged. Changing this parameter to TRUE will result in warnings being posted.

sslVerify

Boolean. This argument defaults to TRUE and is optional. In some cases, where users have a self signed SSL Certificate, for example they may be behind a proxy server, Betfair will fail login with "SSL certificate problem: self signed certificate in certificate chain". If this error occurs you may set sslVerify to FALSE. This does open a small security risk of a man-in-the-middle intercepting your login credentials.

Value

Response from Betfair is stored in Account Statement variable, which is then parsed from JSON as a data frame.

Note on getAccStatOps variable

The getAccStatOps variable is used to firstly build an R data frame containing all the data to be passed to Betfair, in order for the function to execute successfully. The data frame is then converted to JSON and included in the HTTP POST request. If the getAccountStatement call throws an error, a data frame containing error information is returned.

See Also

loginBF, which must be executed first. Do NOT use the DELAY application key. The DELAY application key does not support price data.

Examples

## Not run: 
# Return all available records:
getAccountStatement()

## End(Not run)


phillc73/abettor documentation built on June 10, 2022, 4:43 p.m.