Skip to content

Latest commit

 

History

History
executable file
·
133 lines (98 loc) · 3.85 KB

README.md

File metadata and controls

executable file
·
133 lines (98 loc) · 3.85 KB

abettor

Build Status

abettor is an R package for connecting to the online betting exchange Betfair, via their API-NG product, using JSON-RPC. The package can be used to retrieve market information, place bets, cancel bets and manage account information such as balance, statement and P&L.

The breadth of API calls covered is growing, although not yet complete. If your use case is not yet covered, raise an issue or write new functionality yourself. New contributors always welcome.

Quick start

Install

Install from GitLab

# install.packages("remotes")
library("remotes")
remotes::install_gitlab("phillc73/abettor")
library("abettor")

Or install from GitHub if you prefer (identical mirror of GitLab)

# install.packages("remotes")
library("remotes")
remotes::install_github("phillc73/abettor")
library("abettor")

Obtain a Betfair Developer Application Key

Betfair provided instructions to obtain an Application Key are available here, or follow the steps in the Place a Bet Tutorial linked below.

The abettor package is an aid to developing Betfair applications in R. Developers will still need to apply for a Betfair Software Vendor Licence should they wish to develop commercial software using this package. Personal use of the abettor package will only require a Betfair Application Key.

Required Packages

Only two additional R packages are required.

# Requires a minimum of version 1.7.2
library("jsonlite")
# Requires a minimum of version 1.4.2
library("httr")

Tutorials

Supported Functions

Authentication Functions

?loginBF
?logoutBF
?keepAlive

Betting API Functions

?cancelOrders
?listClearedOrders
?listCompetitions
?listCountries
?listCurrentOrders
?listEvents
?listEventTypes
?listMarketBook
?listMarketCatalogue
?listMarketPandL
?listMarketTypes
?listRunnerBook
?listTimeRanges
?listVenues
?placeOrders
?updateOrders
?replaceOrders

Account API Functions

?checkBalance
?getDeveloperAppKeys
?getAccountDetails
?getAccountStatement
?listCurrencyRates

Race Status API Functions

?listRaceDetails

Heartbeat API Functions

?heartbeat

Historic API Functions

?GetMyData

Each function contains documented descriptions for their use and all supported arguments. Read them.

Status

This package is under active development.

Issues

Problems? Something just doesn't work?

Submit issues here.

To Do

  • More functions!
  • More error handling
  • Support in-play betting with live prices

Links

Disclaimer

The abettor package is provided with absolutely no warranty. All abettor functions have been tested and should work, but they may not work as you think they do. Betting can be fun and profitable, but also risky. Be sensible and read the documentation.