Hi folks,
here is the first blog post of the series “Creating A Betfair Bot With C#”.
This section will give some information about the environment and setup of our work. This section is not a tutorial about using the presented tools, because there are also other tools available and giving a complete overview of all developer tools would cost too much time.
Hardware Environment:
There is no special hardware required. Make sure you are using a computer with Microsoft Windows. I started working on the bots under Windows XP and now I am working under Windows 7.
Software Environment:
I am working with Microsoft Visual Studio Professional 2005. I am sorry, but my version of Visual Studio is in German and I can not change the language so far. If there are any questions feel free to ask.
Visual Studio is not only a code editor. It has also a forms designer which let you create windows user interfaces via drag and drop, which saves you a lot of time.
An alternative for Visual Studio might be Microsoft Visual Studio Express. I must admit I do not have any experiences with VS Express, but I am sure there are many tutorials out there about this tool.
You also need to have Microsoft .NET Framework installed on those computers you are running your bot. When installing Visual Studio I think the framework is installed too. But if you want to run your bot on another machine, maybe a Virtual Private Server, make sure that the framework is installed. To download the framework just visit Google and enter “.NET Framework”. You will get a lot of results for downloading. It is free to use.
Generally my bots are using local databases. Therefore I am using Microsoft SQL Server Compact 3.5. This is an embedded database, which means you will have a single database file with file extension SDF. You can use this database like a common and well known database like Oracle or MySQL. The advantage is you do not need to care about database management handling like table spaces and user privileges etc. You just need to create your database tables and save your data.
It is really easy to use. You can save your matched bets and prices of single selections for tracking etc.
I am using the database for saving matched selections, so I can start and stop my bot without losing data, because they are stored in my local database. If those data are only available in memory in variables an objects I would lose them if my bot crashes or if I would stop the bot. It is not required, but it is really helpful.
When using Microsoft SQL Server Compact 3.5 you need to be able to have a look at your SDF files. I am doing this via SDF-Viewer. You can also use Visual Studio for that, but for me it is much more comfortable to use SDF-Viewer.
Today’s section did not help much about getting really in touch with Betfair, but I think it is necessary to give an overview which tools I am using. If there is anybody also working on betting bots feel free to add your thoughts and comments about the tools I am using and also about the tools you are using which are not mentioned in this blog post.
The next section “Basic Functionality” will handle all the stuff I am using for logging, data management (database), settings and bot handling. We will also see how I am organising my bot projects, which will help us to use the same source code easily in another bot again without recoding the same stuff again and again. At the end of the next section we will have our first self created software. We will be able to start and stop the bot, create logging entries, we will use registry settings and we will get in touch with threading and event handling.
That’s it so far.
If there are any comments or questions feel free to drop an email or leave a comment.
Cheers, Loocie