Giter Site home page Giter Site logo

abettor's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.