Skip to content

Commit

Permalink
add examples for markets, splits, variables, submarkets
Browse files Browse the repository at this point in the history
  • Loading branch information
kgravenreuth committed May 13, 2024
1 parent a6d9871 commit dc2cd7b
Showing 1 changed file with 65 additions and 1 deletion.
66 changes: 65 additions & 1 deletion content/en/docs/sports/api/markets.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,33 @@ type: docs
weight: 1
---

- The `market url` can be compiled from the feed and takes the form of `<market_key>/<outcome>?<grouping_parameters>`.
### Terminology

#### Market URL

The `market url` can be compiled from the feed and takes the form of `<market_key>/<outcome>?<grouping_parameters>`.

#### Market Key

- The `market_key` is the unique identifier for a market and optionally time period with its own settlement rules.

- The `submarket_key` is a logical period grouping of the market selections and is primarily useful as an indicator of when the market is settled. It is not required for the definition of a `line` as explained below.

**Market and Submarket Key Example**

```json
"markets": {
"soccer.asian_handicap": {
"submarkets": {
"period=ft": {
"sequence": "4441",
"selections": [
{
...
```

#### Outcomes, Grouping Parameters and Lines

- The `outcome` identifies a unique selection on the market, e.g. `0:0` or `home`.

- `grouping_parameters` include grouping information such as handicap and totals values.
Expand All @@ -19,6 +42,47 @@ weight: 1

- A `line` is determined by the `market_key` and the `grouping_parameters`, all selections on a line sum up to 100% true probability, e.g. `soccer.asian_handicap?handicap=-0.5` includes the home and away outcome.

**Outcomes, Grouping Parameters and Lines Example**

```json
"selections": [
{
"outcome": "home",
"params": "handicap=-0.75",
"price": 1.98,
"minStake": 0.1,
"maxStake": 13386.98032,
"probability": 0.488,
"status": "SELECTION_ENABLED",
"side": "BACK"
}
...
```

#### Split and Variables

This is static information available in our market list below, while it is not provided dynamically on the Cloudbet API. This information is primarily meant for market settlement, but can also be used by you to visually separate markets by using the Cloudbet Feed API, if you use our API to display markets on your website.

- `Split`: List of periods and teams which affect market settlement.

- `Variables`: List of variables which affect settlement of a specific market. These can also be used to visually separate lines, e.g. the handicap values on an Asian Handicap market.

**Split and Variables Example**

```json
"soccer.asian_handicap_period_extratime": {
"Name": "Asian Handicap - Extra Time",
"Variables": [
"handicap"
],
"Split": "period=et",
"Outcomes": {
"away": "{{away}} {{-handicap}}",
"home": "{{home}} {{handicap}}"
}
},
```

A list of markets is [available on Github](https://gist.github.com/kgravenreuth/6703e1e213aecac4d5728f2f699d34e7#file-markets-json) and is also made available below.

If you would like to request addition of new markets, then please create a discussion thread in the [Cloudbet Docs Discussions](https://github.com/Cloudbet/docs/discussions) section.
Expand Down

0 comments on commit dc2cd7b

Please sign in to comment.