mb_get_bets: Get List of Current Bets on Matchbook

Description Usage Arguments Value See Also Examples

Description

List the first 500 bets that have been made on Matchbook events that have not yet settled.

Usage

1
2
mb_get_bets(session_data, event_ids = NULL, market_ids = NULL,
  runner_ids = NULL, sides = NULL, status = NULL, interval = 0)

Arguments

session_data

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

event_ids

A vector of event_ids for which a list of current bets is required. This is an optional parameter and the default is to return bets from all events unless market_ids or runner_ids are specified.

market_ids

A vector of market_ids for which a list of current bets is required. This is an optional parameter and the default is to return bets from all markets unless event_ids or runner_ids are specified.

runner_ids

A vector of runner_ids for which a list of current bets is required. This is an optional parameter and the default is to return bets from all runners unless event_ids or market_ids are specified.

sides

A filter to allow selection of either 'back' or 'lay' bets. The default is to return both types.

status

The bet status from one of the possible options ('matched','unmatched','cancelled','expired','open','paused'). By default matched and unmatched bets are returned. Bets with status 'expired' can no longer be matched.

interval

Time filter (in seconds) to allow selection of bets that were created or updated in the period between the currnet time and the current time minus the specified number of seconds.

Value

If successful, a dataframe with first 500 bets and associated information. Only 500 bets are permitted at one time. Pagination is possible but not implemented in this version. The data frame has the following fields:

id

the bet id

event-id

the event id on which the bet was placed

event-name

the name of the event on which the bet was placed

event-id

the event id on which the bet was placed

market-id

the market id on which the bet was placed

market-name

the name of the market on which the bet was placed

runner-id

the runner id on which the bet was placed

runner-name

the name of the runner on which the bet was placed

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

remaining

this field indicates how much of the original stake placed remains un-matched. If this value is equal to the original stake, the the bet is fully un-matched. If this value is zero, then the bet has been fully matched. Any value in-between indicates a partial match

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.

temp-id

the temporary id of the bet

See Also

mb_get_sports,mb_get_events,mb_get_markets

Examples

1
2
3
## Not run: my_session <- mb_login("my_user_name","my_password"); 
mb_get_bets(session_data=my_session)
## End(Not run)

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