There’s several reasons you might want to create a bot to use on Betfair:
- Betfair provide a handy API that’s very comprehensive
- Bots save you time
- Bots are fun to make
- A good bot can make you money
There’s essentially two different types of bots – trading bots and automated selection bots. Trading bots use algorithms and calculations to trade on markets before the start time (some might trade on in-play markets too). Once they are setup they’re left to their own devices and might report at the end of the day on profit/losses. Automated selection bots are simply acting on behalf of the operator by backing or laying certain selections predetermined by the programmer.
Python and Perl are both great languages for this sort of thing, although if you take a look at the Betfair Developers Forum (BDF) you’ll see all sorts of languages being used (including VB…for the masochists). Since Perl isn’t exactly beginner friendly I’m going to concentrate on Python, which can handle the whole development process without using other languages. In addition, there’s a great Python-Betfair API created by Saint Pilgrim, which I’ll explore in later posts.
First we need some kind of editor to write the code in. It’s also possible to just use text files and the command line interpreter but it’s easier to use an IDE because it’s quicker to make changes and run the program again quickly (happens a lot!). The one I use is Eric, but there’s a few others that would be fine too. I like the way Eric is laid out and has useful shortcuts pre-configured, as well as the code completion (although that can be turned off if you prefer not to use it, I think you either love it or hate it).
If you’re using ubuntu, use apt-get.
sudo apt-get install eric
OpenSuse and some other distros use zypper.
sudo zypper in eric
Centos commonly uses yum.
sudo yum install eric
You can check Eric is installed by running it from the command line, but it should also appear in your WM menus under ‘programming’.
In part two of this section, I’ll talk about how to start interacting with the Betfair API.
No related posts.