mb_bet_cancel: Perform a Bet Cancel Action

Description Usage Arguments Value See Also Examples

Description

This function provides bet cancellation functionality. It is possible to cancel a single bet by entering in a single value for the bet_id parameter. It is also possible to cancel multiple bets at once by passing a vector of the bet_id parameter. It is also possible to cancel all bets from a given market, event or runner by entering the corresponding ids. NOTE: bets with status 'matched' or 'revised' can not be cancelled.

Usage

1
2
mb_bet_cancel(session_data, bet_id = NULL, event_id = NULL,
  market_id = NULL, runner_id = NULL, cancel_all = FALSE)

Arguments

session_data

A session object returned from a successful mb_login attempt. It contains details about your user preferences and security details.

bet_id

The bet_id or vector of bet_ids that you want to cancel.

event_id

The event_id or vector of event_ids that you want to cancel.

market_id

The market_id or vector of market_ids that you want to cancel.

runner_id

The runner_id or vector of runner_ids that you want to cancel.

cancel_all

Boolean variable. Parameter to allow cancellation of all bets on all events/markets/runners. Default is FALSE.

Value

The status and details of your bet cancellations are returned. The data frame has the following fields:

id

the bet id

event-id

the event id on which the original bet was placed

event-name

the name of the event on which the original bet was placed

event-id

the event id on which the original bet was placed

market-id

the market id on which the original bet was placed

market-name

the name of the market on which the original bet was placed

runner-id

the runner id on which the original bet was placed

runner-name

the name of the runner on which the original bet was placed

temp-id

the temporary id of the update

exchange-type

the exchange type. This should always be 'back-lay'

side

the side the bet was placed on

odds

the odds the bet was placed on

odds-type

the odds-type of the odds field

decimal-odds

the decimal version of the odds

stake

the stake placed

potential-profit

the potential profit if the matched component of this wager is successful

remaining-potential-profit

the potential profit if the un-matched component of this wager is first matched and then has a successful outcome

currency

The currency the bet stake was placed with

created-at

The date the bet was placed

status

The bet status. Status 'open' indicates an unmatched bet, 'matched' indicates a fully matched bet, 'cancelled' indicates a cancelled bet. For bets with status='open', the 'stake' and 'remaining' fields are key to determining the exact status. If the 'remaining' value is less than 'stake' but greater than zero, then the bet has been partially matched for a 'stake'-'remaining' amount. If the bet is fully un-matched, then the 'stake' and 'remaining' values will be equal.

If no bets have been cancelled the 'offers' object will be an empty list.

See Also

mb_get_bets,mb_bet_place,mb_bet_update

Examples

1
2
3
## Not run: my_session <- mb_login("my_user_name","verysafepassword"); 
mb_bet_cancel(session_data=my_session,odds=2.5,stake=5,runner_id=12345)
## End(Not run)

matchbook documentation built on May 2, 2019, 5:49 a.m.