Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Overview
OddsFeed Odds Feed Ingestion API is a push API allowing both external and internal customers to integrate Fixtures and Odds Feed data with OISGenius Sports. The data flow afterwards is the same as for our Pull Infrastructure:
Fixtures and markets gets matched/classified
Data is distributed using:
Internal message broker (CoreRMQ)
OddsFeedAPI (pull API)
URLs
...
Inserting data into our system allows us to match the equivalent data of both parties.
URLs
UAT - uat.oddsfeed.api.geniussports.comUAT
Use Cases
Authorization
As a user I want to be able to make requests to OddsFeed Ingestion API
Step 1:
Auth0 clientId and client secret for the customer are created
Done by SBIT team
Step 2:
API Key is created (by OIS squad)
Step 3:
The customer of the API obtains a valid token using its:
Auth0 clientId
Auth0 secret
Step 4:
Customer can use the API using the obtained token and API Key
Source Fixtures
As a user I want to send a new fixture
A new fixture (event) For authorization customer need to obtain a valid API token using Auth0 clientId, client secret and an API key. To acquire Auth0 clientId, client secret and an API key please contact apikey@geniussports.com.
To obtain a valid token POST call needs to be made to the endpoint https://genius-sports.eu.auth0.com/oauth/token, with the below payload:
Code Block |
---|
{
"client_id": "YOUR_AUTH0_CLIENT_ID",
"client_secret": "YOUR_AUTH0_CLIENT_SECRET",
"audience": "https://api.geniussports.com",
"grant_type": "client_credentials"
} |
Response contains the token in the access_token
field.
Source Fixtures
Sending new fixtures
A new fixture is created using the ‘SourceFixtures’ POST endpoint.
...
SourceId - provided by Genius Sports
SourceFixtureId - this is the source event Id (provided the integrating team)Customer fixture ID
Body of the request, with the following mandatory fields:
name - the name of the event. E.g. ‘Barcelona vs. Real Madrid’
sportId - Can be retrieved from Fixtures API sportsGenius Sports sport ID, this can be obtain from the Fixture API.
startTime - the start date and time of an event
hasInPlay - indicates if the event and its markets/prices are offered In-Play
hasPreMatch - indicates if the event and its markets/prices are offered Pre-Match
...
Expand | ||
---|---|---|
| ||
|
...
Updating an existing fixture
Updating an existing fixture must happen in cases where there has been a significant change to it. For instance:
...
Note |
---|
Please do not change the SourceFixtureId when making updates. |
...
Invalidating existing fixtures
A Fixture can be invalidated using the ‘SourceFixtures' DELETE endpoint. This will not actually delete the fixture, but mark it as 'Unavailable’, so that downstream consumers of this data are aware it is not relevant.
...
The expected parameters are sourceId and sourceFixtureId.
...
Querying what information has been sent for a specific fixture
In case a user of the API is interested what fixtures data has been pushed, he can use the 'SourceFixtures' GET endpoint.
...
The expected parameters are sourceId and sourceFixtureId.
Source Markets
In most cases market updates must be done when the price of any of the selections has changed. The API allows other fields to be changed as well (new selection, handicap boolean, selection name, etc.), but these should be rather fixed and rarely updated.
...
Sending new markets
A new market (event) is sent using the ‘SourceMarkets’ POST endpoint.
...
Handicap Markets
Separate handicap markets should be created for each handicap line.
One market for -0.5/+0.5, one market for -1.5/+1.5, etc.
About handicap markets, It's also important the selections to have the handicap property set
...
Updating market prices
If a price update of an existing market must be made, the POST endpoint should be used. The value that must be changed is the 'price' field, which is part of the selection.
Each selection has its own price, thus you need to make sure to pass the correct selection Id and Name, so that the correct selection price is updated.
...
Suspending a market
In the case where bets are not accepted temporarily for a market, the state of the market can be marked as ‘Suspended'. Once the market is open to accept bets once again, a new update should be made to remove the 'suspended state’.
...
Expand | ||
---|---|---|
| ||
|
...
Invalidating an existing market
In addition to suspending a market, the user can also invalidate it using the ‘SourceMarkets' DELETE endpoint. This will not actually delete the market, but mark it as ‘Unavailable’, so that the downstream consumers of this data are aware its data is not relevant and shouldn’t be used.
...
The expected parameters are sourceId and sourceMarketId.
...
Suspending a selection
There is also the option to suspend only a specific selection in a market, if there’s a good reason for that. Such update should be rather rare, because most time the whole market would be suspended.
...
Expand | ||
---|---|---|
| ||
|
...
Querying what information was sent for a specific market
In case a user of the API is interested what market data has been sent, he can use the 'SourceMarkets' GET endpoint.
...
The expected parameters are sourceId and sourceMarketId.
Swagger
You can find sample calls and and further technical info from the swagger link below:
https://swaggerui.api.geniussports.com/?url=https://explorer.api.geniussports.com/OddsFeed-Ingestion%2Fv1%2FProduction%2Fswagger-latest.yaml
FAQ
Expand | ||
---|---|---|
| ||
|
...