PlaceSpecialBet: Place a Special Bet on a Given Contestant

Description Usage Arguments Details Value See Also Examples

Description

Place a wager on a contestant in a given special line.

Usage

1
2
PlaceSpecialBet(stake, lineId, specialId, contestantId,
  acceptBetterLine = TRUE, winRiskStake = "RISK", oddsFormat = "AMERICAN")

Arguments

stake

The amount to be wagered.

lineId

The line to wager on. See GetSpecialLine.

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 "RISK" or "WIN".

oddsFormat

Format for the returned odds. One of "AMERICAN", "DECIMAL", "HONGKONG", "INDONESIAN", or "MALAY".

Details

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.

Value

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 Also

See PlaceBet to make non-special wagers, GetSpecialFixtures to query available special contestants, and GetSpecialLine to get their associated lines.

Examples

 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")
}

pinnacle.API documentation built on May 2, 2019, 10:24 a.m.