Jump to content
** March Poker League Result : =1st Bridscott, =1st Like2Fish, 3rd avongirl **
** Cheltenham Tipster Competition Result : 1st Old codger, 2nd sirspread, 3rd Bathtime For Rupert **

"If i had a Betfair Bot i would ....... "


Recommended Posts

If you had a Betfair Bot what would you have it do ? For quite some time now Betfair has had an API ( Application Programmers Interface ) allowing the exchange to be accessed using computer programs. Commonly known as "Bots". Full use of that API costs 200 UK pounds per month. Until now i myself have not looked at creating a bot because of a) the cost b) don't really have a strategy i'd like a bot to do c) all the stuff i want to do on Betfair has been available through other channels However for some time now there is free access to the API available. Free because it does not come with Betfair support, i.e. you can't email them for support nor use the Beta site and the use is limited. You can only do a certain amount of actions in a timeframe. But from what i understand the free version still allows you to place like 1 bet per second. Plenty for most purposes. Possibilities, possibilities... So let's have a brainstorm here, if you had a bot what would you have it do ?

Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... " I'll kick-off with a simple one: Been doing a bit of horse racing, placing anything from 1 to 10 bets per day. In order to get a good price i watch the market from about 10 min before the Off, place my bet when i think i got a top price and move on. Drawback is i need to be online and on Betfair by the Off which usually is an interruption of anything else that i'm doing. So i would give my bot a list of horses i want to bet on and tell it to monitor the prices every 10sec starting 10min before the Off. If the price goes down consistently (steamer) place a bet 5 min before the Off. If it doesn't move or increases (drifter) wait until just before the Off and place the bet. Advantage is i do not need to be on-line at all and should still be able to get a reasonably top price. Sorted :ok Next...

Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

I'll kick-off with a simple one: Been doing a bit of horse racing, placing anything from 1 to 10 bets per day. In order to get a good price i watch the market from about 10 min before the Off, place my bet when i think i got a top price and move on. Drawback is i need to be online and on Betfair by the Off which usually is an interruption of anything else that i'm doing. So i would give my bot a list of horses i want to bet on and tell it to monitor the prices every 10sec starting 10min before the Off. If the price goes down consistently (steamer) place a bet 5 min before the Off. If it doesn't move or increases (drifter) wait until just before the Off and place the bet. Advantage is i do not need to be on-line at all and should still be able to get a reasonably top price. Sorted :ok Next...
Same principle as you state, but also if your horse is well backed during the race, can you lay it off to secure a profit.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

can you lay it off to secure a profit
Yes, you can have the bot monitor the price of your horse in-play and, as soon as the price reaches a certain level place a Lay bet. A few details to sort like speed of monitoring the price, (might not work fast enough with the free version ) and price level ( when exactly to place the lay bet ) and with what margin as between getting the price and placing the Lay bet, less than a second, but still the price can move again. In short... do-able :lol
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

In general I think the subject of having a bot is under-estimated by most people. The general idea being "What if i had a bot that .... " is basically a great idea but the catch is in the details. First you need a "system" i.e. a definition of what you want the bot to do that is waterproof, foolproof, idiotproof and last but not least timeproof. So many things can happen in any period of time that you have to define actions for each possible situation and make sure the bot will respond accurately to each situation. A simply example would be that you place a Back bet and then you let the bot place a Lay bet as soon as the odds go down far enough. Sounds easy and it is. But what if you lose your internet connection before the Lay bet is placed ? It only has to happen once and that one time could wipe out the profit built up over months. How should the bot cope with this ? ( after you regain control over your internet connection obviously ) People often forget, or simply don't think about, these possible scenarios and then a bot can turn into a timebomb just waiting to wipe out your bank. Second there is the level of programming involved. Sure you can have a program as the above example that does nothing more than it should. But what if at the moment you try to place the Lay bet you get an error from the server saying "busy please wait" ? A straight simply program will report an error and shutdown, potentially leaving you exposed. A "good" program will catch the error and retry placing the Lay bet until it succeeds (or until it fails completely) That is a level of programming often found only with professional programmers. And i'm not talking about some of the free-lancers out there that are available for 5£ per hour. Professional i mean the ones you need to pay 100£ an hour for. So by all means look into getting a bot, but be carefull. If you want something that exposes you greatly then monitor yourself so you can catch unforseen circumstances yourself. If you want something that runs unattended then make sure you manage your risk by limiting your possible exposure. Just in case !
Found this in another thread, wrote it just over a year ago, not a lot has changed eh :rollin
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

What programming language do you need to know to use the API?
There are several available. Communication with the API is done by using SOAP, ( Simple Object Access Protocol ) , a standard using XML for communication between computers. Simply said SOAP acts as a translator, or better said a go-between, a computer program and a server do not need to work using the same language, SOAP can be used to send and receive communication independent from the individual technology used. If the programming language you use has a SOAP "module" ( or whatever ) then you can communicate with the Betfair server. Personally i would use Java but there are a number of possibilities. Check the Betfair developers site for details: http://bdp.betfair.com/index.php Actually just about any modern language should be able to use SOAP communication but personally i only know Java.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... " ...... take advantage of multiple "in running" markets live, at the click of a button (within constraints on odds - say within x% of the prices traded/offered before the goal/event). For example, if Team A is playing Team B in the World Cup Final and Team A scores, this can trigger bets on many many markets: Correct scores - immediately lay all results where Team B keeps a clean sheet. Number of goals in the match - Lay all markets less than the goals already scored. Shirt Numbers - lay totals less that shirt numbers so far Team A to win the World Cup Lay Team B to win the World Cup Back Team A to win Back Team A to win in 90 Mins Lay Team A to win Lay team A to win in 90 mins etc etc One goal/event can impact, literally dozens of markets - many of them effectively betting on the same thing Can also track other stats - shots/corners/cards etc The low liquidity, more obscure markets can be slow to respond to events. Obviously only applies to markets "in running" and where Betfair dont suspend when an event happens (I haven't ventured on to Betfair Sports Betting for quite a while, so dont know if things have changed - these days I get my "fix from Poker rather than gambling ;) )

Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... " One thing I was planning on doing (but never got round to!) was to set it up to track prices of high volume markets (horses, premiership games & televised events to begin with) just before the off, and then every few seconds in play. I wouldn't use it to actually place any bets tho, too risky in my opinion to leave a bot running with my money attached :) I personally feel that collecting and analyzing the data on in running markets is something that will give you an edge quite easily. In-running markets are (relatively) new when compared with any of the other markets and there is very little data out there for analysis when compared to any other sports betting where your bet is done before the off. Oh ya, and check out my sig, I developed a wrapper for the API a while back to make it a bit easier to use (its based on API 4 so its out of date now). I'll share the code with you if you're interested, no idea how different API 5 is.

Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

...... take advantage of multiple "in running" markets live, at the click of a button (within constraints on odds - say within x% of the prices traded/offered before the goal/event). For example, if Team A is playing Team B in the World Cup Final and Team A scores, this can trigger bets on many many markets: Correct scores - immediately lay all results where Team B keeps a clean sheet. Number of goals in the match - Lay all markets less than the goals already scored.
wont these be suspended when a goal goes in?
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

One thing I was planning on doing (but never got round to!) was to set it up to track prices of high volume markets (horses, premiership games & televised events to begin with) just before the off, and then every few seconds in play. I wouldn't use it to actually place any bets tho, too risky in my opinion to leave a bot running with my money attached :) I personally feel that collecting and analyzing the data on in running markets is something that will give you an edge quite easily. In-running markets are (relatively) new when compared with any of the other markets and there is very little data out there for analysis when compared to any other sports betting where your bet is done before the off. Oh ya, and check out my sig, I developed a wrapper for the API a while back to make it a bit easier to use (its based on API 4 so its out of date now). I'll share the code with you if you're interested, no idea how different API 5 is.
Isn't the IP data available anyway from betfair - I am sure I have looked at it before to try and get some retrospective odds for the off. I dismissed the IP stuff as it wasn;t relevant at that time - but it is definately there and flagged quite clearly and is available all the way back to 2004. http://data.betfair.com/
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

Isn't the IP data available anyway from betfair - I am sure I have looked at it before to try and get some retrospective odds for the off. I dismissed the IP stuff as it wasn;t relevant at that time - but it is definately there and flagged quite clearly and is available all the way back to 2004. http://data.betfair.com/
Yes you can get the in play data, but it's fairly difficult to identify any trends from it, all you can tell is that over a period of x time y pounds was matched. I looked at it for rugby union data to try to figure out historical prices for matches and it was virtually impossible. You've no way of seeing how the price moves over time other then in a very general sense, i.e. you cannot reproduce the graph like the one betfair displays when you click on the team/horse/other selection to see how the market is moving.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

But it happens within 5 seconds in the main doesn't it' date=' which is the delay in placing your bets you suffer when betting in-play.[/quote'] I've managed on a few rare occasions to do it and get in before the markets suspended, so it is certainly possible.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... " GAF, I think you'll find soccer markets all get suspended so you'd need to be 5 seconds faster than the guy at Betfair who pressed the suspend button. Bets placed with the API have to suffer the same time-delay as the human users. Hmmm. You do have an edge with a bot as it can place dozens of bets in a second. A possible application would be to have the bot monitor the markets when suspended and place bets as soon as they re-open. You'd beat any human user and get in first with your bets. After re-opening most markets over/under react somewhat before settling down. And then there are quite a few other sports where markets don't get suspended, possibilities... mcgin, Go for it mate. If you build the bot to run on a server and store collected data in a database you could potentially have it collect data unattended indefinetly. plopplop, As mcgin said the historic data is not organised sequentially in time, you cannot extract what happens over time, only what was matched at any one price. whycantistayawayfromdogs, What you describe is basically a one-button bet, placing a bet with just one click of the mouse. That functionality is available with most of the commercially applications. You could instruct a bot to place a back bet before the off and then place a lay bet as soon as the market goes in-play. And this could be done unattended. No guarantee however the lay bet would get matched.

Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

Yes you can get the in play data' date=' but it's fairly difficult to identify any trends from it, all you can tell is that over a period of x time y pounds was matched. I looked at it for rugby union data to try to figure out historical prices for matches and it was virtually impossible. You've no way of seeing how the price moves over time other then in a very general sense, i.e. you cannot reproduce the graph like the one betfair displays when you click on the team/horse/other selection to see how the market is moving.[/quote'] I've just had a look and created this from the betfair data for Halmstads v GAIS in July. Halstads market: betfair_graph.JPG Yes the axis are the wrong way but you can kind of see what is happening up to KO. Its not perfect as it is the price that is matched as opposed to what is on offer etc...........but as a trend - you can clearly see Halmstads drifting the closer to KO you get. I've had to use the "first taken" date to order the data for the chart. It looks very similar using "last taken". I agree its not as granular - but it might show something interesting should someone wish to have a pop at it.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... " An area i'd look at would be tennis in-running. Not sure how yet but there are some huge price movements back and forth on tennis markets, gotta be something possible there. Maybe even as simple as placing a bet on both players 10% above opening odds as soon as the market goes in-play. If both get matched you should have about 5%-8% profit. I'd have the bot running 24/7 , finding the markets himself, placing the bets, non-stop. Can see that working, theoretically :lol

Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

An area i'd look at would be tennis in-running. Not sure how yet but there are some huge price movements back and forth on tennis markets, gotta be something possible there. Maybe even as simple as placing a bet on both players 10% above opening odds as soon as the market goes in-play. If both get matched you should have about 5%-8% profit. I'd have the bot running 24/7 , finding the markets himself, placing the bets, non-stop. Can see that working, theoretically :lol
I second that - I made a few bob on henman a couple of weeks ago - he was at deuce in final set 4 games all, returning serve. It flittered from deuce to advantage a few times and the reaction of the market was crazy - I must have bet 10 times, laying all for clear profit - just because they went back to deuce. I suppose the danger is that you only get matched on 1 side of the bet and not the other. I think the markets get very lively towards the end of close matches - but which ones will be close!!!!!!! The eternal question i suppose.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

Go for it mate. If you build the bot to run on a server and store collected data in a database you could potentially have it collect data unattended indefinetly.
That was the original plan when I set out building the wrapper last year. Kinda got side tracked analysing rugby union tho, so might take another stab some day soon now that you've reminded me. Just need to come up with a reliable/scalable model for storing the data.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

O and if you don't know what a bot is capable of.... just ask. ( but if you can think of it ... a bot can probably do it )
Not very 'techie' so sorry if this is a stupid question. If I didn't want a bot to have autonomy to place bets by itself but at the same time didn't want to sit in front of a computer screen all day, would it be possible to instruct a bot to text my mobile if certain pre-set criterea are met ? Cheers, Fatz.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... " I'm a techie but I'm not very familiar with betfair or its API, although I know the basics of it. Excuse me if any of my cooments miss anything obvious. My (so far successful) way of trading is identifying situations within markets and act only when those situations are met. Just like the Tennis Deuce/Advantage/Deuce example: I would have a bot looking for a situation I have identified as profitable (in this case a 40/40), and then act on those situations. I would also have the bot check the same situation in the same market for all possible events, not just one. For example, the Premiership plays several matches at once and it's impossible for a person to look for profit situations on all of the matches at the same time. I'd love a bot to that for me. I have just signed up for betfair, I'll get familiar with it (I hoe I just don't lose too much money on the process), then I will get the API and see what it it like... F.

Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... " On the right track there webusermxc. As a matter of precaution if anyone wants to start playing around with a bot you can use the australian wallet for safety. Transfer your balance to the australian wallet and leave just enough in your UK wallet for the bot to play with. While testing at minimal stakes at least you can't lose your entire balance. ( works other way around also of course ) Once you've got a profitable strategy you won't mind paying the 200 pound for the full version as that should easily pay for itself. And then you can access a Beta site where bots can be tested in a simulated, i.e. no real money, environment.

Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

I would have a bot looking for a situation I have identified as profitable (in this case a 40/40), and then act on those situations.
In itself Betfair is not going to tell you the score of a match, just the prices and volume on the betting market. So you'd need to build in a way to read the scores from somewhere. Couple of livescore sites about that could be scraped, possibly even XML feeds dunno. But do-able, definitely do-able.
Link to comment
Share on other sites

Re: "If i had a Betfair Bot i would ....... "

In itself Betfair is not going to tell you the score of a match' date=' just the prices and volume on the betting market. So you'd need to build in a way to read the scores from somewhere. Couple of livescore sites about that could be scraped, possibly even XML feeds dunno. But do-able, definitely do-able.[/quote'] Problem there is you have to find a data source that has accurate score information and by accurate I mean updated within 2-3 seconds at most. Otherwise you will get burnt.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...