trading-feed.index [draft]

Resource information

URLhttps://api.statscore.com/v2/trading-feed
MethodGET

Description

Returns all important messages for trading purposes including following message types:
betstops, outcome results, rollbacks, betting offers cancels

  • bet_stop
  • outcome_result
  • betting_offer_rollback
Cache0 seconds
Authorization requiredYes

Method parameters

NameTypeDescription
There are no method parameters in this resource 


Query parameters

NameTypeDescription
tokenxsd:stringREQUIRED. More information concerning authorization in API introduction section
pagexsd:intDetermines offset of paginated data. Default value is 1 which means first page.
limitxsd:int

Determines maximum number of returned records on page. Used in paginated data. Default value is 500

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

timestampxsd:unix_timestamp

Selection date, format UNIX_TIMESTAMP. Only messages that occurred or were updated after this timestamp will be returned.

By default (if no parameter given) incidents from last 24 hours.

timestamp_toxsd:unix_timestampSelection date, format UNIX_TIMESTAMP. Only messages that occurred before this timestamp will be returned.
sport_idxsd:intIdentifier of the sport. Allows incidents for the selected sport to be filtered
typexsd:string

Determines type of message

  • bet_stop
  • outcome_result
  • betting_offer_rollback
object_idxsd:int

REQUIRED if you set object_type attribute! Identifier of the object depends on object type, e.g. if you choose an event as an object_type you should use event identificator.

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_typexsd:string

Possible object type:

  • season - for betting offers related to the season e.g: Premiership 2015/2016
  • event - for betting offer related to the event e.g: Real Madryt - Barcelona
betting_offer_idxsd:intIdentifier of the betting_offer

Method calling examples

Link
Description
https://api.statscore.com/v2/trading-feed.xml?token={{YOUR_TOKEN}}Returns all important messages for trading purposes from the last 24 hours in XML format
https://api.statscore.com/v2/trading-feed?token={{YOUR_TOKEN}}Returns all important messages for trading purposes from the last 24 hours in JSON format

https://api.statscore.com/v2/trading-feed.xml?token={{YOUR_TOKEN}}&sport_id=1

Returns all important messages for trading purposes from the last 24 hours for basketball events

Output elements

.trading-feed
idUnique identifier for the message
type

Possible value:

  • bet_stop
  • outcome_result
  • betting_offer_rollback
sourceInternal attribute, please dont use this attribute
utInformation about the date and time of when the message was created. Format UNIX_TIMESTAMP.
..data
...bet_stopnode available only if message type is bet_stop
object_idIdentifier of the object depends on object type, e.g. if you choose an event as an object_type you should use event identificator

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_type

Possible object type:

  • season - for betting offers related to the season e.g: Premiership 2015/2016
  • event - for betting offer related to the event e.g: Real Madryt - Barcelona
action

Describes type of operation. For this message type, action attribute always has create value

betting_offer_ids

List of betting offers identifiers separated by a comma (e.g. 123,234,321). Possibility to input multiple identifiers, separated by comma.

If empty value ALL betting offers for specified object_id should be suspended or closed.

betting_offer_status

The betting offers specified in betting_offer_ids attribute can receive following values:

  • 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
...outcome_resultnode available only if message type is outcome_result
idIdentifier of the outcome
betting_offer_idIdentifier of the betting_offer related with this outcome. The complete list of possible betting_offer can be retrieved using the API resource: betting-offers.index
action

Describes type of operation for the outcome result. Possible values:

  • insert - when result of outcome is known
  • update - when a previously sent result of outcome contains error and need to be updated
resultDescribe result of the outcome. Possible 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.

wrong_message_idIdentifier for the message which contains incorrect information. Available only when action attribute is update. For action insert it's empty value
...betting_offer_rollbacknode available only if message type is betting_offer_rollback
idIdentifier of the betting offer
action

Describes type of operation for the event. Possible values:

  • insert - new betting_offer_cancel offer generated
  • update - betting offer was updated

    Rollback_bet_cancelis sent when a previous bet cancel should be undone (if possible). This may happen, for example, if a Betradar operator mistakenly cancels the wrong market (resulting in a bet cancel being sent) during the game; before realizing the mistake.

object_type

Possible object type:

  • season - for betting offers related to the season e.g: Premiership 2015/2016
  • event - for betting offer related to the event e.g: Real Madryt - Barcelona
object_idIdentifier of the object depends on object type, e.g. if you choose an event as an object_type you should use event identificator

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
start_date

If specified it means a start date from which all bets made should be cancelled.

Possible empty value
end_date

If specified it means an end date to which all bets made should be cancelled.

Possible empty value