Showing posts with label betfair API. Show all posts
Showing posts with label betfair API. Show all posts

Wednesday, 9 April 2008

Life in Bots-ville

Wow! I've not posted for a while. I've also not done much trading, in fact, the last trades I did were in February for the grand gain of about £6! I havn't been completely quiet though, I've been playing around with some laying systems, for a bit of a change. I'll write up the results in a forthcoming post. I know, I'm normally all about the trading, but as I've not felt like trading, why not explore other options?


Anyway, the main thrust of this post is about the world of Betfair bots, or rather, what recent events have happened to affect them. First up are the new changes that Betfair are making if you want to use data from their site or API. They've decided to apply extra data charges if you make more than 20 calls a second to their API or web site. Now, that doesn't sound too bad, but if you are trying to access multiple markets at once then it can happen.

I usually use the free API and only track one market at a time, so I'm okay, but its something to bear in mind when you're planning what you want to do at the start.

And finally... We see the death of a site/forum that has been a centre piece to bot builders for quite a while now. That site is http://www.fred77.co.uk/. It's gone! If you want a new forum, then I've set one up. Whether it'll take off, will depend if people use it. If it doesn't get used I might take it down again, but if you want a look, its at: http://thebreakthroughpartnership.com/simplemachinesforum/index.php


And finally, finally, if you are interested in building your own Betfair bot, please have a look at my eBook on the subject (hey, nothing like a self plug!). Go to: http://www.thebreakthroughpartnership.com/tradingbot/tradingbot.html

Wednesday, 10 October 2007

Example Graphing from Betfair data

As part of the rewrite of my eBook about building Betfair bots and using the free Betfair API, I have been creating some simple examples. One of those is a graphing example. I thought I'd post it up as a download in case anyone wants to play with it. It is somewhat raw and buggy but it was only written as an example to show how to use parts of the API. If you want to have a look, please go to: DOWNLOAD HERE and click on the "install" button. It is a windows application and when run will ask for username and password. These are your Betfair user ID and password and are used to connect to Betfair using the free API. Once you have logged on, you are shown the main window. On the left is a tree view you use to select a market and an event. Open the treeview until you find the event you want. When you have chosen through to the lowest level, a drop down list will appear at the top of the right hand pane. Use this to select a runner. As soon as a runner is picked, the simple ladder and graph will update price info every second. At the bottom of the window are some check boxes. These let you turn on or off the various graph lines. The available ones are back1-3 and lay1-3 which relate to the unmatched back and lay prices, next to that are back band and lay band. These are bollinger bands, currently set to use a 20 second moving average of matched prices. Finally there is a checkbox for matched price and moving average matched price. Next to the moving average is a box that you can enter the number of seconds the moving average is over. I hope that all made sense.

Just to repeat, this little application is not a finished, solid application, so don't be surprised if it does something funny every so often or crashes, etc.

If you want to make the graph fill more of the window, click the "hide ladder" check box. You can zoom in onto an area of the graph by holding the left button and dragging the mouse over it.

Have fun.

Thursday, 23 August 2007

"How to easily build your own Betfair bot or trading software"

Yay! I've completed it! After a lot of researching, trial and error and banging my head against an uncompliant computer screen, I've done it. I've worked out how to create a Betfair bot or bit of trading software, for free. I've recorded all of this, so you don't have to go through the hair ripping frustration and annoyance I've been through. I've got it all down in an eBook. It's called, "How to easily build your own Betfair bot or trading software"
By the end, if you follow along, you will have:
  • Your own easily modifyable spreadsheet that loads prices from Betfair.

  • An extendible, .NET based (just like the pros) trading application

You can take these starting points and turn them into whatever it is you want.

In the eBook, I explain:
  • What a bot is and what you'll need to get one working

  • How to get odds and volumes from betfair easily

  • Building on top of Excel, or in .NET

  • Writing a .NET trading application

