Skip to content

Getting Odds By Foreign ID (API v4)

Ihor Komar edited this page Mar 31, 2023 · 4 revisions

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

Request URLs

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

Request parameters

Parameter Description Type Required
apiKey Your secret oddsmarket API key VARCHAR true
bookmakerIds Comma separated list of Bookmaker IDs 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
side Must be BACK (default) or LAY VARCHAR false

URL example

https://api-lv.oddsmarket.org/v4/same_bets_by_foreign_betid?apiKey=YOUR_API_KEY&bookmakerIds=2,3&rawIdOriginBookmakerId=1&rawEventId=E130&rawBetId=B2302&side=BACK

Response example

Success

{
  "status": "SUCCESS",
  "responseData": {
    "2": {
      "odds": 1.57,
      "marketDepth": 20.23,
      "lastScannedAt": 1680193208013,
      "oddsLastModifiedAt": 1680171840418
    },
    "3": {
      "status": "OUTCOME_NOT_FOUND"
    }
  }
}

Failure

{
  "status": "OUTCOME_NOT_FOUND"
}

Response schema

Field Description Type
status Query status code VARCHAR
responseData Query results container Map from bookmaker ID (SMALLINT) to Result object

Result object

Field Description Type
status Result status code VARCHAR
odds Odds (price) FLOAT
marketDepth Amount of best bid/ask position on exchange FLOAT
lastScannedAt Last scan time in milliseconds BIGINT
oddsLastModifiedAt Last odds modification time in milliseconds BIGINT

Query status codes

Code Description
SUCCESS OK
FAILURE Internal server error
BOOKMAKER_EVENT_NOT_FOUND Event not found by specified rawEventId
EVENT_ID_NOT_FOUND Bookmaker event is not linked to our internal event
OUTCOME_NOT_FOUND Outcome not found by specified rawBetId
AMBIGUOUS_OUTCOME_FOUND Ambiguous outcome found by specified rawBetId

Result status codes

Code Description
SUCCESS OK
OUTCOME_NOT_FOUND Outcome not found
AMBIGUOUS_OUTCOME_FOUND Ambiguous outcome found
Clone this wiki locally