Odds and Charts
Show prices the way your players read odds, and match the charts to your brand
The chart line style, fill and colors are part of your look; the parameters below override them for one page. Your default odds format, and the formats players may switch to, are not part of the look but a betting setting you set in the back office. Your own page can still choose a format for itself, as below.
Odds Format
Every market price in the embed is a probability between 0 and 1. These are the ways it can be written for your players:
odds (URL) / oddsFormat (Host SDK) | A price of 0.40 reads | Suits |
|---|---|---|
cents (Phoenix's default) | 40c | Prediction-market players |
percent | 40% | Readers of chances |
decimal | 2.50 | Sportsbook and casino players used to decimal odds |
multiplier | 2.50x | The payout multiple: what one staked pays back if it wins |
fractional | 3/2 | Fractional odds |
american | +150 | American odds |
The same format is used where players type a limit price, so a player who reads decimal odds also types them. The format changes only how prices are written and typed: order amounts, balances and payouts are always shown as money in the session's currency.
Which Format Shows
The format a player sees comes from these, the later winning:
- Your default, from your Betting settings.
- The page's
oddsin the iframe URL. The Host SDK's mounttheme.oddsFormattravels as this parameter. - The latest choice made while the embed runs: the player's own pick in the price menu, or your page's
setTheme({ oddsFormat }), whichever came last.setTheme({ oddsFormat: null })drops the current choice, and the page'sodds, then your default, shows again.
The page's odds and setTheme({ oddsFormat }) come from your own page, so each can name any of the six formats, whether or not you allow it: a page that passes odds=american shows American odds although you allow only decimal and multiplier. Only the player's own pick in the price menu is limited to the formats you allow.
Until you save Betting settings, only Cents is allowed. Players then see cents and no price menu, and nothing they do changes it. The same holds when you allow one format. Only your own page, with odds or setTheme, can show another format.
?token=JWT&odds=decimalThe Players' Price Menu
When you allow more than one format, the bet slip shows a menu named after the current format, for example Decimal odds. It lists the formats you allow, each writing the current price its way, for example Payout 2.50x. A pick changes every price in the embed at once and is kept on the player's device for your operator, so it is still there on their next visit. With one format allowed, which is also the case until you save Betting settings, there is no menu.
Charts
In your look these are the Chart lines, Chart fill and Chart colors settings (see Charts). Leave a parameter out and the embed uses your look's choice, or the default if you have not saved a look.
| URL param | Host SDK theme field | Values | Default |
|---|---|---|---|
curve | chartCurve | smooth, linear or step: how chart lines join their points. The look calls them Smooth, Straight and Steps | Your look's chart lines, else smooth |
fill | chartAreaFill | 1 or true in a URL, true in the SDK: a soft gradient under chart lines | Your look's chart fill, else off |
palette | palette | Colors used in order for the line of each market on an event with several markets, and for its dot and small chart in the market list. In a URL, a comma-separated list of hex colors (%23 for #); in the SDK, an array | Your look's chart colors, else the built-in palette, led by your brand color |
?token=JWT&curve=linear&fill=1&palette=%23F97316,%232563EB,%2316A34Atheme: { chartCurve: 'linear', chartAreaFill: true, palette: ['#F97316', '#2563EB', '#16A34A'] }Palette entries that are not hex colors are skipped. Palette colors are checked for legibility on each mode's page, like your brand color: a color that is too dark or too light for a mode is shown as a legible shade of the same hue.