dbo.fn_RaceProperty

Syntax:
dbo.fn_RaceProperty(id_race, property, index)

Output:
(decimal) Returns properties of a specific race.

Input parameters:
id_race (integer)Id of the market.
property (string) Can return one of the following properties:
  • 'favourite_by_odd' = returns the Id of the runner at the position [index]. Horses are ordered by back price
  • 'favourite_by_bf' = returns the Id of the runner at the position [index]. Horses are ordered by Betfair ordinal position
  • 'distance' = return the distance of the race in meters
  • 'in_play' = returns the in-play status of the race: 0 the race didn't go in-play, if 1 the race went in-play
  • 'turn_in_play_enabled' = return the in-play type of the race: if 0 the race will not go in-play, if 1 the race will go in-play
  • 'seconds_to_the_start' = seconds remaining to the scheduled start of the race
  • 'seconds_in_play' = seconds elapsed since the race went in-play
  • 'minutes_to_the_start' = minutes remaining to the scheduled start of the race
  • 'overround_back' = overround back percentage of the race. More it is close to 100 more the back prices are fair
  • 'overround_lay' = overround lay percentage of the race. More it is close to 100 more the lay prices are fair
  • 'runners' = count of the runners of the race. Retired horses are not included
  • 'tam' = total amount matched in a race (all the horses)
  • 'race_delay' = delay in seconds between the scheduled time of start and the timestamp of start. Normally is used passing as [id_race] the variable @id_race_prev
index (integer)When the property returns an array (for ex. favourite_by_odd), with index you specify the ordinal position of the value you want.
If the property returns one single value (for ex. tam), this parameter is unused.

Example:

dbo.fn_raceproperty(@id_race,'overround_back',1)

returns the overround back percentage of the current race