Description Usage Arguments Details Value See Also Examples
View source: R/PlaceSpecialBet.R
Place a wager on a contestant in a given special line.
1 2 | PlaceSpecialBet(stake, lineId, specialId, contestantId,
acceptBetterLine = TRUE, winRiskStake = "RISK", oddsFormat = "AMERICAN")
|
stake |
The amount to be wagered. |
lineId |
The line to wager on. See |
specialId |
The ID of the special offer. |
contestantId |
The ID of the contestant wagered on. |
acceptBetterLine |
Whether or not to accept a bet when there is a line change in favour of this wager. |
winRiskStake |
Whether the stake is the risk or win amount. One of
|
oddsFormat |
Format for the returned odds. One of |
This function will raise an error if the API does not return HTTP status
OK
, which is not precisely the same as an assurance that the wager
was placed successfully (see the Value section). For information on the
possible errors, see the API documentation for
Place Special Bet.
A data frame with the following columns:
status
When the wager is placed this will contain code
"ACCEPTED"
. Otherwise it will contain code
"PROCESSED_WITH_ERROR"
.
errorCode
When the wager is not accepted, this column
will contain a code for the particular error involved; otherwise it will
be NA
.
uniqueRequestId
A unique ID associated with the wager.
When the wager is accepted, the data frame will also contain the following:
betId
A unique ID for the newly created bet.
betterLineWasAccepted
Whether or not the bet was accepted on a line that changed in favour of wager.
When the wager is not accepted, the data frame may also contain
lineId
and specialBet
columns with NA values.
See PlaceBet
to make non-special wagers,
GetSpecialFixtures
to query available special contestants, and
GetSpecialLine
to get their associated lines.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | SetCredentials("TESTAPI", "APITEST")
AcceptTermsAndConditions(accepted = TRUE)
# This contest is unlikely to exist, but serves as an example
# of the format.
line <- GetSpecialLine(specialId = 101, contestantId = 102,
oddsFormat = "AMERICAN")
if (!is.na(line$lineId)) {
PlaceSpecialBet(stake = 100, lineId = line$lineId,
specialId = 101, contestantId = 102,
acceptBetterLine = TRUE,
winRiskStake = "RISK",
oddsFormat = "AMERICAN")
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.