CONFUSED BY BETFAIR FOOTBALL DATA

User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

neilovan wrote:
Wed Jan 23, 2019 1:40 pm
I think I did, maybe I read wrong document.

it says 'id marketId Unique identifier for the market'

on https://historicdata.betfair.com/Betfai ... cation.pdf

It seems like this file does not tell you the competition.
I'm happy to be corrected on this one as I've not used the historical data, only the api, but from what I can gather then data arrives in 3 levels
marketDefinition
runnderDefinition
and then marketChanges (which are of various types, changes to the Market, Runners, or prices & volumes etc.

It's the key feature with json vs a straight csv. With a csv the market & runner info would normally to be supplied on each line. But json is more like a relational Db where each data item only exists once (ie Venue) and the individual levels eg market, runner, runner info are tied together using market and runner ids.

I hope that's not a red herring.
neilovan
Posts: 13
Joined: Sun Nov 18, 2018 11:12 am

Hi Chaps,

Thanks for the prompt replies. I am definitely getting close to a "EUREKA" moment. Just working through the Arsenal v Leicester CIty game on 2017-08-11. I can see goal times of 2 , 5 and 29 minutes if I look at the history

https://www.google.com/search?q=arsenal ... e&ie=UTF-8

When I parse the JSON file, I do get the 1st SUSPENSION of market at 2 minutes, but don't get the second one at 5 minutes in the json stream. The 3rd one which closes the market at 29 minutes is in the stream.

Is this because the 1st and 2nd goals are too close together ?

Thanks,

Neil.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Has anyone ever tried any of the online json viewers or 'beautifiers', just to get a feel for the content?
Can't comment as I don't have any BF historical data.
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

ShaunWhite wrote:
Wed Jan 23, 2019 6:02 pm
Has anyone ever tried any of the online json viewers or 'beautifiers', just to get a feel for the content?
Yes they are very useful:
https://www.jsonlint.com

Just rember that each line of the historical data and each line (message) you receive from Streaming API is a standalone JSON document.

So you can copy a line, paste it into jsonlint.com and view it in a better format.
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

neilovan wrote:
Fri Jan 18, 2019 4:41 pm
northbound wrote:
Fri Jan 18, 2019 3:36 pm
Betfair historical data is in the same format as the Betfair Streaming API’s.

This format is not like CSV where on every line you have one selection and its data.

Instead, each line is a JSON document that may contain the list of selections or simply changes to one or more selections’ metrics, e.g. LTP, Traded Volume.

Before running (parsing and using this data), you must learn to walk (understand how data stream messages work, what kind of info each message contains, etc).

Do not spend a penny more purchasing Betfair data until you understand the following:
https://docs.developer.betfair.com/plug ... ew/6094862
Thanks for the reply.

As a layman, I don't think I have enough time in this lifetime to figure this out. Seriously, only one thing to say regarding betfair data .... WTF !

May as well send it in Chinese, which F____g moron thinks of this ?

A couple of questions...assuming by some miracle you could decipher this JSON stream

1) Is it a different format for each market. SO Win , different to CORRECT SCORE, different to OVER 2.5 ?
2) Do you need an API key if you are only using static files downloaded?

Thanks for your interest and responses,

Neil.
I tend to agree with you Neil … WTF was and still is my reaction! It seems Betfair take a view of "let's publish historic data in such a form that only those in the SuperCoder's Club can understand it and keep the ignorant morons away from the club members using the data. That way we can claim we publish our data but keep it to a limited few"! Rather than have hundreds, maybe thousands, of Betfair users wasting their time struggling to make sense of the data why can't they publish it in a popular standard form or publish an app to translate it. This data would be more usable if they published it in Swahili!
proper_job
Posts: 1
Joined: Wed Dec 21, 2022 10:46 am

Stumbled across this thread when trying to figure out betfair historical data myself.

This little guide is useful for anyone with a little python experience:
https://medium.com/@properjob/betfair-e ... 648166a37b
Sooty1307
Posts: 8
Joined: Mon Oct 19, 2020 9:25 am

Hi proper_job, you are getting pretty close to what I want to extract from Betfair, are you able to share your full Python script? I would like to use it and make some amendments to go through all of the bz2 files that I have, record the last price before the market went live, record all subsequent market movements (1 per minute) and then export the whole database to a csv file. Your article seems to be a step in the right direction
Post Reply

Return to “Betfair Data”