Integration Docs
Everything you need to embed Solex games into your casino platform — Prediction Markets and TraderHero.
Swagger API
Interactive REST API reference.
Markets Demo
Live Prediction Markets demo.
TraderHero Demo
Live TraderHero jackpot demo.
Prediction Markets — PostMessage Reference
| Message | Direction | Description |
|---|---|---|
| CASINO_INIT | Host → Iframe | Initialize session: casinoId, apiKey, jwt?, user{id,displayName,avatarUrl?,walletAddress?}, balance{available,reserved,currency,currencySymbol}, theme, geo?, language?, config?{maxBetAmount?,casinoFeePercent?,showMyBets?} |
| CASINO_BALANCE_UPDATE | Host → Iframe | Update player balance: available, reserved?, currency?, currencySymbol? |
| CASINO_THEME_UPDATE | Host → Iframe | Change CSS variables for white-label theming: cssVariables (ThemeOverrides) |
| CASINO_BANNER_UPDATE | Host → Iframe | Set image or HTML banner: BannerConfig fields (position, type, content) |
| CASINO_AD_SLOTS_UPDATE | Host → Iframe | Inject inline ad cards into the feed: slots (AdSlot[]) |
| CASINO_NAVIGATE | Host → Iframe | Route the iframe to a specific in-game path: route |
| CASINO_GEO_UPDATE | Host → Iframe | Update player geo (ISO country code) without re-init: geo |
| CASINO_SESSION_REFRESH | Host → Iframe | Pass new JWT token for re-authentication: jwt |
| CASINO_BET_RESPONSE | Host → Iframe | Approve or reject a bet request (requestId required): authorized, transactionId?, newBalance?{available,reserved?}, rejectionReason? |
| CASINO_CASHOUT_RESPONSE | Host → Iframe | Approve or reject a cash-out request (requestId required): authorized, transactionId?, newBalance?{available,reserved?}, rejectionReason? |
| CASINO_BETS_UPDATE | Host → Iframe | Sync the player's recent-bets list: bets (Array<{id,marketTitle,outcome,amount,status,payout,timestamp}>) |
| SOLX_READY | Iframe → Host | Iframe loaded and ready for messages (empty payload) |
| SOLX_BET_REQUEST | Iframe → Host | Player wants to place a bet (requestId required): marketId, marketTitle, outcome (YES|NO), amount, currentOdds, currency? |
| SOLX_BET_CONFIRMED | Iframe → Host | Bet confirmed by backend: betId, marketId, outcome, amount, shares, newOdds{yesPrice,noPrice}, transactionId?, newBalance?, currency? |
| SOLX_BET_FAILED | Iframe → Host | Bet failed: marketId, reason, amount, message?, balance?, currency? |
| SOLX_PAYOUT_DUE | Iframe → Host | Market resolved, winnings ready for payout: marketId, marketTitle, outcome, amount, userId |
| SOLX_RESIZE | Iframe → Host | Iframe height changed: height, mode ('bounded' | 'content') |
| SOLX_NAVIGATION | Iframe → Host | Iframe-driven navigation event: route |
| SOLX_AUTH_REQUIRED | Iframe → Host | JWT authentication needed to continue: reason, message? |
| SOLX_CASHOUT_REQUEST | Iframe → Host | Player initiates cash-out on an active bet (requestId required): betId, marketId, marketTitle, cashOutAmount, currency? |
| SOLX_CASHOUT_CONFIRMED | Iframe → Host | Cash-out succeeded: betId, netCredit, fee, transactionId, newBetStatus |
| SOLX_CASHOUT_FAILED | Iframe → Host | Cash-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.
| Message | Direction | Description |
|---|---|---|
| jackpot_balance_response | Host → Iframe | Send/confirm balance (on load, after debit/credit) |
| jackpot_settings | Host → Iframe | Configure RTP (50–99) for the game session |
| jackpot_theme_update | Host → Iframe | Apply CSS variables for white-label theming |
| jackpot_banner_update | Host → Iframe | Set banner ads (bottom/left/right, image or HTML) |
| jackpot_balance_request | Iframe → Host | Request current balance (sent on iframe load) |
| jackpot_balance_deduct | Iframe → Host | Deduct bet amount from player balance |
| jackpot_balance_credit | Iframe → Host | Credit payout to player balance |