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:
The SDK takes care of these market description automatically for you, so you donât have to manage any of the above yourself when using it.
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
In some cases, the attribute âproduct_idsâ will be displayed in addition to the normal âproduct_idâ attribute.
This is an indication that some mappings are available for multiple odds producers. This is usually the case when the mapping includes both the Live Odds producer and the BetPal producers. In this case, the attribute will display: product_ids=â1|4â (1 is for Live Odds, 4 is for BetPal).
We are moving away from using the âproduct_idâ attribute, and clients should therefore start using âproduct_idsâ instead.
XML Example
Last updated
Was this helpful?