mb_get_markets: Get List of Available Markets for a given Event

Description Usage Arguments Value See Also Examples

Description

List the Markets Available on Matchbook.com for a given Event

Usage

1
2
3
mb_get_markets(session_data, event_id, market_states = c("open", "suspended"),
  market_types = c("multirunner", "binary"), grading_types = NULL,
  include_runners = FALSE, include_prices = FALSE)

Arguments

session_data

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

event_id

The event_id integer for which a list of associated markets is required.

market_states

A vector of string containing the market states to return. Defaults to 'open' or 'suspended' market types.

market_types

A vector of strings containing the required market types. Valid market types are either 'multirunner' or 'binary'. Both are returned by default.

grading_types

An optional vector of strings containing the required grading types. Valid grading types are 'one_x_two','asian-handicap','high-score-wins','low-score-wins','point-spread','point-total','single-winner-wins'. All are returned by default.

include_runners

A boolean parameter indicating if the runner names and id should be returned or not. Defaults to FALSE.

include_prices

A boolean parameter indicating if the runner prices should be returned or not. Defaults to FALSE.

Value

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

name

Market name

start

The start date of the market

status

If betting is still available on this market it will have status='open'

type

Market name

event-id

Event id

id

Market id

runner-ids

The ids of runners in this market

grading-type

The type of grading

in-running-flag

Is the market currently in-running

allow-live-betting

Is it possible for this market to go in running

handicap

The handicap associated with this market, if any

If include_runners=TRUE, then additional runner information is returned. Also if include_prices=TRUE then price data for the associated runner is returned nested within the data frame.

See Also

mb_get_sports,mb_get_events,mb_get_runners

Examples

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

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