This guide helps you move an existing Custom Bet integration from dataProvider: 'uofProxy' to dataProvider: 'stock'. For the target integration model, see Stock Provider. For legacy UOF Proxy behaviour, see UOF Proxy (Deprecated).
uofProxy is deprecated and not offered for new integrations. The stock provider:
getFixture, getMarkets, getAvailableMarkets, calculate, and getProfile.jwt, matchId, and addToBetSlip (plus existing display and theming props).You can decommission UOF proxy routes used only for Custom Bet once migration is complete. Keep UOF feed access if other products still depend on it.
Confirm with Sportradar client setup that your RSA public key is submitted and published for JWT validation (the same onboarding step as other widget JWT integrations). See JWT prerequisites.
Implement a backend endpoint that issues a short-lived JWT for the current user or session, and pass it to the widget as the jwt prop. A JWT is a signed token (see what a JWT is) — not a static API secret. You sign it on your backend with your RSA private key (RS256). See JWT authentication (Stock Provider) for the full flow and signing guidance.
Use the same matchId values and event coverage as today. Coverage rules are unchanged; only the data path changes.
Plan a staging validation on at least one match with custom bet markets before you remove the proxy in production.
This is the main new piece when leaving UOF Proxy.
rsa-public.pem to Sportradar, and wait until client setup confirms the public key is published for your bookmaker — JWT prerequisites.GET /api/custom-bet/jwt).addWidget as jwt.If you already issue JWTs for Live Match Tracker, Virtual Stadium, or Bet Concierge, reuse the same key infrastructure where client setup allows (see JWT prerequisites).
Change dataProvider to 'stock', add jwt, and reduce dataProviderConfig to addToBetSlip only. See Before and after below.
Delete getFixture, getMarkets, getAvailableMarkets, calculate, and getProfile from your page bundle, along with any shared fetch helpers that called your proxy with the UOF API key.
Keep addToBetSlip and your bet slip validation logic. Follow Handling Selections and Odds for odds snapshots and rejection reasons.
Load the widget with a real matchId and JWT. Confirm markets load, selections recalculate, and addToBetSlip succeeds or fails with the correct user-facing reasons.
After all environments use stock, remove proxy routes and credentials that existed only to serve the five UOF callbacks for Custom Bet.
SIR("addWidget", ".sr-widget", "customBet", {
matchId: 123456789,
dataProvider: "uofProxy",
dataProviderConfig: {
getFixture,
getMarkets,
calculate,
getAvailableMarkets,
getProfile,
addToBetSlip,
},
});Each of getFixture, getMarkets, getAvailableMarkets, calculate, and getProfile fetched UOF XML via your proxy and invoked callback(false, xmlString) or a CBError. See UOF Proxy for full examples.
SIR("addWidget", ".sr-widget", "customBet", {
matchId: 123456789,
dataProvider: "stock",
jwt: getCustomBetJwt(), // short-lived token from your backend
dataProviderConfig: {
addToBetSlip,
},
});
function getCustomBetJwt() {
// Request from your server — do not hard-code secrets in the browser.
See Stock Provider — Integration Example for a complete HTML snippet.
CBError from UOF callbacks (types 1–3). Failures such as invalid or expired JWT, missing coverage, or service errors are handled inside the widget and Sportradar services. Test 401/403 by using an expired JWT.addToBetSlip: Contract, UniqueOutcome shape, and displayedOdds semantics are unchanged.| Area | UOF Proxy (uofProxy) | Stock (stock) |
|---|---|---|
dataProvider | 'uofProxy' (also the API default if omitted) | Set explicitly to 'stock' |
jwt | Not used | Required on the widget — JWT authentication |
dataProviderConfig | getFixture, getMarkets, getAvailableMarkets, calculate, getProfile (forward UOF XML from your proxy), plus addToBetSlip | addToBetSlip only — remove the five UOF callbacks; offering and calculation are handled inside the widget via Sportradar custom bet services |
dataProviderConfig.addToBetSlip | Required; you validate and add to bet slip | Same contract — see addToBetSlip |
| UOF proxy / API key on your infra | Required so the five UOF callbacks can reach UOF | Not required for Custom Bet widget traffic |
Display mode, market filters, theming, dbg, timeouts | Supported | Unchanged |