Skip to content

tlehoux/betfair-service-ng

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Betfair Service NG

Master Build

This is a project which uses Scala, Spray and the Play JSON lib to make calls to Betfair's New Generation API ie JSON-RPC

To use the service, you'll need a Betfair username and password, and an AppKey. The config file also contains the betfair urls. These need to be placed in a file called betfair-service-ng.conf which is referenced by the application.conf file. Example configuration is below:

betfairService.appKey = "appkey"
betfairService.username = "username"
betfairService.password = "password"
betfairService.apiUrl = "https://api.betfair.com/exchange/betting/json-rpc/v1"
betfairService.isoUrl = "https://identitysso.betfair.com/api"

Before any of the Betting API calls can be made a session token needs to be obtained and this can be done via the loginRequest method. This will cache the session token for future calls.

The ExampleBetfairServiceNG file contains the below sample calls:

login
list event types
list competitions
list football competitions
list all horse racing markets in the next 24 hour period
get the next UK Win horse racing market
list a market book with exchange best offers
get a market book exchange favourite
place a bet
cancel a bet

LICENCE

BSD Licence - see LICENCE.txt

TODO

  1. Add the remaining betting api calls
  2. Add more convenience methods to the service API eg get all runners between two prices
  3. Add a Spray REST API to the whole service
  4. Repackage the domain classes
  5. Push the local tests to master
  6. Make this README more complete!

About

Scala project to make calls to Betfair Service NG API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Scala 100.0%