Description Usage Arguments Details Value Author(s) References See Also
With getBetHistory
, getMUBets
and
getMUBetsLite
you access information about all your
bets. With getBet, getBetLite and getBetMatchesLite you
can access detailed information about your specific bets.
getBetLite: This is the lite version of the GetBet service.
getBetMatchesLite: This is a lite version of the GetBet service that returns information on matched bets.
getMUBets: Retrieve information about all your matched and unmatched bets on a particular exchange server. You should be aware that voided bets are not returned by getMUBets. Your application should track the number of matched and unmatched bets against the number of bets returned by getMUBets in order to detect a voided bet.
getMUBetsLite: This is a lite version of the getMUBets service.
* Profit and loss for single and multi-winner odds markets is implemented however it won't calculate worstCaseIfWin nor futureIfWin.
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 30 31 32 | getBet(betId, server = getOption("bfServer"),
output = getOption("bfOutput"), curlOpts = list())
getBetLite(betId, server = getOption("bfServer"),
output = getOption("bfOutput"), curlOpts = list())
getBetMatchesLite(betId, server = getOption("bfServer"),
output = getOption("bfOutput"), curlOpts = list())
getMUBets(marketId, betIds, betStatus = "MU", matchedSince,
orderBy = "BET_ID", sortOrder = "ASC", recordCount = 200,
startRecord = 0, excludeLastSecond = FALSE,
server = getOption("bfServer"), output = getOption("bfOutput"),
curlOpts = list())
getMUBetsLite(marketId, betIds, betStatus = "MU", matchedSince,
orderBy = "BET_ID", sortOrder = "ASC", recordCount = 200,
startRecord = 0, excludeLastSecond = FALSE,
server = getOption("bfServer"), output = getOption("bfOutput"),
curlOpts = list())
getBetHistory(marketId = 0, eventTypeIds = NULL, detailed = FALSE,
sortBetsBy = "NONE", betTypesIncluded = "S", marketTypesIncluded = "O",
placedDateFrom = Sys.Date(), placedDateTo = Sys.time(),
recordCount = 100, startRecord = 0, locale, timezone,
server = getOption("bfServer"), output = getOption("bfOutput"),
curlOpts = list())
getMarketProfitAndLoss(marketID, includeSettledBets = FALSE,
includeBspBets = TRUE, netOfCommission = FALSE, locale,
server = getOption("bfServer"), output = getOption("bfOutput"),
curlOpts = list())
|
betId |
The unique bet identifier |
server |
"GB" (default) or "AU" - a Betfair exchange
server to use. You can set the default with
|
output |
Indicates the form of the returned value.
Can be "simple" (default), "xml", "list" or "S4". See
|
curlOpts |
RCurl options passed directly to
|
betId |
The unique bet identifier |
server |
"GB" (default) or "AU" - a Betfair exchange
server to use. You can set the default with
|
output |
Indicates the form of the returned value.
Can be "simple" (default), "xml", "list" or "S4". See
|
curlOpts |
RCurl options passed directly to
|
betId |
The unique bet identifier |
server |
"GB" (default) or "AU" - a Betfair exchange
server to use. You can set the default with
|
output |
Indicates the form of the returned value.
Can be "simple" (default), "xml", "list" or "S4". See
|
curlOpts |
RCurl options passed directly to
|
marketId |
For getMUBets and
getMUBetsLite: If marketId is present and
non-zero, then bets placed on the specified market are
returned and any bet ids specified in betIds are
ignored. |
betIds |
Specifies the betId of each bet you want returned. The maximum number of bets you can include in the array is 200. If you include marketId in the request and marketId contains a non-zero value, then betIds is ignored. If you specify a betId, then you must specify MU for betStatus. |
betStatus |
M, U or MU. The status of the bets to return (matched, unmatched, or both) - please see betfairly Simple Data Types . If you specify a betId, then you must specify MU. |
matchedSince |
Specifies a date and time to start
from for the list of returned bets. Any R date-time
object or string recognized by as.POSIXlt. Use
|
orderBy |
The order of returned results. Valid orders are BET_ID, PLACED_DATE, and MATCHED_DATE. |
sortOrder |
ASC or DESC. Whether the results are in ascending or descending order |
recordCount |
Maximum number of records to return. The maximum number allowed is 200. |
startRecord |
The first record number to return (supports paging). Record numbering starts from 0. For example, to retrieve the third record and higher, set startRecord to 2. |
excludeLastSecond |
If true, the API excludes bets placed or matched that occurred less than one second before the GetMUBets call. Set this to true if you want to ensure that the response does not include bets that may have changed state between the time you sent the request and before the response was generated. If false, all bets are returned. Therefore, you may receive a response that indicates an unmatched bet that has actually been matched during the time taken for the API to respond. |
server |
"GB" (default) or "AU" - a Betfair exchange
server to use. You can set the default with
|
output |
Indicates the form of the returned value.
Can be "simple" (default), "xml", "list" or "S4". See
|
curlOpts |
RCurl options passed directly to
|
marketId |
Integer specifying the market ID. |
betIds |
A vector specifying the betId of each bet you want returned. The maximum number of bets you can include in the array is 200. If you include marketId in the request and marketId contains a non-zero value, then betIds is ignored. If you specify a betId, then you must specify MU for betStatus. |
betStatus |
|
matchedSince |
|
orderBy |
|
sortOrder |
|
recordCount |
|
startRecord |
|
excludeLastSecond |
|
server |
"GB" (default) or "AU" - a Betfair exchange
server to use. You can set the default with
|
output |
Indicates the form of the returned value.
Can be "simple" (default), "xml", "list" or "S4". See
|
curlOpts |
RCurl options passed directly to
|
marketId |
Integer specifying the market ID. |
eventTypeIds |
An array of event types to return. For matched and unmatched bets only, you can leave it unspecified and specify zero (the default) as the marketId to receive records of all your bets on the exchange. |
detailed |
[logical] Whether to show details of all the matches on a single bet |
sortBetsBy |
[ASC, DESC] How the bets are ordered. |
betTypesIncluded |
[C Cancelled, L Lapsed, M
Matched, MU Matched and Unmatched, S Settled (default), U
Unmatched, V Voided] Indicates the status of the bets to
include in the response. If your |
marketTypesIncluded |
[A Asian Handicap, L Line, O Odds (default), R Range] Indicates the types of market that you want your betting history returned for. |
placedDateFrom |
Any R date/date-time object is accepted or any character string recognized by as.POSIXlt. Default to current day at 00:00. |
placedDateTo |
Any R date/date-time object. Default to Sys.time(). |
recordCount |
The maximum number of records to return. This number must be between 1 and 100, inclusive. |
startRecord |
The first record number to return (supports paging). Record numbering starts from 0. For example, to retrieve the third record and higher, set startRecord to 2. |
locale |
Specify the language for the reply if you want a different language than the account default. |
timezone |
Specify an alternative time-zone from the user account default. |
server |
"GB" (default) or "AU" - a Betfair exchange
server to use. You can set the default with
|
output |
Indicates the form of the returned value.
Can be "simple" (default), "xml", "list" or "S4". See
|
curlOpts |
RCurl options passed directly to
|
marketID |
The market ID for which the profit and loss for the user is to be returned |
includeSettledBets |
logical If TRUE then the P&L calculation for each runner includes any profit and loss from any bets on runners that have already been settled. The default is FALSE, which matches the default on Betfair.com. |
includeBspBets |
If TRUE, BSP bets are returned as part of the P&L |
netOfCommission |
If TRUE return P&L net of users current commission rate for this market including any special tariffs, default is FALSE. |
locale |
Specify the language for the reply if you want a different language than the account default. |
server |
"GB" (default) or "AU" - a Betfair exchange
server to use. You can set the default with
|
output |
Indicates the form of the returned value.
Can be "simple" (default), "xml", "list" or "S4". See
|
curlOpts |
RCurl options passed directly to
|
getBet: Retrieve information about a particular bet. Each request will retrieve all components of the desired bet.
You can retrieve Cancelled, Lapsed, and Voided bets from only settled markets and these bets are available for a maximum of 10 days from the date the market was settled.
* The calculation for AH markets will include worstCaseIfWin but not futureIfWin.
A list of class GetBetRespSimple
containing slot
matches
with info about matched portions of the bet.
A list of class GetBetLiteRespSimple
with no
additional slots. Contains a subset of information from
data part of getBet
response.
Data frame of class GetBetMatchesLiteRespSimple
containing subset of information from @matches
slot
in getBet
response.
Object of class xxx
containing slot
Object of class GetBetHistoryRespSimple
containing
slots betHistoryItems
- a data frame with one bet
per row and matches
- a data frame with all the
matches if the details
parameter was set to TRUE.
Object of class GetMarketProfitAndLossRespSimple
containing slot annotations
which is a data frame
with P&L data.
Vitalie Spinu (spinuvit@gmail.com)
http://code.google.com/p/betfairly/, https://docs.developer.betfair.com/betfair/
betfairly-package
bfSimpleOutput-class
betfairly-package
bfSimpleOutput-class
betfairly-package
bfSimpleOutput-class
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.