mb_get_settled: Get Details of Settled Bets

Description Usage Arguments Value See Also Examples

Description

Get Details of all Settled bets

Usage

1
2
mb_get_settled(session_data, sport_id = NULL, period = NULL,
  start_date = Sys.Date() - 90, end_date = Sys.Date())

Arguments

session_data

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

sport_id

A vector of integer sport_ids that indicated sports for which event details are required. e.g. c(15,1) gives Soccer and Pro Football (NFL)

period

A value with one of 'today', '1-day', '2-day', 'yesterday', 'week', 'month', '1-month', '3-month'

start_date

A string (or date/POSIXct) value with format YYYY-mm-dd or YYYY-mm-dd HH:MM:SS format. Defaults to 90 days ago.

end_date

A string (or date/POSIXct) value with format YYYY-mm-dd or YYYY-mm-dd HH:MM:SS format. Defaults to today.

Value

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

stake

the amount bet

sport-id

The sport id 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-type

The market type on which the bet was placed

profit-and-loss

The amount won or lost on the market

settled-at

The date the bet was settled

See Also

mb_get_bets,mb_get_events

Examples

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

xanadunf/matchbook documentation built on May 4, 2019, 1:05 p.m.