Documentation

Odds format

The oddsformat GET parameter is available on the page where copy-betting is enabled. With this parameter, you can choose how the odds (coefficients) are displayed.

  1. decimal — decimal format (the standard option)
  2. american — American format (US odds)

If the parameter is not specified or an invalid value is passed, the default decimal format is used.


1. Decimal Format (decimal)

When decimal is selected, odds are displayed in a familiar decimal format, such as 1.4, 3.0, or 99.0. By convention, no more than two decimal places are shown.


2. American Format (american)

When american is selected, decimal odds are automatically converted to American (US) odds using the following rules:

2.1 Main Conversion Formula

  • If the decimal odds D < 2:

    USOdds = -1 * ceil(100 / (D - 1))

    where ceil denotes rounding up.

  • If the decimal odds D >= 2:

    USOdds = floor(100 * (D - 1))

    where floor means truncating the decimal part.

2.2 Special Case for |USOdds| > 1000

If the absolute value of the result exceeds 1000, the value is additionally rounded down to the nearest multiple of 5. Specifically:

  • For positive values (when D ≥ 2), round down (e.g., 1142 → 1140).
  • For negative values (when D < 2), round in the "larger magnitude" direction, resulting in a more negative number (e.g., -1698 → -1700).

Examples

  1. Decimal: 1.1112

    USOdds = -1 * ceil(100 / (1.1112 - 1))
           = -1 * ceil(899.28057)
           = -900

    Final value: -900 (no additional rounding needed).

  2. Decimal: 5.3334

    USOdds = floor(100 * (5.3334 - 1))
           = floor(433.34)
           = 433

    Final value: 433.

  3. Decimal: 1.0589

    USOdds = -1 * ceil(100 / (1.0589 - 1))
           = -1 * ceil(1697.79)
           = -1698

    Since 1698 > 1000, it is rounded to the nearest multiple of 5: -1700.

  4. Decimal: 12.4286

    USOdds = floor(100 * (12.4286 - 1))
           = floor(1142.86)
           = 1142

    Since 1142 > 1000, it is also rounded down to a multiple of 5: 1140.


Using the oddsformat Parameter

To apply this functionality, simply pass the oddsformat parameter in the URL:

  • oddsformat=decimal → Odds are displayed in decimal format (1.4, 3.0, 99.0, etc.).
  • oddsformat=american → Odds are displayed in American format (-900, +433, -1700, +1140, etc.).

If the parameter is omitted or an invalid value is passed, the decimal format is automatically used.


Additional Details

  • When odds exceed 1000 in absolute value, they are always rounded down to the nearest multiple of 5, which can sometimes slightly benefit the player.
  • This feature is fully available in production and can be used to customize how odds are displayed in copy-betting widgets.