Skip to content

Getting Avgline Odds By Foreign ID (API v4)

abler98 edited this page Jan 24, 2024 · 5 revisions

The endpoint allows you to get odds from specified Avgline for a specific event and outcome identified by eventId and outcomeId of specific bookmaker.

Request URLs

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

Request parameters

Parameter Description Type Required
apiKey Your secret oddsmarket API key VARCHAR true
averageLineBookmakerId Average Line Bookmaker ID SMALLINT true
rawIdOriginBookmakerId Bookmaker ID which is origin of rawEventId, rawBetId SMALLINT true
rawEventId Event ID at the IDs origin bookmaker VARCHAR true
rawBetId Outcome ID at the IDs origin bookmaker VARCHAR true

URL example

https://api-lv.oddsmarket.org/v4/avg_value_by_foreign_betid?apiKey=YOUR_API_KEY&averageLineBookmakerId=200&rawIdOriginBookmakerId=1&rawEventId=E130&rawBetId=B2302

Response example

Success

{
  "status": "SUCCESS",
  "odds": 1.657143,
  "trace": {
    "10": {
      "weight": 1.0,
      "odds": 1.657143
    }
  }
}

Failure

{
  "status": "OUTCOME_NOT_FOUND"
}

Response schema

Field Description Type
status Query status code VARCHAR
odds Odds (price) FLOAT
trace List of bookmakers who took a part in the formation AvgLine with weight and odds Map from SMALLINT bookmakerId to Trace value

Trace value

Field Description Type
weight Bookmaker weight in the formation AvgLine FLOAT
odds Bookmaker odds in the formation AvgLine FLOAT

Query status codes

Code Description
SUCCESS OK
FAILURE Internal server error
INVALID_BOOKMAKER_ID Specified bookmaker id is not an average line bookmaker
BOOKMAKER_EVENT_NOT_FOUND Event not found by specified rawEventId
EVENT_ID_NOT_FOUND Bookmaker event is not linked to our internal event
BOOKMAKER_HAS_NO_BOOKMAKER_EVENTS_LINKED_TO_EVENT_ID Average line bookmaker has no linked events to the event id
OUTCOME_NOT_FOUND Outcome not found by specified rawBetId
AMBIGUOUS_OUTCOME_FOUND Ambiguous outcome found by specified rawBetId
Clone this wiki locally