+1 vote
Hi, Is there an easy way to download all tomorrows Betfair Horseracing Win Market IDs using the Betfair API. I mean programatically so that I don't have to do it manually. Paul
in Horseracing by doughnut Plater (130 points)

2 Answers

0 votes
There actually isn’t a straightforward way to do this.  I use the getAllMarkets API (using the country & date filters in the call) and then apply my own custom filter

Off the top of my head these are the basic criteria I use, but I think I have a few based on the contents of the menu path as well which I can dig out if you want

numberOfWinners == 1 && marketType == ‘O’
by mcgin Plater (140 points)
+1 vote

There's a script shown in Chapter 5, Example 5-1 of Automatic Exchange Betting that does (almost) exactly this, except it automatically fetches and stores all win market Ids for today. 

To get tomorrow's ids, you just have to change the variable shown there as $date_today to $date_tomorrow (by specifying tomorrow's date, which can be done programmatically), then schedule the script.

 

 

by colin Frankel (19.7k points)
edited by colin
Colin, that's wonderful - Is this your book. I bought it earlier this year. Unfortunately I don't know how to program in Perl.
Paul
Hi Colin, Just looked in the book - 5.2 is just handicaps, 5.1 is the one I need. Thanks, Paul.
now amended in answer...
...