phillc73 / abettor

An R package for connecting to the online betting exchange Betfair, via their API-NG product, using JSON-RPC.
Other
51 stars 36 forks source link

Historic Data API #32

Open phillc73 opened 3 years ago

phillc73 commented 3 years ago

Betfair provides API access to historic pricing data. abettor does not yet support this part of the API and probably could/should.

https://historicdata.betfair.com/#/home https://historicdata.betfair.com/#/apidocs

Only five functions to consider:

Soccerama commented 3 years ago

Started dabbling with this API which is new to me. I could make it work through the browser but then using exactly the same command through the API didn't work and gave the error:

Server Error
401 - Unauthorized: Access is denied due to invalid credentials.
You do not have permission to view this directory or page using the credentials that you supplied.

I asked about it on a Betfair related slack channel and was told that this is "a famously flaky API". So decided there are probably better uses of my time for now. If anyone else wants to give this a try then happy to share my initial work.

phillc73 commented 3 years ago

Seems to work for me. Have made a start with GetMyData() function. The format of the JSON query to the end point is different to all other Betting/Accounts API calls.

Soccerama commented 3 years ago

Glad to hear that. I couldn't even make GetMyData() work.

Soccerama commented 3 years ago

Looks good and great to see you got it working. Tested GetMyData() and found a minor type in the function arguments which stopped it from working. Pull Request submitted to fix this then it should work fine.