outrights.index [draft]

Resource information

URLhttps://api.statscore.com/v2/outrights
XSD
MethodGET

Description

Returns a list of all betting offers including markets, prematch and live odds depends on which package you have subscribed to

CacheNo
Authorization requiredYes

Method parameters

NameTypeDescription
There are no method parameters in this resource 

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
limitxsd:int

Determines maximum number of returned betting offers on page. Used in paginated data. Default value is 50

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

season_idxsd:int

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

is_live_offerxsd:string

Possible values:

  • yes - display all in-play betting offers
  • no - display all prematch betting offers*


* 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_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
date_fromxsd:stringSelection datetime, format 'yyyy-mm-dd hh:mm:ss'. Date from which betting offers should be returned. If you use a single date_from parameter you will receive all betting offers that start in the 24 hours from requested date
date_toxsd:stringSelection datetime, format 'yyyy-mm-dd hh:mm:ss'. End date of returned betting offers. The maximum period beetwen date_from and date_to parameter is 30 days. 
sport_idxsd:int

Determines the sport identifier related to the betting offers
.
Possibility to input multiple identifiers, separated by comma.

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

area_idxsd:int

Determines the area identifier related to the betting offers
.
Possibility to input multiple identifiers, separated by comma

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

competiton_idxsd:int

Determines the competition identifier related to the betting offers
. Possibility to input multiple identifiers, separated by comma

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

participant_idxsd:int

Determines the participant identifier related to the betting offers or outcomes. Possibility to input multiple identifiers, separated by comma

The complete list of possible participants can be retrieved using the API resource: participants.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 offers are sorted by the name of the competition
  • start_date - betting offers 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 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
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/outrights.xml?token={{YOUR_TOKEN}}Returns a list of all betting offers for the customer in XML format
https://api.statscore.com/v2/outrights?token={{YOUR_TOKEN}}Returns a list of all betting offers for the customer in JSON format
https://api.statscore.com/v2/outrights.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/outrights.xml?token={{YOUR_TOKEN}}&is_live_market=noReturns a list of all prematch betting offers for the customer in XML format

Output elements

.outrights
..season

idUnique identifier for the season. The complete list of possible events can be retrieved using the API resource: seasons.index
nameName of the event e.g: Premiership 2017/2018
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
...betting_offer
idIdentifier of the betting offer
bookmaker_idIdentifier of the bookmaker assigned to you during subscription purchase
is_live_offer

Possible values:

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


* 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
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 offers. 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

<?xml version="1.0" encoding="UTF-8"?>
<outrights>
    <season id="12121" name="World Cup 2016/2017" sport_id="11" area_id="65" competition_id="201">
        <betting_offer id="273462" bookmaker_id="1" is_live_market="no" market_id="201" market_name="Winner" replacer="participant1=Peter Prevc|participant2=Severin Freund|participant3=Maciej Kot|participant4=J. A.Forfang" status="active" display_order="1" start_date="2016-11-24 15:30:00" open_at="2016-10-20 08:17" closed_at="2016-11-22 17:00:00" ut="12345622323">
            <outcomes>
                <outcome id="15001" default_outcome_id="82" name="Peter Prevc" participant_id="958573" status="active" result="" starting_odds="1.35" odds="1.35" probability="0.55" display_order="1" ut="12345622323" />
                <outcome id="15002" default_outcome_id="82" name="Severin Freund" participant_id="957751" status="active" result="" starting_odds="9.00" odds="9.00" probability="0.08" display_order="2" ut="12345622323" />
                <outcome id="15003" default_outcome_id="82" name="Maciej Kot" participant_id="958183" status="active" result="" starting_odds="9.00" odds="9.00" probability="0.08" display_order="3" ut="12345622323" />
                <outcome id="15004" default_outcome_id="82" name="J. A. Forfang" participant_id="957734" status="active" result="" starting_odds="15.00" odds="15.00" probability="0.05" display_order="4" ut="12345622323" />
            </outcomes>
        </betting_offer>
 </season>
</outrights>

FAQ

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


QuestionQuery paremetersNote
1How do you retrieve a list of prematch betting offers including odds?
  • is_live_offer=no

2How do you retrieve a list of live betting offers including odds?
  • is_live_offer=yes

3How do you retrieve a list of betting offers for a selected date for soccer?
  • date_from=2015-03-01
  • date_to=2015-03-02
  • sport_id=5

4How do you retrieve a list of live betting offers for soccer?
  • is_live_offer=yes
  • sport_id=5

5How do you retrieve a list of prematch betting offers for soccer?
  • is_live_offer=no
  • sport_id=5

6

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

  • sport_id=5
  • area_id=5
  • is_live_offer=no

7How do you retrieve a list of live betting offers for a single event?
  • event_id=12345
  • is_live_offer=yes

8How do you retrieve a list of betting offers updated from selected date?
  • ut=1289009099

9How do you retrieve a list of betting offers having resulted a part of outcomes?
  • resulted_outcomes=yes

10How do you retrieve a list of betting offers related to FC Barcelona?
  • participipant_id=4233567