Odds Feed Ingestion API
- 1 Overview
- 2 URLs
- 3 Use Cases
- 3.1 Authorization
- 3.2 Source Fixtures
- 3.3 Source Markets
- 3.4 Swagger
- 4 FAQ
Overview
Odds Feed Ingestion API is a push API allowing customers to integrate Fixtures and Odds Feed data with Genius Sports. Inserting data into our system allows us to match the equivalent data of both parties.
URLs
Use Cases
Authorization
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:
{
"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.
The Odds Feed Ingestion API includes an endpoint for heartbeats (https://explorer.api.geniussports.com/OddsFeed-Ingestion/v1/Production/public/index.html#tag/SourceHeartbeat ). While it is not obligatory to use, it is a useful feature to have. The absence of heartbeats will not automatically invalidate markets, even if heartbeats are integrated. If you also have our Betvision product integrated this feature will ensure that BetVision displays accurate prices and markets that are not suspended.
Please consult Swagger for more information on this.
Source Fixtures
Sending new fixtures
A new fixture is created using the ‘SourceFixtures’ POST endpoint.
The endpoint expects three mandatory parameters:
SourceId - provided by Genius Sports
SourceFixtureId - 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 - Genius 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
SourceFixtureId must be unique across one source.
Updating an existing fixture
Updating an existing fixture must happen in cases where there has been a significant change to it. For instance:
start time has changed
competitors have changed
sportId was wrong and the correct one is sent
etc.
Making an update is no different than creating a new fixture in term of what request should be made to the API. The last request will overwrite the previous one’s data.
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.
You would want to 'Delete' a fixture if it is not relevant anymore. For instance:
The event has ended
The event has been cancelled
etc.
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.
This will return the 'Raw' data that has been integrated, before any processing (e.g. matching) is done.
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.
The endpoint expects three mandatory parameters:
sourceId - unique customer id provided by Genius Sports
sourceMarketId - this is the source market Id (provided the integrating team)
Body of the request, with the following mandatory fields:
sourceFixtureId - the event id provided by the integrating team.
name - name of the market (e.g. 'Money Line')
isHandicap - indicates whether this is a handicap market or not
selections, with the following mandatory fields:
id - this is the source id of the selection.
name - the source name of the selection (e.g. ‘Over', ‘Under’, ‘Home competitor name’, ‘Away competitor name', 'Draw’, etc.)
price
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’.
This is done using the SourceMarkets POST endpoint passing:
sourceId
sourceMarketId
Request Body
where isSuspended is true
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 main use case for invalidating a market is when it has been permanently closed for the event. This differs from the suspended state, which indicates that the punter temporarily cannot place bets on that market.
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.
To make this change the user should use the SourceMarkets POST endpoint passing:
sourceId
sourceMarketId
Body
where the selections' isSuspended parameter is set to ‘true’
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:
Swagger UI