Skip to main content
Logo
Explore APIsContact Us
  • Home
  1. Virtual Stadium
  2. Copying Bets

Copying Bets

Copy betslips shared by other users and use the returned data to populate your own bet slip flow.

#Overview

CentralHubBetShareCopyProvider lets you copy an existing shared bet by its Central Hub message identifier.

When a copy succeeds, you can:

  • populate your own bet slip,
  • update your UI with a success state, and
  • track the copy action in your analytics.

#Usage

kotlin
class BetCopyViewModel : ViewModel(), KoinComponent {

    private val betCopyProvider: CentralHubBetShareCopyProvider = get()

    suspend fun copyBet(betShareMessageId: String) {
        betCopyProvider.copyBetShare(
            betShareMessageId = betShareMessageId,
            onSuccess = {
                // Bet copied successfully.
                // Use the returned data to populate your bet slip.
            },
            onFailure = { error ->
                // Handle error.
            }
        )
    }
}

#Implementation Notes

  • Use the Central Hub message ID for the shared bet you want to copy.
  • Treat copy failures as recoverable because odds, markets, or bet availability may change.
  • Keep your bet slip mapping logic outside the provider so you can adapt SDK payloads to your own betting model.

#Related Topics

  • Bet Sharing - Create and browse shared bets.
  • User Profiles - Show inspiration and copy-related profile metrics.
Last updated 27 days ago
Is this site helpful?
Virtual Stadium, Moderation, Engagement Tools, BET
Comments & ReactionsSocial Features
On this page
  • Overview
  • Usage
  • Implementation Notes
  • Related Topics