Friday 27 July 2007

Bots without the Betfair API

If you want to write your own Betfair bot or an application that is driven from Betfair data and you don't want to use the API, then you could try screen scraping. The API is the fastest and safest way to go, but it is a bit pricey (£100-£200 per month). You could, of course, use the heavily throttled free version (60 updates a minute of prices from one market and then having to decode the information sent to you) but it is quite hobbled. Screen scraping is a free option but if the web page layout changes, you may need to revisit your code.

So, what is screen scraping? Well, basically, it is just automated web site reading. You tell your computer to go to a web site and look for specific bits of information and then return them to your program, every second or so. The Betfair web site is quite "busy" (it has lots of tables, images, etc on it), but there is another web site provided by Betfair that just has the essentials and this is much easier to screen scrape. The site is http://lite.betfair.com/ and is intended for mobile users. The nice people at Betfair have also provided some sample code, in the form of an Excel spreadsheet, which contains all the code you need to get started. Have a look at the Excel Tracking worksheet at: http://labs.betfair.com/labs.aspx

Good luck!

No comments: