Can anyone build or construct a bot here?

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Can anyone build or construct a bot here?

Postby one cool dog » Mon Feb 09, 2009 10:38 pm

Genuine, someone must be able to. What's involved?
one cool dog
 
Posts: 263
Joined: Tue Feb 28, 2006 8:55 pm

Postby GaryRussell » Tue Feb 10, 2009 8:52 am

If you don't get any responses on here you can also try http://fad.betfair.com
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby korkenzieher » Mon Mar 16, 2009 3:54 pm

Hi. I registered just to answer this mail, so I might not be around for any responses. But in trying to find out how to do it, I had the same basic problem-How? What do I need to know? So I thought I would weigh in and tell you how I went about it.

You don't give any indication of your starting level, so I have kept assumptions to a bare minimum. Unfortunately, this also means I have to keep detail to a bare minimum.

I have a crude, but functioning BOT. It has taken some time, coming from a position where I could already program (though rustily) and had made certain choices of how to go about it. I had already developed the strategy I wished to program too. The only stuff I could find really, was a (quite poorly) written ebook by a chap called Richard Wildman. He has since succumbed to cancer, and I think the book is no longer available. Even with it, it was more or less learning from the beginning, as far as writing for the API was concerned.

Where to start - if you can program already, then that is where to start.

If not, you are on a steep learning curve! I use C#. Coming from a background in TCL, C, SQL and so on, it ought to have been easier than it was, though it came back quite quickly once I started. C# is a good choice because you need to know less about web protocols than coming from, say, Java (specifically XML and SOAP); plus there is a lot of help available for Visual Studio, C# and .Net etc. Get or download some books on writing C#. VBA could be considered too, since it is also supported in Visual Studio, and you would have more option to write stuff in VBA say on Excel and port it, than just writing C# will give you. But I chose C#.

Download and install visual studio express from the microsoft website. It is free. I have the fully featured 2008 version, but you don't need all that. If you don't know where to start, then again on the MS developers website, there are several tutorials. The video tutorials from Mark Tabor of LearnVisualStudio.NET (on the MS site) are as good a way to go as any (about 400MB of download!). Unless you are very familiar with object orientation, and general programming constructs, you will need to watch them 2 or 3 times. Each run through is a good 7 hours. Also, look for online guides like csharpcorner and bookmark them. You will be looking at examples on a regular basis, and not knowing which overloaded method to use will be confusing, until you see examples that basically do what you want and you can modify them. You don't need to write beautiful code - build a dinghy and learn how to sail, before crafting a battlecruiser! Learning how to use VisualStudio itself, and write C# will take some time. If you are starting from this level, the whole thing could take 3-6 months of quite hard work.

Download the API documentation from Betfair developers site. This basically tells you how to call specific functionality (like logging in, or placing a bet), and what the response from them will look like. The documentation is a 200 page document with a load of tables documenting data types and structures. You will become very familiar with it!

In essence, what you are aiming to do is make a call to the API in which an object (bunch of data) is sent with an appropriately formatted header, and a return object received back, with (you hope) the correct response inside the data it carries.

Download their sample code (I think it is for the API 5, which is older). You won't learn much from it, until you basically know how to do everything, but once you do, it will make everything more obvious on how to go forward.

One thing which there is very little help for, is how to configure your visual studio application for use with the web services. You will need to add the service references before you can use any of the API functionality. It is a menu item (add web reference), and you will need to do it for the UK and AUS servers, and for the WDSL. You can find references on the betfair developer sites, as to the URL's you need to link to. It is not particularly obvious, and you will probably learn quite a bit just by solving that problem.

Once you have a basic VS application, and it is connected to the API service, then design (from the video tutorials) a simple form, just to log on to the betfair server. You don't need anything more than that as a proof of concept / connection. Then you will need to scour the API documentation and work out how to send the calls and process the returns you want. It isn't possible to help you here too much, without writing a course, but once you get to that point, you can start figuring out which calls you need to add (getEvents, GetPrices, PlaceBet etc.). Learning to use the debug facilities to look at what is being returned will speed things up; and from that you will soon see which bits of the return objects you need, and where they are. Intellisense, in visual studio helps quite a lot here.

Once you can get the market data, you have to parse it, find the bit you want and then (and only then!) plug into your custom strategy, return a bet, test if necessary etc etc. This is all evident from the API documentation - once you have learned how to read and use it!

After that, you may want to start looking at things like threads, spiders and so on, to start monitoring the site and perhaps building more complicated interfaces and so on. But at that point, you will have a basic, simple bot which you can click on, and it will go get information and do stuff according to what you have written.

I should say, that for anyone who can write C# and understands .NET, they would be up and running in an afternoon. I should also say, that you can pay people to do this for you, but there really isn't too much alternative to putting in the hard work. There is a lot to it, and then really not so much depending on your start point.
korkenzieher
 
Posts: 4
Joined: Mon Mar 16, 2009 3:05 pm

Postby Spike » Mon Mar 16, 2009 6:18 pm

Hello, if you let me know the basic parameters of what you're looking for- i.e. broadly what you want your bot to do then I'll let you know what it will take/cost. Either reply here or PM me.

Spike
Spike
 
Posts: 223
Joined: Tue Feb 24, 2009 8:42 pm

Postby Bid » Tue Mar 17, 2009 11:30 am

I started to write my own bot in vba. The sample spreadsheets were pretty useful getting it up and running. Unfortunately when it came down to actually getting my system in place I realised that the free access API justn't didn't quite give me enough - you have a limited number of API calls per minute for example. I needed to get full access which was going to cost me £200 a month. I have now re-written the bot to work with BA instead, using a mixture of linking to excel and COM interface. It's so much cheaper and easier to use. I know it's a bit over the top using BA, Excel and Access but it works fine for me and I can concentrate on getting the system right instead of battleing with betfairs API.
Bid
 
Posts: 74
Joined: Mon Oct 15, 2007 10:58 am

Postby korkenzieher » Tue Mar 17, 2009 7:26 pm

What is BA?

There is actually a lot of stuff available on the betfair developer forum, including some fairly fully featured application code both in VBA and C#. Spread among that is some stuff about optimising calls to the API. Personally, I couldn't really imagine a system (at the moment) where I would need to exceed the capabilities of the free system. I have received 'throttled' error returns in some sections of code, where I have just let the system whizz off and wait until some value returns true (usually looking for events to go 'In Play'), but I don't need to make most of those calls, so simply sticking a timer on the thread slows down the API calls to a reasonable level.
korkenzieher
 
Posts: 4
Joined: Mon Mar 16, 2009 3:05 pm

Postby Roger » Wed Mar 18, 2009 8:12 am

Betting Assistant.
Roger
 
Posts: 140
Joined: Fri Nov 18, 2005 10:45 pm

Postby Bid » Wed Mar 18, 2009 10:50 am

korkenzieher wrote:What is BA?

There is actually a lot of stuff available on the betfair developer forum, including some fairly fully featured application code both in VBA and C#. Spread among that is some stuff about optimising calls to the API. Personally, I couldn't really imagine a system (at the moment) where I would need to exceed the capabilities of the free system. I have received 'throttled' error returns in some sections of code, where I have just let the system whizz off and wait until some value returns true (usually looking for events to go 'In Play'), but I don't need to make most of those calls, so simply sticking a timer on the thread slows down the API calls to a reasonable level.


It's because I mainly use the football markets and need to be able to run my systems on several markets at the same time.
Bid
 
Posts: 74
Joined: Mon Oct 15, 2007 10:58 am

Postby korkenzieher » Wed Mar 18, 2009 12:53 pm

Ah. OK. Had thought perhaps it was BetAngel :roll:
korkenzieher
 
Posts: 4
Joined: Mon Mar 16, 2009 3:05 pm

Postby Captain Sensible » Thu Mar 19, 2009 11:54 am

Bid have you considered a mix of scraping the site and the free api ? Only limitation is the number of bets you'd be sending as the data charges apply whether using BA or site scraping. It all boils down to how many bets you actually send per minute/second etc with the free API
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby korkenzieher » Fri Apr 10, 2009 1:31 pm

Why is that? My reading of the API parameters (http://bdp.betfair.com/index.php?option ... &Itemid=62) and the API documentation is that there is no limit on bet placement (excepting the 60 per call, which is true also of the subscription version). None of the other calls used need be a limiting factor in the number of times PlaceBets is called.
korkenzieher
 
Posts: 4
Joined: Mon Mar 16, 2009 3:05 pm

Postby Captain Sensible » Sat Apr 11, 2009 3:53 pm

Some requests are throttled on the free api in order to get paying customers on board. This link shows the limits

http://bdp.betfair.com/index.php?option ... &Itemid=64
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm


Return to Discussion

Who is online

Users browsing this forum: Majestic-12 [Bot] and 51 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.