0 votes
Hi,

 

I was wondering if I was correct in my assumption that the Place MarketId is always one greater than the Win MarketId.

 

So if the win marketId is 1450078

the place marketId will be 1450079

 

I've checked numerous races manually and this seems to be the case but I wouldn't want to code it that way if it isn't the case in even the rarest of occasions.

 

Thanks in advance

Matt
in Automatic Exchange Betting by mrsouthg Novice (310 points)

3 Answers

0 votes
Ahhhh, digging deeper it would appear not.

What do I need to do to the code from Example_5.2 to get the place market as opposed to the win market?

Is it to do with:

"my $event_menu = 13;            #"13" is the current menu ID for horseracing events;"

or

"unless ($market_name =~ /\([A-Z]+|F\/C|Fav|Place|W\/o/)"

 

I have tried removing Place entirely, substituting Win in its place.......

 

All to no avail............

 

I have just removed the entire clause "unless ($market_name =~ /\([A-Z]+|F\/C|Fav|Place|W\/o/)" and I am getting all manner of markets coming through and I can see the correct "TO BE PLACED" markets, however it is struggling with pulling in the abbrev file to decode the course......

 

Any help is appreciated, thanks in advance.
by mrsouthg Novice (310 points)
+1 vote

Instead of filtering out everything but win markets with the phrase in the book:

>unless ($market_name =~ /\([A-Z]+|F\/C|Fav|Place|W\/o/)

Try explicitly looking for place markets as follows:

>if ($market_name =~ /Place/)

This should work.  There may be some additional markets returned, but you can add filters as above to get rid of them.

 

 

 

by colin Frankel (19.7k points)
0 votes

Hi Colin,

I've tried "If ($market_name =~ /Place/)" and find that it does indeed pull back other markets. What I have noticed is that the GB racing comes back without a country in brackets.

Sandown for instance comes back as:

SAND  (Place)

but were SAND in the USA it'd look like:

SAND (USA)  (Place)

 

What is the best way of changing the IF so it excludes at least "(USA)" and "(ZAF)" etc.

 

Thanks in advance

Matt

by mrsouthg Novice (310 points)
Hi Matt, this should be something like:

if ($market_name =~ /Place/ && $market_name !=~ /\([A-Z]+|F\/C|Fav|W\/o/)

In other words you need to specify the regular expression you are looking to match as well as the one that you are not...
...