Skip to main content
Logo
Explore APIsContact Us
  • Home
  1. Resources
  2. Virtual Stadium
  3. Flash Bet

Flash Bet

#Overview

Flash Bet presents users with betting markets derived from live match events. Each betting market is displayed for a limited duration (default: 20 seconds, configurable by contacting the Sportradar integration team) as a First-In-First-Out (FIFO) queue. Users can quickly place bets on the presented outcomes, enhancing engagement and the overall betting experience.

  1. The channel must have a Sportradar entity ID configured in the moderation UI, with the desired events selected. Additionally, the match must be upcoming or live to ensure markets and odds are available.
  • How to Add SR Entity ID to Channels
Moderation Sportradar Entity Id
  1. When a match event appears in the chat, a suggested betting market is automatically pushed to the Flash Bet queue and served to users.
warning

Flash Bet is triggered only when the chat is open at the time a match event appears. Opening the chat after the event occurs will not trigger Flash Bet for that event.

#Testing

For testing purposes, you can use the "Test Channel" feature in the Moderation UI to simulate match events and observe Flash Bet behavior.

  • How to Test Channels
Flashbet Demo

#Setup

#1. Enable Flash Bet

To enable Flash Bet within your Virtual Stadium widget, set the enableFlashBet property to true during widget initialization:

enableFlashBet boolean optional

Enables the Flash Bet functionality.

Enable Flash Bet:

javascript
SIR('addWidget', '#sr-vs-widget', 'virtualStadium', {
    enableFlashBet: true,
    // ... other configuration
});

#2. Moderation Setup

For a channel to have Flash Bet functionality, it must have a Sportradar entity id set.

  • How to Add SR Entity ID to Channels
  • Create Channel API

#3. Adapter Registration

Flash Bet requires adapter registration to function properly. See the appropriate adapter type based on your integration needs:

  • Hosted Adapter Registration
  • Custom Adapter Implementation

#4. Handling Flash Bet Actions

When a user clicks on an outcome within the Flash Bet interface, an action is triggered. This action invokes the onAction callback and returns the following data structure:

onAction (type: string, data: object) => void optional

Callback function triggered when specific events occur in the widget.

Parameters:

type string required

Action type: "FlashBetOutcome".

data ExternalOutcome required

Action data containing outcome information (see ExternalOutcome object below).

Handling Flash Bet Actions:

javascript
function onAction(type, data) {
    switch (type) {
        case 'FlashBetOutcome': {
            const { externalEvent, externalOutcome, externalMarket } = data;

            // IMPORTANT: Validate the Flash Bet selection before processing
            // - Check if the event is still active and betting is available
            // - Verify the market and outcome are still valid for betting
            // - Ensure the odds haven't changed significantly since display
            // Recommended: If invalid, show an error message and stop processing

            // IMPORTANT: Handle ID mapping if needed
            // - Map externalEvent.id to your internal event identifier
            // - Map externalMarket.id to your internal market identifier
            // - Map externalOutcome.id to your internal outcome identifier
            // This ensures consistency with your existing betting system

            // IMPORTANT: Get current odds for the selection
            // - Flash Bet displays cached odds that may be outdated
            // - Fetch fresh odds from your odds provider using the mapped IDs
            // - Compare with displayed odds and alert user if significantly different
            // - Use current odds for bet placement to ensure accuracy

            // Process the Flash Bet selection
            // - Add the outcome to the user's betslip with current odds
            // - Handle any bet slip mode logic if applicable
            // - Update user's balance and betslip state

            // Show user feedback
            // - Display success message with bet details
            // - Update UI to reflect the new betslip state

            break;
        }
        default: {
            console.log('Unhandled action type:', type);
        }
    }
}

SIR('addWidget', '#sr-vs-widget', 'virtualStadium', {
    enableFlashBet: true,
    onAction: onAction,
    // ... other configuration
});

#Flash Bet Timer Settings

Flash Bet Timer Settings let you control the timing parameters for flash bets across your organization. These settings determine both how long a flash bet remains visible to users when triggered and the maximum time it will wait if a bet stop occurs.

  • Bet Stop Timeout specifies the duration (in seconds, default 65s) that a flash bet is paused when the market enters a "bet stop" state. During this period, the flash bet remains on hold before closing and moving to the next item in the queue if no update is received. If the market reactivates before the timeout ends, the countdown resumes from where it was paused.
