Oddin.gg BetPeek documentation
Introduction
Oddin.gg BetPeek is a real-time 3D visualization of live CS2 matches, offering users full control over camera angles and player perspectives in a low latency spectating experience. It is seamlessly integrated with a live betting overlay and betslip. The BetPeek product is an integral part of the Oddin.gg Esports Betting iFrame (Bifrost), and is accessed through a dedicated route within the iFrame.
1. Supported Esports
| Esport | BetPeek |
| Counter-Strike 2* | ✅ |
| Dota 2* | ✅ |
*Duels products are not supported
2. Integration Overview
BetPeek is embedded as a special route within the Bifrost iFrame. To integrate BetPeek, you must:
2.1. Ensure iFrame (Bifrost) Integration
First, you must fully support the Oddin.gg Esports Betting iFrame (Bifrost). This includes meeting all the requirements defined in the Bifrost - Esports Betting iFrame Documentation, such as:
- Authentication (point 1.3. of Bifrost documentation)
- iFrame embedding (point 2. of Bifrost documentation)
- Backend API endpoints (point 3. of Bifrost documentation):
- /userDetails
- /debitUser
- /creditUser
If you are solely an Oddin iFrame client, this step is sufficient to ensure the BetPeek integration. If you are an OTS or Odds Feed client, further steps 2.2. and 2.3. are required to load BetPeek in your web UIs/ web apps.
2.2. Check Match Availability
2.2.1. Concept
Before initializing BetPeek, determine if the selected match supports BetPeek 3D rendering. This is done via a gRPC call to the GetMatchStatus endpoint of the BetPeek (Ghost) service.
We currently provide two different environments – Production and Integration. The Production environment is intended to be used only when you are finished with the integration and ready to go live. Please use the Integration environment for all testing and integration purposes.
2.2.2. Environments
You can find the endpoint for each environment in the following table:
| Environment | API URL |
| Production | api-ghost-grpc.oddin.gg |
| Integration | api-ghost-grpc-integration.oddin.gg |
2.2.3. API Authentication
- IP whitelisting: Access to the API is only allowed from known IP addresses. We maintain a different IP set for each environment. Please send your IP(s) or IP ranges together with the requested environment to your technical integration channel to be whitelisted.
- Access token: You must use an access token to access the Match availability API. You should have obtained this access token for each environment from our back office; if not, please contact us through your direct Oddin.gg communication channels. This token is different from the iFrame brandToken. While invoking the gRPC call, append the access token to the request’s metadata under the key
token.
2.2.4. gRPC API Definition
message MatchInfoRequest {
string match_urn = 1;
}
message MatchInfoResponse {
oneof match_info {
CS2MatchInfoResponse cs2 = 1;
Dota2MatchInfoResponse dota2 = 2;
}
string host = 3;
}
message CS2MatchInfoResponse {
string map_name = 2;
string map_asset_name = 3;
string game_version = 4;
// Specifies the URL for the asset of the match.
string asset_url = 5;
}
message Dota2MatchInfoResponse {
string game_version = 2;
// Specifies the URL for the asset of the match.
string asset_url = 3;
}
message MatchStatusRequest {
string match_urn = 1;
}
enum MatchStatus {
MATCH_STATUS_UNKNOWN = 0;
MATCH_STATUS_AVAILABLE = 1;
MATCH_STATUS_UNAVAILABLE = 2;
}
message MatchStatusResponse {
MatchStatus match_status = 1;
}
service Ghost {
rpc GetMatchInfo(MatchInfoRequest) returns (MatchInfoResponse);
rpc GetMatchStatus(MatchStatusRequest) returns (MatchStatusResponse);
}
If the match is supported, the service will return match status MATCH_STATUS_AVAILABLE in the MatchStatusResponse.
You can safely call this method multiple times. If the match is currently unavailable (i.e., returns MATCH_STATUS_UNAVAILABLE), it does not necessarily mean it will remain so. Availability will be determined as the match approaches its live status or just before it goes live.
The clients for integrating with the BetPeek service are available at https://github.com/oddin-gg/ghostschema.
2.3. Loading BetPeek
Once the match availability is confirmed, load BetPeek via its iFrame route by setting the src attribute of your <iframe> to the encoded BetPeek route.
Example:
<iframe src="<https://your-domain.com/iframe/ghost?route=eyJyb3V0ZSI6Ii9tYXRjaCIsIm1hdGNoSWQiOiJtYXRjaC9vZDptYXRjaDoxNzYyMjkwIn0=>"></iframe>
The route parameter is a base64-encoded JSON string.
Example of a decoded JSON:
{
"route": "/match",
"matchId": "bWF0Y2gvb2Q6bWF0Y2g6MTc2MjI5MA=="
}
"bWF0Y2gvb2Q6bWF0Y2g6MTc2MjI5MA==" ⇒ "match/od:match:1762290"
3. Q&A
3.1. If I have an existing subscription to the Oddin.gg Odds Feed, how will this interact with the feed behind the iFrame?
Client Token and SDK Consumers
- Multiple consumers of the Oddin.gg Odds Feed SDK can operate using the same client token without interfering with each other’s message streams. This ensures message consumption is isolated per consumer.
- Recovery Constraints:
- Only one recovery process can run concurrently per client token. Any attempt to initiate an additional recovery while another is active will result in an error.
- A client must ignore incoming messages during a recovery process if it did not initiate the recovery itself. This behaviour should be aligned with the client during the integration. Each recovery process is associated with a
requestID, allowing clients to determine message ownership and safely ignore unrelated messages.
- Recovery Rate Limits:
- There are strict rate limits on how many recovery requests can be initiated per hour and per day. These limits are currently configured internally by Oddin.gg.
- If additional recovery capacity is required, the configuration must be updated by the Oddin.gg team specifically for your integration.
3.2. Will users and limits be shared between betting activities on my OTS subscription and the Bifrost subscription?
Yes, these will be shared.