Betfair Historical Data

Post Reply
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

Hi,

I'm looking at making histograms and frequency distribution charts, for horse racing, but I need a lot of data.

Has anyone got any Betfair historical data sheets they can donate?

Obviously all results and findings will be posted here.

If interested, please pm me
Thanks, Nigel
donfede
Posts: 23
Joined: Wed Jul 08, 2009 3:35 pm

I am not sure if what you are asking for is legal.
You can share results, findings, but not raw data I believe.
User avatar
Euler
Posts: 24798
Joined: Wed Nov 10, 2010 1:39 pm
Location: Bet Angel HQ

There is publically available data at data.betfair.com. If that's what you are after I have this archive in a suitable format.
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

Euler, That's exactly what I'm after.

Nigel.
blueport
Posts: 229
Joined: Mon May 18, 2009 7:35 am

Hi,

I would like to do some research of my own but I'm not sure where to start.

I know the Historical Data files are too large to import in to Excel.

If someone could point me in the direction of some useful information it would be appreciated.

Thanks,

Simon
ebasson61
Posts: 66
Joined: Sun Feb 07, 2010 12:53 pm

The data sheets are not too large to load into Excel - they just take a while to load.

I wrote a program to filter the raw data for my specific needs. Then I can either load the filtered data into Excel, or get the same program to order the data into a the format I require.
User avatar
gutuami
Posts: 1858
Joined: Wed Apr 15, 2009 4:06 pm

the best way is to load them into Access and do whatever you want with them. Very simple and easy. Off course with basic knowledge of how to use Access queries...
Tommassi
Posts: 22
Joined: Fri Jun 19, 2015 11:19 am

I know this is a bit of an old post, but am trying to gathering some historical stats for football markets. I've downloaded from CSV data from data.betfair.com, and have imported the data into my MySQL database.

I'm trying to work out what the start price was for example for Match Odds for Home,Draw,Away etc before the match went in play.

What fields should I be looking at ? Scheduled Off, Actual Off and Last Taken or First Taken ?

What is the difference between Last Taken and First Taken ?

Thanks in advance for any comments.
LinusP
Posts: 1873
Joined: Mon Jul 02, 2012 10:45 pm

The following should work but it doesn't

Code: Select all

SELECT SELECTION_ID
      ,FULL_DESCRIPTION
      ,SELECTION
      ,(SELECT ODDS 
        FROM BETFAIR_TEMP
        WHERE SELECTION_ID = BT.SELECTION_ID
              AND FULL_DESCRIPTION = BT.FULL_DESCRIPTION
              AND IN_PLAY = 'PE'
        ORDER BY STR_TO_DATE(LATEST_TAKEN, '%d-%m-%Y %H:%i:%s') DESC
        LIMIT 1) AS BSP
      ,WIN_FLAG
FROM BETFAIR_TEMP BT
WHERE FULL_DESCRIPTION = 'English Soccer/FA Cup/Fixtures 09 January  /Ipswich v Portsmout'
      AND EVENT = 'Match Odds'
GROUP BY SELECTION_ID, FULL_DESCRIPTION, SELECTION, WIN_FLAG;
SELECTION_ID FULL_DESCRIPTION SELECTION BSP WIN_FLAG
48324 English Soccer/FA Cup/Fixtures 09 January /Ipswich v Portsmout Ipswich 630.0 0
58344 English Soccer/FA Cup/Fixtures 09 January /Ipswich v Portsmout Portsmouth 6.0 0
58805 English Soccer/FA Cup/Fixtures 09 January /Ipswich v Portsmout The Draw 1.03 1

It looks as though the IN_PLAY flag doesn't mean anything, I recommend chucking a few indexes on the table (SELECTION_ID/FULL_DESCRIPTION) if you haven't already.
The data given is as follows...



EVENT_ID
COUNTRY (horseracing only)
FULL_DESCRIPTION
COURSE (horseracing only)
SCHEDULED_OFF
EVENT
ACTUAL_OFF
SELECTION
SETTLED_DATE
ODDS
LATEST_TAKEN (when these odds were last matched on the selection)
FIRST_TAKEN (when these odds were first matched on the selection)
IN_PLAY (IP - In-Play, PE - Pre-Event, NI - Event did not go in-play)
NUMBER_BETS (number of individual bets placed)
VOLUME_MATCHED (sums the stakes of both back and lay bets)
SPORTS_ID
SELECTION_ID
WIN_FLAG (1 if the selection was paid out as a full or partial winner, 0 otherwise)
xitian
Posts: 457
Joined: Fri Jul 08, 2011 2:08 pm

I think you might need to be careful here.

There's a note which says:
With the introduction of Keep Bets at the end of 2008, some trades have subsequently been labelled as PE when they should in fact be IP. This is due the fact that the bets were matched in-play (IP) although they were placed pre-event (PE) using Keep Bets.

Which means if you're looking at the Latest Taken time and filtering by IN_PLAY='PE' then you need to be careful this wasn't a bet placed pre-play, but matched in-play at a later time, thus dirtying the data. You should compare the Latest Time against the Actual Off time just in case.

It's a real shame that Betfair haven't fixed this issue since it makes a lot of the data pretty useless for this purpose.

Let me know if I've made a mistake though, since the last time I looked at it was a while ago.
LinusP
Posts: 1873
Joined: Mon Jul 02, 2012 10:45 pm

Of course, that would be why the above doesn't work, don't think it is possible then from this data source.
xitian
Posts: 457
Joined: Fri Jul 08, 2011 2:08 pm

LinusP wrote:The following should work but it doesn't
Ah, I missed that sentence. Well at least now everyone knows it doesn't work and why!

I wish Betfair would fix it. The data would be so much more useful!
Tommassi
Posts: 22
Joined: Fri Jun 19, 2015 11:19 am

Thanks for the sample. Actually I already have the data in a MySQL database, and am then loading the data into a .NET (C#) web service that I've developed. From here I can query the in-memory cache of data that I've created, which is really fast.

But the problem I have is determining what data I need to use to get the pre-match odds for a market in any football game.

I was considering to use the last taken date which is closest to the actual off date/time (even if I get the closest last taken record after the actual off time ?). So I get the last matched odds taken before the game went in play. This should give me a closest enough match of what the odds were before the game started.

Also, if I wanted to get the in-play odds at a particular time, I could use the last taken date, and the in play flag ?

Thoughts ?? Anyone else use this data to help get the odds at when the match started ??
Tommassi
Posts: 22
Joined: Fri Jun 19, 2015 11:19 am

Has anyone much experience with the Betfair historical data ? Basically, I have managed to import and organise the data in my database, and am able to produce some statistics like average number of first half goals for games that had starting odds between a range.

However, I noticed that for example the Everton Vs Swansea game on 24th Jan, the First Half Goals Under 3.5, doesn't exist or have any matched bets at all ?

Is this normal. I was going to base all my win selections for Over/Unders on the Unders market.
scesc
Posts: 97
Joined: Sun May 22, 2016 8:01 am

I went to the Betfair Data Home Page http://data.betfair.com/ and downloaded a random file to see what it looked like. I was particularly interested in football data. I got one from a week in April and can see matches from that week in the file. However, every other file I've downloaded, just contains Horse Racing data. I'm selecting files from the "Other" column in the screenshot below. Am I missing something here ?
Thanks
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Betfair Data”