logo.jpg
Monday 6th February 2012  
  HOME _______________

  FREE gift schemes _______________

  Poker Rakeback _______________

  Linux Poker _______________

  Betfair Bots _______________



 
BETFAIR
Betfair is the biggest sports betting exchange in the world, their servers handling 15 times as many transactions per day as the London Stock Exchange. Yes, they are THAT big!


Why bet with an exchange?
Traditionally, if you wanted to place a bet on a sporting event you had to go to a high street bookmaker or an on-course bookmaker. Not many bookmakers go bankrupt and the reason is simple: they are committing daylight robbery! When you are betting on a future outcome, you are simply betting on the probability of that event happening. Imagine flipping a standard coin. There are two possible outcomes: heads or tails, so the probability of flipping a head OR a tail is 50%. If you were betting on this event, you would require odds of 1/1 (evens) just to prevent you from losing money long term. At odds greater than 1/1, you can guarantee a profit over a long series of coin flips. Bookmakers will always give you odds LESS than the true probability and therefore have a built-in "edge". Over the long term and thousands of bets, the bookmaker's overround will always net them a steady profit of around 10% to 20%.

In contrast, a betting exchange allows bets to be placed person to person. It's a bit like having a wager with a mate. The main benefit is that you can play BOTH sides of the betting markets which also means that you can be the bookmaker. Having access to both sides of the betting market means that competition is fierce and therefore you get MUCH better odds. Overround books are common but they are often no more than a few percent over - which makes the bookmakers' 20% look awful!

Having access to both sides of the market opens up a whole new range of betting opportunities. There are far too many to list here, but a little imagination and a few simple sums is all that is required to make a small profit.


Betfair Bots
When gambling meets computers, there are always ways to "cheat" or do your sums much faster than anyone else. Betfair is no exception. In the early days, a number of very shrewd software programmers made some extraordinary profits by automating some simple betting equations and mathematical calculations. Combined with a fast internet connection, the average punter who was still using a web browser had no chance. Betfair soon got wise to this and feared that customers may leave if they lost too much money, so they opened up the can of worms and introduced a public API for other software programmers to use. The API is an official interface that allows anyone with programming skills to automate their betting strategy. Everyone with a little programming knowledge jumped on the bandwagon. This was later followed by a surge of failed bots that were turned into commercial products and a number of generic betting applications that are now well known and often purchased by none programmers who want to automate a betting strategy. And now you know why Betfair handles 15 times as many transactions as the London Stock Exchange...


Using the API
I'm a Linux fan. My home PC runs the Ubuntu Linux operating system. I also enjoy programming software and my language of choice is Python. It's a simple yet very powerful language. Bringing Betfair and Python together was a natural progression. If you understand the Python programming language and wish to automate a Betfair strategy, then you will find the following source code VERY useful.

This is my Betfair API library and encapsulates all the most used API functions into a simple Python class. No dependencies are required, however you may need to install gSoap if you ever wish to upgrade to a newer API version or simply rebuild the XML requests. API6 xml templates are included with the download. HTTP requests are sent using Python's built-in urllib2 package, however high performance bots (i.e. refresh speeds of 10 - 50 times a second) should be upgraded to use the pyCurl HTTP library. Unzip the download, ensuring that betfair.py, http.py, templates folder and example.py are all located in the same folder. Edit example.py, entering your username and password in the appropriate places (currently lines 26 and 27). Now run example.py to test a small sample of the API functions. Note that there is no GUI as the library is intended to be used as part of a larger project. This API library is ideal for creating automated bots that are intended to be run on dedicted or virtual (VPS) servers without human intervention and has been thoroughly tested in this type of environment. Requires Python version 2.6. Should work with newer versions but currently untested.


Download the source code:   betfair_api_python.zip
Last update: October 2011.


FREE custom bot programming
If you have a simple rules based strategy but lack the programming skills to create your own bot, I may be able to help you. Programmers normally charge very high hourly rates, however I will complete small projects and/or give advice provided you are willing to make a donation or use one of the affiliate links on this site. Ideally, you should open a NEW Betfair account via the logo/link on the right of this page. If you have an existing account, you may have to close it first. Betfair will give YOU a free bet and pay ME for giving them a new customer...so it's a win-win situation. Note that I can only program simple strategies, otherwise my time spent vs payment will not be worth my while. You will get full source code in Python, using my own API library (see above). Before clicking any of my links you MUST close all web pages AND clear your cookies. Failure to do this means that I won't be credited for referring you. If you're not sure what to do, feel free to contact me...







betfair.gif
©2008 - 2012 BespokeBots.com. All Rights Reserved.