Versions Compared

Key

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

Resource information

URLhttps://api.softnetsportstatscore.com/v2/betting-offers
XSDMethodGET

Description

Returns detailed information for a requested betting offer

CacheNo
Authorization requiredYes

...

NameTypeDescription
betting_offer_idxsd:intREQUIRED. The requested competition betting offer identifier

Query parameters

Possible values:

  • yes - display all in-play betting markets
  • no - display all 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 markets will be closed at this moment.
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 pagelimitxsd:intDetermines maximum number of returned betting markets on page. Used in paginated data. Default value is 50

Possible values: 5, 10, 25, 50, 100

is_live_marketxsd:string
market_idxsd:intDetermines the market identificator. Possibility to input multiple identifiers, separated by comma. The complete list of possible markets can be retrieved using the API resource: markets.index
scope_idxsd:intDetermines the scope identificator. Possibility to input multiple identifiers, separated by comma. The complete list of possible scopes can be retrieved using the API resource: scopes.index
market_type_idxsd:intDetermines the market type identificator. Possibility to input multiple identifiers, separated by comma. The complete list of possible markets types can be retrieved using the API resource: markets-types.index
default_marketxsd:int

Possible values:

  • yes - display only one most important market for each sport. For soccer it will be 1x2 market, for tennis: 12 market. The complete list of possible markets and their default market can be retrieved using the API resource: markets.index
  • no - display all markets for sport excluding the one market marked as a default (default value)
sort_typexsd:string

Determines sort order of data. Possible values:

  • competition - betting markets are sorted by the name of the competition
  • start_date - betting markets are sorted by the start_date (default value)
sort_orderxsd:string

Additional parameter for sort_type which determines the direction of sorting (ascending, descending)
Possible values:

  • asc - sort ascending
  • desc - sort descending (default value)
market_idsxsd:stringList of market identifiers separated by a comma (e.g. 123,234,321). Possibility to input multiple identifiers, separated by comma.

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

betting_offer_statusxsd:string

Determines status of betting offer. Possible values:

  • active - the odds are published and users can make bets. Defaut value for new betting market
  • suspended - the users can't bet on the market (e.g when team received the red card)
  • closed - the market is closed and no further bets will be taken
  • removed - the market is removed and no further bets will be taken
  • resulted - final status of the market, all outcomes for betting market have results
    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

    ...

    LinkDescription
    https://api.softnetsportstatscore.com/v2/betting-offers/9812.xml?token={{YOUR_TOKEN}}Returns a list of all betting offers for the customer in XML format
    https://api.softnetsportstatscore.com/v2/betting-offers/9812?token={{YOUR_TOKEN}}Returns a list of all betting offers for the customer in JSON format
    https://api.softnetsportstatscore.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.softnetsportstatscore.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_marketsoffers
    ..betting_marketoffer
    idIdentifier of the betting marketoffer
    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 markets 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 marketoffer
    • suspended - the users can't bet on the market the betting offer (e.g when team received the red card)
    • closed - the market the betting offer is closed and no further bets will be taken
    • resulted cancelled - all outcomes for betting market have resultsremoved - the market is removed and no further bets will be takenthe 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)
    • removed cancelled - outcome is removed, user can't make betscancelled
    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 betting markets 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

    ...

    Code Block
    languagexml
    <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>

    FAQ

    For each example below you should use resource https://api.softnetsport.com/v2/betting-offers/987?token={{YOUR_TOKEN}} and described query parameters

    ...

    • is_live_market=no

    ...

    • is_live_market=yes

    ...

    • date_from=2015-03-01
    • date_to=2015-03-02
    • sport_id=5

    ...

    • is_live_market=yes
    • sport_id=5

    ...

    • is_live_market=no
    • sport_id=5

    ...

    How do you retrieve a list of prematch odds for soccer eg. England only?

    ...

    • sport_id=5
    • area_id=5
    • is_live_market=no

    ...

    How do you retrieve a list of prematch odds for a single event?

    ...

    • object_type=event
    • object_id=12345
    • is_live_market=no

    ...

    • object_type=event
    • object_id=12345
    • is_live_market=yes

    ...

    How do you retrieve a list of odds related to a single season?

    ...

    • object_type=season
    • object_id=7891

    ...

    How do you retrieve a list of all outrights odds related to a single season?

    ...

    • object_type=season
    • object_id=7891
    • market_type_id=15

    ...

    • ut=1289009099

    ...

    How do you retrieve a list of betting markets having all resulted outcomes?

    ...

    • betting_market_status=resulted

    ...

    • resulted_outcomes=yes

    ...