Write Your Own Betfair Software

In addition to trading via Betfair's website, Betfair also permits access to its servers via an API. Access to Betfair's API is free of charge but there are limits to the amount of data you can download. For unlimited access there is a charge of £200 per month.

Still, free access to the Betfair API is enough to build an effective piece of software and you can then decide if it is worth spending £200 a month for full access.

On the Betfair Developer Program (BDP) forum there is a lot of help for those starting out on coding their own software. With Betfair now migrating from the old SOAP based API-6.0 to the JSON based API-NG I recommend that users read the API-NG forum on the Betfair Developer Program website. My initial thoughts are that API-NG is a vast improvement over API-6.0.

I have also written a few articles myself on this blog about coding using API-NG under Visual Basic. However, this list is incomplete as I now write API-NG articles for SmartSigger magazine, a monthly magazine that covers many aspects of sports betting mathematics and coding.

Because API-6.0 will cease to work in April 2015 I can no longer recommend the excellent thread, started by user Mumbles0 elsewhere on the forum, that has helped many Betfair users to write their own software, myself included. I include the list of his articles at the bottom of this page solely for those still coding with the old API. If you are about to begin coding then I suggest you save time use API-NG.

You might like to consider buying Automatic Exchange Betting, which covers many aspects of trading on Betfair and programming using Betfair's API. Although the code is in Perl it can be easily ported to another language.

Automatic Exchange Betting covers the construction of an automated system and goes a long way into system building using odds lines, weight of money, average prices etc. The book is very detailed and will give the reader a deep understanding of automated exchange trading and program development.

Another book that details the construction of an automated betting system is Calculated Bets: Computers, Gambling and Mathematical Modeling to Win. Written by Professor Steven Skiena, Calculated Bets details the professor's successful modelling Jai Alai matches, developing a trading strategy using Monte Carlo methods and then implementing bet automation.

Designing your trading software

Rather than trying to code the ultimate trading platform straight away, you should first build simple single-task tools to handle repetitve tasks. You can then add your own metrics for manipulating Betfair data. After that you might want to automate betting and position tracking. Finally, you can code a bot that does all of the above whilst acting under your own trading rules.


Betfair has now replaced its old SOAP based API-6.0 with API-NG, based on JSON. My first impressions are that this is a much easier API to understand and code with. I have coded API-NG applications quite easily by myself without help from others, unlike the revious API.

Click on the Betfair API-NG topic for a current list of tutorials that I have written about the API so far.

No comments:

Post a Comment