Event Facts
Sport facts related endpoints
The minimum timestamp for the facts. If not explicitly set it defaults to now.
Considers facts occurring after the from timestamp plus the given
seconds/minutes/hours/days. If not set, defaults to -1 minutes.
The value must be in range [-7d - 7d].
-1mExample: -1mPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Considers facts occurring till the from timestamp plus the given
seconds/minutes/hours/days. If not set, defaults to 0 minutes.
The value must be in range [-7d - 7d].
0mExample: 0mPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Optional filtering of the facts to retrieve. It expects a string adhering to the filtering format, as described in the filtering section.
sport_id:in:sr:sport:1,sr:sport:2Possible values: Number of facts to return.
100Example: 5The location of the page where the request takes place.
inplay_widgetOptional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. id,event_id.
event_id,fact_type,team,minute,timestamp,sport_id,sportPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+event_id,-fact_type.
+event_id,-timestampPossible values: Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/sports/facts HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"event_id": "sr:match:21514503",
"fact_type": "first_set",
"minute": 10,
"sport": null,
"sport_id": null,
"team": "Lazebny, Ruslan",
"timestamp": "2020-07-02T03:00:00Z"
},
{
"event_id": "sr:match:22525889",
"fact_type": "yellow_card",
"minute": 12,
"sport": "Football",
"sport_id": "sr:sport:1",
"team": "Panathinaikos",
"timestamp": "2020-07-02T17:02:00Z"
},
{
"event_id": "sr:match:22525889",
"fact_type": "yellow_card",
"minute": 10,
"sport": "Football",
"sport_id": "sr:sport:1",
"team": "Olympiakos",
"timestamp": "2020-07-02T17:00:00Z"
},
{
"event_id": "sr:match:22527639",
"fact_type": "second_set",
"minute": 20,
"sport": null,
"sport_id": null,
"team": "Lazebny, Ruslan",
"timestamp": "2020-07-02T03:10:00Z"
}
],
"status": "success"
}The minimum timestamp for the facts. If not explicitly set it defaults to now.
Considers facts occurring after the from timestamp plus the given
seconds/minutes/hours/days. If not set, defaults to -1 minutes.
The value must be in range [-7d - 7d].
-1mExample: -1mPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Considers facts occurring till the from timestamp plus the given
seconds/minutes/hours/days. If not set, defaults to 0 minutes.
The value must be in range [-7d - 7d].
0mExample: 0mPattern: ^[+-]?[0-9]+([.][0-9]+)?[smhd]?$Optional filtering of the facts to retrieve. It expects a string adhering to the filtering format, as described in the filtering section.
sport_id:in:sr:sport:1,sr:sport:2Possible values: Number of facts to return.
100Example: 5The user to get recommendations for.
A list of specific facts to get recommendations for.
The number of recommendations to return per fact.
1Example: 5The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
The location of the page where the request takes place.
inplay_widgetOptional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. id,event_id.
event_id,fact_type,team,minute,timestamp,sport_id,sport,market_recommendationsPossible values: The columns to sort the results by. It expects a string adhering to
the ordering format, as described in the ordering section, e.g.
+event_id,-fact_type.
+event_id,-timestampPossible values: Custom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/sports/facts/recommended_markets HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"event_id": "sr:match:22525889",
"fact_type": "yellow_card",
"market_recommendations": [
{
"market_id": null,
"market_type_id": 1
}
],
"minute": 12,
"sport": "Football",
"sport_id": "sr:sport:1",
"team": "Panathinaikos",
"timestamp": "2020-07-02T17:02:00Z"
},
{
"event_id": "sr:match:22525889",
"fact_type": "yellow_card",
"market_recommendations": [
{
"market_id": null,
"market_type_id": 1
}
],
"minute": 10,
"sport": "Football",
"sport_id": "sr:sport:1",
"team": "Olympiakos",
"timestamp": "2020-07-02T17:00:00Z"
}
],
"status": "success"
}Return recommended markets for the provided fact type.
Supported facts
The fact types that are supported are the following:
If an other fact type is provided, a fallback mechanism will be used for the market recommendation picking.
Get recommended markets for a fact
In this example we return recommended markets for the user 123, based on the goal fact that occurred in the event with id sr:match:42948647
$ curl --request GET \
--url 'http://api.vaix.ai/api/sports/facts/goal/recommended_markets?event_id=sr%3Amatch%3A42948647&user=123'
```recommended_markets_of_fact
</div>The fact to get recommended markets for
The minimum timestamp for the facts. If not explicitly set it defaults to now.
The user to get recommendations for.
The event id the fact occured
sr:match:21514503Optional filtering of the markets to retrieve. It expects a string adhering to the filtering format, as described in the filtering section.
How many markets to recommended
1Example: 1The category ranking to be used
prematchPossible values: How many retries to perform in order to fetch the recommended markets. If not set, one try will only be performed.
0Example: 1How many milliseconds to wait until trying to fetch the recommended markets again.
If retries is less than 1, this value will be ignored.
1000Example: 1000If set to :market it will return the whole market, if set to :selection it will return
only the selection. Defaults to :selection
selectionPossible values: The maximum number of times that the same market will be recommended in a row. Notice that this does not affect the total number of times a market is recommended if other markets have been recommended in between. If 0 (the default), then no limit is applied.
0Example: 1The operator to use for querying data. Notice that this is applied only if your account has access to multiple operators. In a different case the assigned operator to your account is used and the value of this field is ignored.
The bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
sub_bookmaker_id parameter.
The sub-bookmaker id to use for querying data. Notice that this is applied only
if your account has access to multiple operators. In a different case
the assigned operator to your account is used and the value of this
field is ignored. Note that this parameter is used together with the
bookmaker_id parameter.
List of event types to consider when generating recommendations. One or more types can be provided. Available options are:
match: Standard matches to be considered.seasonal: Seasonal events to be considered.forced_events: Handpicked events to be considered regardless of their start_time.
match,forced_eventsPossible values: The location of the page where the request takes place.
inplay_widgetCustom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/sports/facts/{fact}/recommended_markets?user=text&event_id=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": {
"market_recommendations": [
{
"market_id": null,
"market_type_id": 1
}
]
},
"status": "success"
}Returns the average of the fact statistics of previous events for the participants of each of the given event_ids.
Comma separated list of event ids whose participants' previous event stats to return.
sr:match:21514503,sr:match:25852926,sr:match:21516115The stats of which team or teams to return, home or away. Defaults to both.
home,awayExample: home,awayPossible values: The number of previous events whose stats to return.
3Example: 3Optional selection of the object fields to retrieve. It expects a comma
separated list of strings, as described in the field selection section,
e.g. event_id,total.
event_id,total,halftime,cards,corner_kicksPossible values: The location of the page where the request takes place.
inplay_widgetCustom client header, the value should be the name of the group the user belongs to
Authentication method to be used, supported values [vaix, iam]. Defaults to vaix
OK
Bad Request
Unauthorized
Forbidden
Not Acceptable
Request Entity Too Large
Unprocessable Entity
Too Early
Internal Server Error
GET /api/sports/participants/stats?event_ids=text HTTP/1.1
Host: api.vaix.ai
Authorization: Bearer YOUR_SECRET_TOKEN
x-vaix-client-id: text
Accept: */*
{
"data": [
{
"away_cards": 1,
"away_corner_kicks": 0,
"away_halftime": 1,
"away_total": 1,
"event_id": "sr:match:22525889",
"home_cards": 1,
"home_corner_kicks": 0,
"home_halftime": 1,
"home_total": 1
}
],
"status": "success"
}Was this helpful?