betting-offers.show [draft]

Resource information

URLhttps://api.statscore.com/v2/betting-offers
MethodGET

Description

Returns detailed information for a requested betting offer

CacheNo
Authorization requiredYes

Method parameters

NameTypeDescription
betting_offer_idxsd:intREQUIRED. The requested betting offer identifier

Query parameters

NameTypeDescription
tokenxsd:stringREQUIRED. There is more information concerning authorization in the API introduction section
langxsd:stringDetermines the language for the output data. The complete list of possible languages can be retrieved using the API resource: languages.index
tzxsd:stringDetermines timezone for the output data. The complete list of possible time zones is included in the API introduction section
pagexsd:intDetermines offset of paginated data. Default value is 1 which means first page
resulted_outcomesxsd:stringDetermines values of outcomes result:
  • yes - outcomes with result attribute
  • no - outcomes without result attribute
timestampxsd:unix_timestampSelection date, format UNIX_TIMESTAMP. Only changes that occurred or were updated after this timestamp will be returned

Method calling examples

LinkDescription
https://api.statscore.com/v2/betting-offers/9812.xml?token={{YOUR_TOKEN}}Returns a list of all betting offers for the customer in XML format
https://api.statscore.com/v2/betting-offers/9812?token={{YOUR_TOKEN}}Returns a list of all betting offers for the customer in JSON format
https://api.statscore.com/v2/betting-offers/9812.xml?token={{YOUR_TOKEN}}&is_live_market=yesReturns a list of all live betting offers for the customer in XML format
https://api.statscore.com/v2/betting-offers/9812.xml?token={{YOUR_TOKEN}}&is_live_market=noReturns a list of all prematch betting offers for the customer in XML format

Output elements

.betting_offers
..betting_offer
idIdentifier of the betting offer
bookmaker_idIdentifier of the bookmaker assigned to you during subscription purchase
is_live_market

Possible values:

  • yes - in-play betting markets
  • no - prematch betting markets *


* If live odds are going to be available for the event one minute before the event start date we will change this attribute from „no” to „yes”. If we don't offer live odds for the event all betting offers will be closed at this moment.

market_idIdentifier for the market. The complete list of possible markets and their default market can be retrieved using the API resource: markets.index
market_nameName of the market
object_type

Possible object type:

  • season
  • event
object_idIdentifier of the object depends on object type.

The complete list of possible seasons can be retrieved using the API resource: seasons.index
The complete list of possible events can be retrieved using the API resource: events.index

object_nameName of the object e.g: Barcelona - Real Madrid or Premiership 2015/16
sport_idUnique identifier for the sport. The complete list of possible sports can be retrieved using the API resource: sports.index
area_idUnique identifier for the area. The complete list of possible areas can be retrieved using the API resource: areas.index
competition_idUnique identifier for the competition. The complete list of possible competitions can be retrieved using the API resource: competitions.index
season_idUnique identifier for the season. The complete list of possible seasons can be retrieved using the API resource: seasons.index
event_idUnique identifier for the event. The complete list of possible events can be retrieved using the API resource: events.index
event_status_id

Unique identifier of the event status. Available only when object_type=event, in other cases null value

The complete list of possible events statuses can be retrieved using the API resource: statuses.index

event_result

Result for the event in format result1:result2 e.g: 2:0. For some sports like tennis attribute will contain results of each period seperated by | e.g 1:1| 4:5 |15:0

Available only when object_type=event and for an event with 2 participants, in other cases null value

clock_status

Clock status. Possible value:

  • running
  • stopped
Available only when object_type=event, in other cases null value
clock_timeHow many seconds have passed in the current event period. Available only when object_type=event, in other cases null value
replacer

For some markets we are using replacers. It's a list of key=value atributtes seperated by | e.g. participant1=Barcelona | participant2=Real. The complete list of possible replacers for each market can be retrieved using the API resource: markets.index. Possible null value.

status

Possible values:

  • active - the odds are published and users can make bets. Defaut value for new betting offer
  • suspended - the users can't bet on the betting offer (e.g when team received the red card)
  • closed - the betting offer is closed and no further bets will be taken
  • cancelled - the betting offer is cancelled
display_orderThe parameter used to sort betting markets. Sorting direction is ascending
start_dateDate when the betting offer starts in format DATE_TIME (2015-03-01 11:02)
open_atDate when the betting offer was opened in format DATE_TIME (2015-03-01 11:02)
closed_atDate when the betting offer should be closed in format DATE_TIME (2015-03-01 11:02)
utInformation about the date and time of when the record was last updated. Format UNIX_TIMESTAMP
...outcomes
....outcome
idIdentifier of the outcome
default_outcome_idDefault outcome id. The complete list of possible default outcomes can be retrieved using the API resource: default-outcomes.index
nameName of the outcome
participant_idIdentifier of the participant related to the outcome. Possible null value. The complete list of possible participants can be retrieved using the API resource: participants.index
statusPossible values:
  • active - outcome and odds are displayed, user can make bets. Default value for new outcome
  • suspended - outcome is suspended, user can't make bets
  • closed - outcome is closed and will be not offer it the future, user can't make bets

  • resulted - outcome has result (result attribute is not empty)
  • cancelled - outcome is cancelled
resultPossible values:
  • won - user won his bet, user should receive winnings (odds*stake)
  • lost - user lost his bet, user lost his stake
  • void - user should receive his stake back
  • partial win - user won part of his bet, user should receive winnings (odds*stake/2 + stake/2)
  • partial loss -  user lost part of his bet, user should receive half of his stake back

Possible empty value for outcomes yet to be settled.

starting_oddsThe starting odds offered by the bookmaker in decimal format
oddsThe current odds offered by the bookmaker in decimal format
probabilityProbability of the outcome in format 0.65
display_orderThe parameter used to sort outcomes. Sorting direction is ascending
utInformation about the date and time of when the record was last updated. Format UNIX_TIMESTAMP

Sample XML/JSON

<betting_offers>
	<betting_offer id="190909093" bookmaker_id="1" is_live_market="yes" market_id="1" market_name="3way" object_type="event" object_id="22345" object_name="Legia Warsaw - Borussia" sport_id="5" area_id="144" competition_id="12" season_id="13456" event_id="22345" event_status_id="1" event_result="0:0" clock_status="running" clock_time="9012" replacer="participant1=Legia Warsaw|participant2=Borussia" status="active" display_order="1" start_date="2016-09-14 20:45:00" open_at="2016-09-12 05:12" closed_at="2016-09-14 20:45:00" ut="12345622323">
 		<outcomes>
			<outcome id="112312" default_outcome_id="1" name="Legia Warsaw" participant_id="136763" status="active" result="none" starting_odds="10.50" odds="9.75" probability="0.0977" display_order="1" ut="12345622323"/>
			<outcome id="112313" default_outcome_id="3" name="Draw" participant_id="" status="active" result="none" starting_odds="5.00" odds="4.85"  probability="0.1965" display_order="2" ut="12345622323"/>
			<outcome id="112314" default_outcome_id="2" name="Borussia" participant_id="136359" status="active" result="none" starting_odds="1.34" odds="1.35" probability="0.7058" display_order="3" ut="12345622323"/>
 		</outcomes>	
	</betting_offer>
</betting_offers>