Bet stop timeout
  • Flash bet timer settings (in seconds, default: 20s) define how long a suggested market is displayed to the user in the Flash Bet module. You can set different durations for channels linked to a match or a tournament with a Sportradar Entity ID, allowing you to tailor the user experience based on event type.
Flash bet timer example
info

Important

You can view and request changes to your organization's flash bet settings. Any updates you request will be applied across all brands and operators, ensuring consistent flash bet timing for all users.

To adjust your flash bet settings, please contact our support team. We will review and apply the changes for your organization.


#Data Structures

#ExternalOutcome Object

The ExternalOutcome object contains the data returned when a user selects an outcome in Flash Bet.

#ExternalOutcome Properties

externalEvent Event required

Event information including teams, date, and venue. See Event object for details.

externalOutcome Outcome required

The selected outcome data. See Outcome object for details.

externalMarket Market required

The market containing the outcome. See Market object for details.

type string required

Action type: "FlashBetOutcome".

ExternalOutcome Example:

json
{
  "externalEvent": {
    "id": "sr:match:12345",
    "srEventId": "sr:match:12345",
    "externalId": null
  },
  "externalOutcome": {
    "id": "4",
    "name": "Player A",
    "odds": "6.00",
    "oddsDecimal": 6,
    "status": {
      "isActive": true
    }
  },
  "externalMarket": {
    "id": "202",
    "status": {
      "isActive": true
    },
    "specifier": {
      "value": "setnr=2",
      "displayedValue": "2"
    },
    "name": "2nd set - winner",
    "outcomes": [
      {
        "id": "4",
        "name": "Player A",
        "odds": "6.00",
        "oddsDecimal": 6,
        "status": {
          "isActive": true
        }
      },
      {
        "id": "5",
        "name": "Player B",
        "odds": "1.08",
        "oddsDecimal": 1.08,
        "status": {
          "isActive": true
        }
      }
    ]
  },
  "type": "FlashBetOutcome"
}

#Event Object

Represents a single sporting event (e.g., match, race, or stage).

#Event Properties

id string required

Unique identifier for the event.

srEventId string | number optional

Sportradar event identifier.

externalId string | number | null optional

Your external system identifier for the event.

Event Example:

json
{
  "id": "sr:match:12345",
  "srEventId": "sr:match:12345",
  "externalId": null
}

#Market Object

The Market object represents a betting market within individual bets.

#Market Properties

id string | number required

Unique identifier for the market.

status object optional

Current status of the market. The available statuses are: active, deactivated suspended, settled or canceled.

name string required

Display name of the market (e.g., "Match Winner", "Total Goals").

visualTypeId string | number optional

The visual type identifier for the market.

specifier object optional

Market specifier configuration with value and displayedValue properties.

outcomes Outcome[] required

Array of possible outcomes for this market. See Outcome object for details.

srMarket object optional

Sportradar market information.

odds OddsObject optional

Odds information for the market.

Market Example:

json
{
  "id": "202",
  "status": {
    "status": "active"
  },
  "specifier": {
    "value": "setnr=2",
    "displayedValue": "2"
  },
  "name": "2nd set - winner",
  "outcomes": [
    {
      "id": "4",
      "name": "Player A",
      "odds": "6.00",
      "oddsDecimal": 6,
      "status": {
        "isActive": true
      }
    },
    {
      "id": "5",
      "name": "Player B",
      "odds": "1.08",
      "oddsDecimal": 1.08,
      "status": {
        "isActive": true
      }
    }
  ]
}

#Outcome Object

The Outcome object represents a possible result or selection within a market.

#Outcome Properties

id string | number required

Unique identifier for the outcome.

name string required

Display name of the outcome (e.g., "Team A", "Draw", "Under 2.5").

odds string | number optional

Odds for this outcome.

oddsDecimal number optional

Decimal representation of odds.

status object optional

Current status of the outcome.

Outcome Example:

json
{
  "id": "4",
  "name": "Player A",
  "odds": "6.00",
  "oddsDecimal": 6,
  "status": {
    "isActive": true
  }
}
Last updated 13 days ago
Is this site helpful?
Virtual Stadium, Moderation, Engagement Tools
Copy BetBet Insights
On this page
  • Overview
  • Testing
  • Setup
  • 1. Enable Flash Bet
  • 2. Moderation Setup
  • 3. Adapter Registration
  • 4. Handling Flash Bet Actions
  • Flash Bet Timer Settings
  • Data Structures
  • ExternalOutcome Object
  • Event Object
  • Market Object
  • Outcome Object