Skip to content

List market types

The market rules, keyed by rule, and the event types each runs on. A rule with partner_create: true can be created with POST /api/v1/markets, and lists the fields an entry takes and, per event type, its sport and the stats on offer. Changes only when STX adds a rule or a stat, so read it once and cache it.

GET
/api/v1/types
Status Description Schema
200 Success object
401 No credential, a bad signature or an invalid OAuth access token. Body: {“error”:“Missing or invalid API key credentials”}, or for an OAuth token {“error”:“Missing or invalid OAuth access token”}. Error
403 An OAuth app token without the events scope. The account behind this key is not active, for example it is pending approval or suspended. Body: {“error”:“Your account is suspended. Contact support.”}, the message naming the account’s status. Error

Request:

curl --request GET \
--url 'https://demo.stxapp.io/api/v1/types' \
--header 'Authorization: Bearer <app-access-token>'

Response 200:

{
"home_winner": {
"event_types": [
"baseball_game",
"basketball_game",
"cricket_match",
"football_game",
"hockey_game",
"soccer_game"
],
"partner_create": false
},
"over_under": {
"event_types": [
"baseball_game",
"basketball_game",
"cricket_match",
"football_game",
"hockey_game",
"soccer_game",
"tennis_match"
],
"partner_create": false
},
"player_stat_line": {
"event_types": {
"hockey_game": {
"sport": "Hockey",
"stats": [
{
"name": "Total Assists",
"stat": "ASSISTS"
},
{
"name": "Goals",
"stat": "GOALS"
},
{
"name": "Shots on Goal",
"stat": "GOAL_SO"
},
{
"name": "Total Points",
"stat": "POINTS"
},
{
"name": "Total Saves",
"stat": "SAVES"
}
]
}
},
"fields": {
"line": {
"description": "A positive half line, e.g. 19.5.",
"type": "number"
},
"player_id": {
"description": "A player_id from GET /api/v1/events/{event_id}/players.",
"type": "string"
},
"stat": {
"description": "One of the event type's stats.",
"type": "string"
}
},
"partner_create": true
}
}

player_stat_line: Player stat lines: over/under a player’s stat.

Field Type Description
event_types object The event types it runs on, keyed by event type.
fields object What an entry takes besides rule.
partner_create boolean Always true: POST /api/v1/markets creates them.

Every other key: A rule that cannot be created through the API.

Field Type Description
event_types array The event types it runs on.
partner_create boolean Always false.