betfairly-package: Access Betfair API from R

Description Details Output of betfairly functions Betfair exchange servers Curl Options Reporting Bugs Disclaimer Author(s) References See Also

Description

The betfairly package allows to access most of the Betfair API directly from R.

Details

For the list of all implemented functions and the details of the current development status please see todo.

If a particular functionality that you need is missing, please contact the author.

For examples of usage see here.

Table of most common functions:

If you want to: Use:
Login bfLogin
Request a list of available events getActiveEventTypes
Request a list of Market for a specific eventType getAllMarkets
Request details of a Market (excluding prices) getMarket
Request prices for a Market getMarketPricesCompressed
Place a bet placeBets
Cancel a bet before it is matched cancelBets
Retrieve a list of my Matched/Unmatched bets getMUBets
Edit an Unmatched bet updateBets
Retrieve the P&L for a market getMarketProfitAndLoss
Place a Betfair SP bet placeBets
Check if a market is in-play now getMarketPricesCompressed
Check if a market is due to be turned in-play getAllMarkets
Retrieve a list of Settled bets getBetHistory
Retrieve your P&L for a market getMarketProfitAndLoss

For a description of payed and free access types see http://bdp.betfair.com/index.php?option=com_content&task=view&id=36&Itemid=64.

Output of betfairly functions

All betfairly API functions can return four types of output, given by the option parameter which can be:

simple (the default)

Simplified output represented by a bfSimpleOutput object containing slots bfType (original betfair class), errorCode ("OK" if succeed), and minorErrorCode (usually an empty string). See bfSimpleOutput-class for more information.

xml

raw XML representation

list

recursive list mirroring the structure of the node

S4

S4 object as described by the service SOAP protocol. Note what you will need XMLSchema package for the S4 conversion to work, as it defines some classes which are not provided with betfairly package. See bfInitClasses for further instructions.

You can change the default by setting the bfOutput option:

options(bfOutput = "XML")

Betfair exchange servers

Functions to betfair exchange services accept a server parameter, which can be either "GB" (the default) or "AU". You can set a different default with options(bfServer = "AU")

Curl Options

Each betfairly function accepts curlOpts parameter which is passed directly to curlPerform, see the documentation of that function for details.

Reporting Bugs

Before reporting bugs please see the relevant section in the official Betfair documentation and ensure it's not a betfair service issue. Known isssues are documented for each Betfair API action.

Disclaimer

The betfairly package is provided with absolutely no warranty. The documentation of the functional API is an adapted and abbreviated version of official Betfair documentation. Please refer to it for the complete reference.

Author(s)

Vitalie Spinu spinuvit@gmail.com

References

http://code.google.com/p/betfairly/, https://docs.developer.betfair.com/betfair/
Betfair API Quick Start

See Also

bfSimpleOutput-class


vspinu/betfairly documentation built on May 3, 2019, 7:08 p.m.