durtal / betfaiR

R package for the Betfair API
http://durtal.github.io/betfaiR/
Other
18 stars 6 forks source link

australian markets #7

Closed durtal closed 8 years ago

durtal commented 8 years ago

Explore possibility of adding Australian markets.

Looks like the endpoint is the only difference?

Domain Endpoint
UK https://api.betfair.com/exchange/betting/json-rpc/v1
Aus https://api-au.betfair.com/exchange/betting/json-rpc/v1

Might be as simple as including a switch statement in the bf_post function?

durtal commented 8 years ago

New branch containing this commit which attempts to point requests toward Australian exchange via a switch statement

I will try use this branch over the weekend, and see if it can be merged with master. To install this branch use

devtools::install_github("durtal/betfaiR", ref = "aussie")

durtal commented 8 years ago

This appears to work, however markets (horse racing) have very little liquidity, not sure if this is always the case, data appears to be returned as expected, but will try find a Aus market with some money in.

This also raises issue of the Account API, to place a bet in an Aus market you may need to transfer funds to your Aus wallet, implementing functions to utilise this API might take a little longer.

I think (once the functions are written, then it should be possible for account to be a method found in the environment returned by betfair, and when calling account it would return a second environment with various methods for manipulating your account, getting statements, transferring funds, etc. (as long as the same credentials are used for both, username, password and api key)

durtal commented 8 years ago

Added here