API usage - Saba-sports/OddsDirectAPI GitHub Wiki

API Endpoint

  • API Request
    https://{domain name}/{category}/{version}/{method}.

  • URL Description

    • Domain Name:
      • staging:apistaging.wx7777.com
      • production: --
    • version: The API vertsion, such as beta or v1 or more.
    • category:
      The API category that is going to be used, such as sports or betting.
    • method:
      The API method that is going to be used, such as GetEvents.
  • API Response
    The response is in JSON format.


Http Pull

Interactions with the API can pull data and updates.
For example, you make the following call use /GetEvents endpoint

GET /Sports/{version}/GetEvents?query=$filter=sporttype eq 1&includeMarkets=$filter=bettype eq 128&language=cs
Accept: application/json
Accept-Encoding: br, gzip, deflate
Authorization: Bearer {JWT token}

The response will provide the current snapshot of the targeted data:

{
"sports": [{...},{...},{...},{...},{...},{...},{...},{...},{...},{...}],
"leagues": [{...},{...},{...},{...},{...},{...},{...},{...},{...},{...}],
"events": [{...},{...},{...},{...},{...},{...},{...},{...},{...},{...}],
"markets": [{...},{...},{...},{...},{...},{...},{...},{...},{...},{...}],
"outrights": [{...},{...},{...},{...},{...},{...},{...},{...},{...},{...}],
}

HTTP parameters

Parameter Description
query Specific the query parameters for using odata query format
from Specific the start date of the data. It can be inputted separately
until Specific the end date of the data. It can be inputted separately
language Specific the language of the response context
includeMarkets This parameter is only used in /GetEvents to 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.
⚠️ **GitHub.com Fallback** ⚠️