I explain some of the trickier parts of using the free API (not forgetting, what an API is and why we'd want to use it), including (for the more technical) how to use (with example code) GetMarketPricesCompressed

So, if you're technically mind, you'll be happy, but what if all that stuff is gobbledy-gook to you? Well, I also explain how to find someone else to do the work for you, at bargain basement prices. There are a lot of great programmers out there, with rock bottom prices, if you know where to look. I tell you just that, in my eBook.

Click here to find out more

Sunday, 12 August 2007

Some Bot Work

A bit of a bad day on the trading front. I made a mistake whilst in-play and put on a back I didn't intend and lost. Very careless.

I also got started on my graphing application. I used the Betfair API sample code that you can get from the Betfair web site as a starting point and am changing it to be compatible with the GetMarketPricesCompressed function as this can be called 60 times a minute from the Free API. I have also found an open source graphing component that does all that I require. All I now need is time to get it written. I might post it up when it is done, if anyone is interested.

Wednesday, 1 August 2007

Own Charts

So far, the software I've been playing with has not given me the graphing that I'd like to see (I've not yet tried Bet Angel Pro though, so can't comment on that). My plan is to put together my own graphic tool, using the Betfair API. I'll keep you up to date with my progress on this.

In the meantime, if you are interested in how technical analysis type charting can be used with Betfair, have a look at this article:

Friday, 27 July 2007

Bots without the Betfair API

If you want to write your own Betfair bot or an application that is driven from Betfair data and you don't want to use the API, then you could try screen scraping. The API is the fastest and safest way to go, but it is a bit pricey (£100-£200 per month). You could, of course, use the heavily throttled free version (60 updates a minute of prices from one market and then having to decode the information sent to you) but it is quite hobbled. Screen scraping is a free option but if the web page layout changes, you may need to revisit your code.

So, what is screen scraping? Well, basically, it is just automated web site reading. You tell your computer to go to a web site and look for specific bits of information and then return them to your program, every second or so. The Betfair web site is quite "busy" (it has lots of tables, images, etc on it), but there is another web site provided by Betfair that just has the essentials and this is much easier to screen scrape. The site is http://lite.betfair.com/ and is intended for mobile users. The nice people at Betfair have also provided some sample code, in the form of an Excel spreadsheet, which contains all the code you need to get started. Have a look at the Excel Tracking worksheet at: http://labs.betfair.com/labs.aspx

Good luck!

Thursday, 14 June 2007

Beer


I didn't do any trading last night, as my fiance Sam and I were out to dinner with an old friend of hers. I'm feeling somewhat worse for wear today. That last extra drink seemed such a good idea at the time. We got home, relieved our baby sitter (Sam's mum!) and then effectively passed out on the bed. i woke up at 5am still fully clothed. Oh dear.


Anyway, I have been looking around for some graphic components as i hope to put together my own graphing application, to show prices and volumes with price bands (bollinger bands) from Bet Fair data, using the BetFair API (free version). Not sure when I'll get time to work on this, as I am splitting any free time between: spending time with the kids, wedding related planning, trading, reading (mainly about trading, etc), eating and sleeping.

Thursday, 7 June 2007

Betfair API


As I've got a background in software development, I was immediately interested in doing a bit of bot writing. After a look around the Betfair site I was pleasently surprised to discover that the lovely Betfair people had already put an API together.


If you're not an IT geek like me, then this may well be double dutch to you. What it basically means is that instead of having to write some clever code that effectively logs into Betfair via the web and then decodes the web site pages, clicking robotically on buttons and links, there is a ready built set of commands provided that can be used. So, instead of having to mess about working out how to put a bet on by sending a click on this and send that, we can just send a "I want to bet £20 on XYZ, please" message and voila, it's done.


It's a bit sad, but I got quite excited, especially when I found out that there was a developer version (just for guys like me!). Then the bad news. The cost. Usually API (application programming interface) are available for free but here they want £100 a month. Eek! Now, if a bit of software I write is making me £101+ a month consistently, then fine, but right now it's not. Thankfully, they also provide a free version, but it is somewhat hobbled (ever see the film misery, where the crazy woman smashed the writers legs with a big lump hammer? Well think of the equivalent thing being done to some software).


I'm going to have a look and see what I can do with the free version. My initial thought is to do some fancy graphing of price/volume information, i.e. get some bollinger bands, etc going. I'll report back when I have (may take a little while, mind). If there's anyone out there that have already done some Betfair free API work and fancy a chat and to swap some ideas, drop me a note.