Abettor
An R package for connecting to the online betting exchange Betfair, via their API-NG product, using JSON-RPC.
Install / Use
/learn @phillc73/AbettorREADME
abettor
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 GitHub
# 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
-
An initial tutorial describing how to place a bet with
abettoris available here. -
Betfair API tutorials in R - an excellent series of tutorials using
abettorfrom the data science team at Betfair Australia. Their Awesome Betfair page is also worth reading.
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?
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.
Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
