Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
    "decimalPrice": 1.66,
    "probability": 0.5656463943226999,
    "suspended": false,
    "status": "available",
    "legs": [
        {
            "id": "MatchResult_Away",
            "status": "trading"
        }
    ]
}

Step 3: Get the list of the compatible market types to show to the user after one leg is selected

The following request gets the list of available markets taking into account the already selected leg. :

GET sports/10/fixtures/123456/market-types?legs=MatchResult_Home&limitTo=MatchResult,HomeTeamTotalGoalsOverUnder

Info

The Match Result market will be included in the response as compatible:false because it is already used in one of the legs. The probabilities and prices take into account that the Match Result Home leg is included in the bet.

...

Code Block
[
  {
    "id": "MatchResult",
    "name": "Match Result",
    "translatedName": "",
    "categoryName": "Match Result",
    "translatedCategoryName": "",
    "selections": {
      "MatchResult_Home": {
        "name": "Manchester United",
        "translatedName": "Man Utd",
        "compatible": false
        "suspended": false
      },
      "MatchResult_Draw": {
        "name": "Draw",
        "translatedName": "X",
        "compatible": false
        "suspended": false
      },
      "MatchResult_Away": {
        "name": "Arsenal",
        "translatedName": "FC Arsenal",
        "compatible": false,
        "suspended": false
      }
    }
  },
  {
    "id": "HomeTeamTotalGoalsOverUnder",
    "name": "Manchester United Total Goals OverUnder",
    "translatedName": "Man Utd Total Goals Over/Under",
    "categoryName": "Home Team Total Goals OverUnder",
    "translatedCategoryName": "Home Team Total Goals Over/Under",
    "selections": {
      "HomeTeamTotalGoalsOverUnder_Over_0.5": {
        "name": "Over 0.5",
        "translatedName": "Over 0.5",
        "compatible": true
        "probability": 0.123,
        "decimalPrice": 1.23,
        "suspended": false
      },
      "HomeTeamTotalGoalsOverUnder_Over_1.5": {
        "name": "Over 1.5",
        "compatible": true,
        "translatedName": "Over 1.5",
        "probability": 0.123,
        "decimalPrice": 1.23,
        "suspended": false
      },
      "HomeTeamTotalGoalsOverUnder_Over_2.5": {
        "name": "Over 2.5",
        "translatedName": "Over 2.5",
        "compatible": true,
        "probability": 0.123,
        "decimalPrice": 1.23,
        "suspended": false
      }
    }
  }
]

Step 3: User adds a second leg (HomeTeamTotalGoalsOverUnder_Over_2.5) to the bet

The following call gets the price for the current bet: GET sports/10/fixtures/123456/prices?legs=MatchResult_Home,HomeTeamTotalGoalsOverUnder_Over_2.5

Code Block
languagejson
{
    "decimalPrice": 1.77,
    "probability": 0.4656463943226999,
    "suspended": false,
    "status": "available",
    "legs": [
        {
            "id": "MatchResult_Home",
            "status": "trading"
        },
        {
            "id": "HomeTeamTotalGoalsOverUnder_Over_2.5",
            "status": "trading"
        }
    ]
}

...

GET /sports/10/fixtures/123456/markets?legs=legs=MatchResult_Home%2CHomeTeamTotalGoalsOverUnderHome,HomeTeamTotalGoalsOverUnder_Over_2.5

Code Block
languagejson
{
  "id": "104517634",
  "tradingPlatformId": "123abc",
  "tradingPlatformMetadata": "CP$null$6768414.2$Lions%20v%20Jaguares$45592268.2...",
  "tradingPlatformFixtureId": "1234"
}

...

GET sports/10/fixtures/123456/results?legs=MatchResult_Home,HomeTeamTotalGoalsOverUnder_Over_2.5

Code Block
languagejson
{
    "result": "lose",
    "legResults": [
        {
            "leg": "MatchResult_Home",
            "legResult": "win"
        },
        {
            "leg": "HomeTeamTotalGoalsOverUnder_Over_2.5",
            "legResult": "lose"
        }
    ]
}

...