Market Description
Market descriptions and outcome descriptions have a template language that can be used to describe the actual market or outcome. This is easiest described with an example
XML Example
<market id="300" name="Race to {pointnr} points">
Anything between curly braces {} can be replaced by the actual market information in an odds_change message. Normally what is in between the curly braces is a name of a specifier and should be replaced by that particular specifier value. Consequently, if you receive an odds_change message like this:
XML Example
<market id="300" specifiers="pointnr=3">
You should print this market name as “Race to 3 points”.
If the first character after the opening curly brace is an !, followed by a specifier name, then you should replace the curly-braces expression with the specifier as an ordinal number, illustrated below.
XML Example
<market id="446" name="{!periodnr} period - total">
And you receive an odds_change message with the following market info:
XML Examples
<market id="446" specifiers="periodnr=2">
You should display the market name as: “Second period – total”.
If the first character after the opening curly brace is a + followed by a specifier name, then the specifier must be of number type, and you should replace the curly-braces expression with the specifier and add the right +/- sign in front of it.
If the first character after the opening curly brace is a - followed by a specifier name, then the specifier must be of number type and you should replace the curly-braces expression with the negated specifier and add the right +/- sign in front of it.
There are a few special keywords that can also show up within the curly-braces that have a special meaning:
{$competitor1} means to replace the expression with the name of the first competitor in the sport event – note this is often occurring in the outcome descriptions.
{$competitor2} means to replace the expression with the name of the second competitor in the sport even – note this is often occurring in the outcome descriptions.
{$event} means to replace the expression with the name of the event. This is typically used for outright markets.
{X}
Replace {X} with the value of the specifier X.
“Race to {pointnr} points”
… specifiers=”pointnr=3”
“Race to 3 points”
{!X}
Replace {X} with the ordinal value of the specifier X
{+X}
Replace {X} with the value of the specifier X with a +/- sign in front.
{-X}
Replace {X} with the negated value of the specifier with a +/- sign in front
{(X+/-c)}
Replace the expression with the value of the specifier X + or - the number c.
“{!(inningnr+1)}
inningnr=2
“3rd inning”
{$competitorN}
Replace with the Nth competitor in the event or if you prefer “TeamN” or “PlayerN” as appropriate
{$event}
Replace with the name of the event.
“Winner of {$event}”
Id=”sr:tournament:1”
“Winner of Euro2016”
{%player}
Replace with the name of the specifier (which should be an id typically to a player or competitor)
“{%player} total dismissals"
player=sr:player:1234
“John Rodriquez total dismissals”
product_ids Attribute
XML Example
<mappings>
<mapping product_id="1" product_ids="1|4" sport_id="sr:sport:6" market_id="8:232" sov_template="{total}">
<mapping_outcome outcome_id="13" product_outcome_id="2528" product_outcome_name="under"/>
<mapping_outcome outcome_id="12" product_outcome_id="2530" product_outcome_name="over"/>
</mapping>
Last updated
Was this helpful?