SOLEX

Integration Docs

Everything you need to embed Solex games into your casino platform — Prediction Markets and TraderHero.

Prediction Markets — PostMessage Reference

MessageDirectionDescription
CASINO_INITHost → IframeInitialize session: casinoId, apiKey, jwt?, user{id,displayName,avatarUrl?,walletAddress?}, balance{available,reserved,currency,currencySymbol}, theme, geo?, language?, config?{maxBetAmount?,casinoFeePercent?,showMyBets?}
CASINO_BALANCE_UPDATEHost → IframeUpdate player balance: available, reserved?, currency?, currencySymbol?
CASINO_THEME_UPDATEHost → IframeChange CSS variables for white-label theming: cssVariables (ThemeOverrides)
CASINO_BANNER_UPDATEHost → IframeSet image or HTML banner: BannerConfig fields (position, type, content)
CASINO_AD_SLOTS_UPDATEHost → IframeInject inline ad cards into the feed: slots (AdSlot[])
CASINO_NAVIGATEHost → IframeRoute the iframe to a specific in-game path: route
CASINO_GEO_UPDATEHost → IframeUpdate player geo (ISO country code) without re-init: geo
CASINO_SESSION_REFRESHHost → IframePass new JWT token for re-authentication: jwt
CASINO_BET_RESPONSEHost → IframeApprove or reject a bet request (requestId required): authorized, transactionId?, newBalance?{available,reserved?}, rejectionReason?
CASINO_CASHOUT_RESPONSEHost → IframeApprove or reject a cash-out request (requestId required): authorized, transactionId?, newBalance?{available,reserved?}, rejectionReason?
CASINO_BETS_UPDATEHost → IframeSync the player's recent-bets list: bets (Array<{id,marketTitle,outcome,amount,status,payout,timestamp}>)
SOLX_READYIframe → HostIframe loaded and ready for messages (empty payload)
SOLX_BET_REQUESTIframe → HostPlayer wants to place a bet (requestId required): marketId, marketTitle, outcome (YES|NO), amount, currentOdds, currency?
SOLX_BET_CONFIRMEDIframe → HostBet confirmed by backend: betId, marketId, outcome, amount, shares, newOdds{yesPrice,noPrice}, transactionId?, newBalance?, currency?
SOLX_BET_FAILEDIframe → HostBet failed: marketId, reason, amount, message?, balance?, currency?
SOLX_PAYOUT_DUEIframe → HostMarket resolved, winnings ready for payout: marketId, marketTitle, outcome, amount, userId
SOLX_RESIZEIframe → HostIframe height changed: height, mode ('bounded' | 'content')
SOLX_NAVIGATIONIframe → HostIframe-driven navigation event: route
SOLX_AUTH_REQUIREDIframe → HostJWT authentication needed to continue: reason, message?
SOLX_CASHOUT_REQUESTIframe → HostPlayer initiates cash-out on an active bet (requestId required): betId, marketId, marketTitle, cashOutAmount, currency?
SOLX_CASHOUT_CONFIRMEDIframe → HostCash-out succeeded: betId, netCredit, fee, transactionId, newBetStatus
SOLX_CASHOUT_FAILEDIframe → HostCash-out failed: betId, reason, amount?

TraderHero — PostMessage Protocol

TraderHero uses a separate, non-versioned protocol. Messages are plain objects without the version: "1.0" wrapper.

MessageDirectionDescription
jackpot_balance_responseHost → IframeSend/confirm balance (on load, after debit/credit)
jackpot_settingsHost → IframeConfigure RTP (50–99) for the game session
jackpot_theme_updateHost → IframeApply CSS variables for white-label theming
jackpot_banner_updateHost → IframeSet banner ads (bottom/left/right, image or HTML)
jackpot_balance_requestIframe → HostRequest current balance (sent on iframe load)
jackpot_balance_deductIframe → HostDeduct bet amount from player balance
jackpot_balance_creditIframe → HostCredit payout to player balance