Betfair Data : Betfair Price Files Download Manager

Hugo219
Posts: 1
Joined: Sun Jun 10, 2018 5:50 pm

Sun Jun 10, 2018 6:30 pm

You're amazing DUDE!!/DUDe/Dud-ette ; Surprised at how few youtube views on there though, but your stuff is gold, good work and keep it up sensei !! Many thanks ;) :)

Also worth mentioning that WHEN running the files on a 64-bit machine, like mine, you'd have to mark declare statements with 'PtrSafe' ...... i.e. Using a very generic example below to demonstrate :
"Declare Function GetActiveWindow Lib "user32" () As Long"
becomes :
"Declare PtrSafe Function GetActiveWindow Lib "user32" () As Long"

If running on 32 bit machines, no changes to code required. ----Just my lil contribution

User avatar
gstar1975
Posts: 169
Joined: Thu Nov 24, 2011 11:59 am

Wed Aug 01, 2018 12:18 pm

nigelk wrote:
Sun Jun 18, 2017 12:35 pm
Finding the files here a pain to sort out exactly what you need? How long does it take to sort out & download 1 years worth of files?

www.betfairpromo.com/betfairsp/prices/

Heres a spreadsheet that does away with all the hard work & eyestrain.

Betfair Price Files v5.7z

Note: Any files created on your C drive must be named the same as shown on the download manager. I've made a you tube video thats gives a quick demonstration:

https://www.youtube.com/watch?v=AMpchy4 ... e=youtu.be

and also shows you what VBA reference libraries I've got ticked.

https://www.youtube.com/watch?v=r6rhQ95 ... e=youtu.be

The update button will process any info that is held in the spreadsheet, then looks for any updates for the current year from then on
For example, if you've download 2017 to date, when you run it tomorrow/next week, it will download any updated files. Some files are not listed such as " bfprices_26072008.csv" where there is no indication of win or place or even which country it is

If you look at the UK Win files from 2007, there are only two that we can be sure contain only the win info
Where can I find the Betfair SP matched Volume. Not Total Volume but just the matched money that was matched at Betfair SP. In these SP data files on the Promo site only have the columns for Morning Volume, Pre Off volume and In Play volume but no BSP volume matched for example:
280718 Gabrials King BSP matched Volumes.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
gstar1975
Posts: 169
Joined: Thu Nov 24, 2011 11:59 am

Wed Aug 01, 2018 12:53 pm

Can anyone also explain the discrepancies on the Picture below?

The BSP volume matched does not work out correctly or am I missing something...
280718 Gabrials King BSP matched Volumes.jpg
You do not have the required permissions to view the files attached to this post.

User avatar
Euler
Posts: 17734
Joined: Wed Nov 10, 2010 1:39 pm
Location: Bet Angel HQ
Contact:

Wed Aug 01, 2018 1:16 pm

That does look a bit anomalous because one should be related to the other.

dougkpga
Posts: 11
Joined: Wed Aug 22, 2018 4:12 pm

Sat Aug 25, 2018 1:41 pm

Hi Nigel,
That is an awesome help.
Far be it from me to complain as I am very grateful for the work you have saved me so this is not a complaint but when I downloaded, say 2015 (UK Win) and it said 365 files were available but it downloaded 163 files.
The other years 2016 (152 days) and 2017 (156) were a bit short too.
I'm not sure if I am doing anything wrong and still very happy with the results.
Cheers Doug

neilovan
Posts: 13
Joined: Sun Nov 18, 2018 11:12 am

Tue Jan 08, 2019 6:26 pm

Hello All,

Was just curious as to how things work.
I downloaded a few months data from betfair (the free stuff).
You get a stack of directories with 2 sub folder extracts.

How can you recursively extract each of these 2 files in each subfolder (using 7zip) to one central directory.
At this point you can make a dir list and process each file.

Any help appreciated,

Thanks,

Neil.

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

Tue Jan 08, 2019 9:05 pm

Maybe you could go to the root folder of the tree your files are in, search for all files, then copy & paste them all from the search window, to a single folder somewhere. Then unzip them in there? If you have duplicate file names windows can rename them for you when you do the copy.

Then as you say...you can open a command window, cd to the unzipped files folder and merge them with a dos Copy or Type command.

firlandsfarm
Posts: 468
Joined: Sat May 03, 2014 8:20 am

Fri Mar 01, 2019 9:20 am

I'm getting a 'Compile Error' with Betfair Price Files v5.7z. :(

CompileError.JPG

STOP PRESS: Sorry, my fault, I hadn't seen Hugo219's patch for this before posting (see above). The "PtrSafe" addition works fine. Thanks Hugo … I will leave this post here just to advertise the patch. :)
You do not have the required permissions to view the files attached to this post.

User avatar
shortcut
Posts: 14
Joined: Tue Jun 23, 2015 12:29 pm

Tue Apr 16, 2019 12:26 am

There was a problem accessing the files, it turned out to be that the URL had changed. They switched to a secure server. Make sure you change VBA code to add "s" after the http.

Double check your URLs and make sure the real life addresses match the ones your program is using.

I attached corrected spreadsheet in any case.
You do not have the required permissions to view the files attached to this post.

firlandsfarm
Posts: 468
Joined: Sat May 03, 2014 8:20 am

Tue Apr 16, 2019 8:05 am

shortcut wrote:
Tue Apr 16, 2019 12:26 am
Make sure you change VBA code to add "s" after the http.
Well spotted Shortcut and thanks for the fresh download. I've delved into the code before and changed the target directories for saving the files. I look for "DestinationFolder = "C:\" & FolderName & "\" & DownloadFileName" and put my new path in place of the "C\". I use a D: drive for all personal stuff so changed the code to read "DestinationFolder = "D:\Data\BetfairSP's" & FolderName & "\" & DownloadFileName" and then added the Country and Market sub-folders (e.g. "UK Win" etc.) to the BetfairSP's folder just as I would have done on the C: drive.

However one change that I can't figure is downloading some files the spreadsheet misses. There are 491 files previous to the current naming convention, they are named "bfprices_DDMMYYYY.csv", "bfpricesire_DDMMYYYY.csv", "bfpricesireplace_DDMMYYYY.csv" and "bfpricesplace_DDMMYYYY.csv". I've tried changing/substituting every occurrence I can find of one of the existing file name types to say "bfprices" to download these files but cannot get it to work. :( I'm not a VB coder but I used to write in original BASIC so I have some idea what is going on with the code. Is there something obvious you think I may have missed?

Something else users of this data may not be aware of is that many price files have changed after first publication. Why? I don't know. Some of us may refer to the files daily to top-up our databases, some maybe make it a weekend job and some monthly … I admit I am a "when I think of it" type of guy because I don't need the data to be fully up to date for my purposes but I also don't like basing my decisions on known to be inaccurate data! Let's say you are a 'monthly' guy. :) There are currently 165 files in the list that were 'modified' 30 days or more after they were first published and so far this year 22 files have been modified at least once. And I'm sorry to say that if you are a Daily guy then 822 files have been modified since first published … just something to be aware of. The problem is identifying the modified files as they are sorted in order of "Date Created" on the webpage. I right click on the page, Select All, give it time to copy the selection, it is not immediate because of the size of the page. I then Paste the Text into a spreadsheet for sorting by "Date Last Modified" … you will need to do some manipulating of the date for Excel to read it (I use =DATEVALUE(MID(D2,5,2)&"/"&LEFT(D2,3)&"/"&MID(D2,9,4)) where the Date Last Modified is in column D. You can then compare the last Modified Date with the original Date Created and decide if you want to look at the modified file.

Post Reply

Return to “Betfair Data”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest