Skip to content

Settlements (API v4)

Igor Komar edited this page Apr 2, 2024 · 6 revisions

Settlements API

All requests must be authenticated by sending the API key in the apiKey query parameter. Please contact your account manager to receive your personal API key.

We are strongly recommend to use gzip or deflate compression for all requests. It will reduce traffic usage and response time. To enable compression, add Accept-Encoding: gzip, deflate header to your requests. Before adding this header, make sure your HTTP client supports compression.

Base URL

  • Live: https://api-lv.oddsmarket.org
  • Prematch: https://api-pr.oddsmarket.org

URL examples

  • https://api-lv.oddsmarket.org/v4/settlements/events/search?apiKey=YOUR_API_KEY
  • https://api-pr.oddsmarket.org/v4/settlements/events/search?apiKey=YOUR_API_KEY

Event settlements

GET /v4/settlements/events/{eventId}?apiKey=YOUR_API_KEY&minEffectiveSince=1710348713000&requiredSettlementFeatures=VOID_ALL_UNDECIDED_MARKETS
Parameter Description Type Required
eventId Event ID in our system BIGINT Yes
minEffectiveSince Filter by effective since value (milliseconds since epoch) BIGINT No
requiredSettlementFeatures List of required settlement features SettlementFeature[] No

Response

[
  {
    "outcomeSpec": {
      "marketAndBetTypeId": 1,
      "marketAndBetTypeParam": 0.0,
      "periodIdentifier": 1,
      "playerId1": 0,
      "playerId2": 0
    },
    "settlementResult": "LOSE",
    "effectiveSince": 1710348713000,
    "dataProviderId": 2
  }
]

Root object is a list of EventOutcomeSettlement objects.

Search settlements

POST /v4/settlements/events/search?apiKey=YOUR_API

{
    "outcomeSpecsByEventId": {
        "61276150": [
            {
                "marketAndBetTypeId": 1,
                "marketAndBetTypeParam": 0.0,
                "periodIdentifier": 1,
                "playerId1": 0,
                "playerId2": 0
            }
        ]
    },
    "requiredSettlementFeatures": [
        "VOID_ALL_UNDECIDED_MARKETS"
    ]
}
Field Description Type Required
outcomeSpecsByEventId Map from event ID to list of outcome specifications Map from BIGINT to OutcomeSpec[] Yes
requiredSettlementFeatures List of required settlement features SettlementFeature[] No

Response

{
  "61276150": [
    {
      "outcomeSpec": {
        "marketAndBetTypeId": 1,
        "marketAndBetTypeParam": 0.0,
        "periodIdentifier": 1,
        "playerId1": 0,
        "playerId2": 0
      },
      "settlementResult": "LOSE",
      "effectiveSince": 1710348713000,
      "dataProviderId": 2
    }
  ]
}

Root object is a map from event ID to list of EventOutcomeSettlement objects.

Types

EventOutcomeSettlement

Field Description Type
outcomeSpec Outcome specification OutcomeSpec
settlementResult Settlement result SettlementResult
effectiveSince Effective since (milliseconds since epoch) BIGINT
dataProviderId Data provider ID TINYINT

OutcomeSpec

Name Description Type
marketAndBetTypeId ID of MarketAndBetType SMALLINT
marketAndBetTypeParam Parameter value for some outcome types (such as handicaps, totals, etc) FLOAT
periodIdentifier Period identifier SMALLINT
playerId1 Internal ID of a player in our system BIGINT
playerId2 Internal ID of a player in our system BIGINT

SettlementFeature

Name Description
VOID_ALL_UNDECIDED_MARKETS Refund ALL undecided bets (regardless of the obvious outcome) in case a match that has already started is canceled.
VOID_ALL_CONDITIONALLY_UNDECIDED_MARKETS Refund undecided bets (considering the obvious outcome) in case a match that has already started is canceled.
MATCH_WINNER_IS_SETTLED_IF_FIRST_SET_IS_PLAYED The “Match Winner” market is settled if the first set is played.
MATCH_WINNER_IS_NOT_SETTLED The “Match Winner” market is not settled at all.

SettlementResult

Name Description
UNKNOWN Outcome result is unknown (reserved for future use)
PENDING Outcome result is not yet available (reserved for future use)
UNSUPPORTED_MARKET Market is not supported
WIN Win
LOSE Lose
DRAW The outcome of the event ended in a tie, resulting in neither a win nor a loss for the bet.
HALF_WIN The bet partially won, usually applied in Asian handicap betting, resulting in a return that is more than the original stake but less than a full win.
HALF_LOSE The bet partially lost, often related to Asian handicap betting, resulting in a return that is less than the original stake but not a total loss.
Clone this wiki locally