GetEvents push - Saba-sports/OddsDirectAPI GitHub Wiki

This API is to get event information and including some market information.

  • Subscribing to updates and retrieving data in one request via this API.

Request

GET  /sports/stream/{version}/GetEvents?query=$filter=sporttype eq 1&includeMarkets=$filter=bettype eq 128&language=cs
Accept: text/event-stream
Accept-Encoding: br, gzip, deflate(If Header is available)
Parameter Description
query Specific the query parameters for using odata query format.
Default return top 250, return 50 to 250 pens each time, use $skip command when should need other data,please refer to Odata-Query
from Specific the start date of the data. It can be inputted separately.
The date time string format should be like: "2021-01-01T00:00:00", encodable
until Specific the end date of the data. It can be inputted separately.
The date time string format should be like: "2021-01-01T00:00:00", encodable
language Specific the language of the response content
includeMarkets Specify whether it is necessary to return the market information.
If the parameter of includeMarkets does not include in the query parameters, market information will be responded by default.
includeMarkets = $filter=bettype eq 128; Market information is returned with conditions specified by parameters.
includeMarkets = none; Market information is not returned.
token Get the JWT token through /login or /refreshToken

Response

id: string\r\n
data: {
    "status": int,
    "message":string,
    "payload": {
        "events":{
            "add": Event[],
            "change":EventChange[],
            "remove":[eventId1,eventId2...]
        },
        "markets": {
            "add": Market[],
            "change":MarketChange[],
            "remove":[marketId1,marketId2...]
        }   
    }
}\r\n\r\n
Name Format Description
id string Specifies the serial number of Server Sent Event
data json

Data object

Name Format Description
status int Specifies the status code of the response.
message string Specifies the message of the status.
payload object

Payload object

Name Format Description
evnets object Specifies the information of events.
markets object Specifies the information of markets.
Events object
Name Format Description
add Event array Specifies the event information which be added.
- Event class please reference GetEvents response.
change EventChange array Specifies the event information which be updated.
- EventChange class please reference EventChange.
remove int array Specifies the identified of the event which be removed.
Markets object
Name Format Description
add Market array Specifies the market information which be added.
- Market class please reference GetMarkets response.
change MarketChange array Specifies the market information which be updated.
- MarketChange class please reference MarketChange.
remove int array Specifies the identified of the market which be removed.
⚠️ **GitHub.com Fallback** ⚠️