Custom Frontend Overview
You can build your own prediction markets UI instead of embedding our widget. Your frontend calls the platform API directly for events, markets, odds, and bets, and you own every pixel.
These pages cover the frontend only. Your backend integration is the Standalone integration, unchanged.
What stays the same
Steps 1 to 3 of the Standalone Quick Start apply unchanged. Implement them first:
| Step | What you build | Reference |
|---|---|---|
| 1 | The three wallet endpoints on your server | Wallet Endpoints |
| 2 | HMAC signature verification on all three | Wallet Endpoints |
| 3 | The session endpoint and the auth endpoint | Authentication Flow |
Step 4 of that guide embeds the widget in an iFrame. A custom frontend replaces that step. The rest of this branch describes what you build instead.
Base URLs
Both URLs use the predictions hostname your account manager assigns you. It is the same hostname that serves the widget.
| Surface | URL |
|---|---|
| REST | https://<your predictions host>/api/v1 |
| WebSocket | wss://<your predictions host>/ws/connection/websocket |
Take both from your own configuration. Never derive the WebSocket URL from window.location:
your page is served from your own domain, and the path does not exist there.
Call the REST API
Call https://<your predictions host>/api/v1 from the browser with the platform JWT in the
Authorization header. Routing those calls through your own backend instead is supported, and it
keeps the platform JWT off the browser.
The WebSocket is browser-only either way. It connects to the platform directly, which is why origin registration is mandatory.
Register your origins
Give your account manager every origin your frontend is served from. Onboarding writes them to the REST allowlist and to the WebSocket allowlist.
Registration is mandatory. An unregistered origin fails the WebSocket handshake with a 403.
Send the exact origin string, including the scheme and the port. The match is exact:
https://app.example.com does not admit http://app.example.com, and it does not admit
https://app.example.com:8443.
Read the rest in this order
- Authentication turns an operator session into a platform JWT.
- Events & Markets lists what a bettor can bet on.
- Placing Bets covers odds, payout, placement, and settlement.
- Real-Time Odds subscribes to live price changes.
- Security & Limitations lists what you must not do, and the platform behavior to design around.