HZ Scripts

Markets & odds

Markets

A fixture can carry several markets, grouped under a market selector like a real sportsbook. The rule: every market declares the data it needs to settle; if the active source can't supply it, that market is never created — the app never offers a bet it can't pay out.

MarketOutcomesUsed for
Match result (1x2)Home / Draw / Awayfootball (has draws)
Winner (winner)Home / Awaybasketball, baseball, hockey, NFL, UFC, tennis…
Over / Under (ou, ou25)Over / Under a linetotals (goals / points / runs)
Both teams to score (btts)Yes / Nofootball
Anytime scorer (scorer)one selection per playerfootball (admin-curated)
Custom (custom)your own outcomesRP events

The multi-winner scorer market

The Buteur market is special: more than one selection can win. Every player who scores wins at their own fixed odds. The admin creates it from the admin screen (one player per line with a price), players can back several scorers, and at settlement the admin ticks everyone who scored — each backer is paid at their locked odds. It renders as a vertical Betclic-style player list.


Odds models

Pick the model per event (auto-sources default to live).

Live — Betclic-style locked odds

The displayed odds are priced live from the betting pool (so they move and look realistic), but each bet locks the odds shown at that moment and is paid stake × locked odds at settlement.

  • A winning bet always pays more than the stake (floored at MinDecimal, 1.01).
  • The player sees an exact, locked potential gain immediately — like a real bookmaker.
  • The house carries the risk, bounded by the exposure cap (below).

Parimutuel — house never loses

All stakes for an event go into a pool; the house skims the vig; winners split the rest in proportion to their winning stake.

  • The house can never lose — total paid is always the pool minus the margin.
  • Odds self-balance and drift until the deadline, so the payout is an estimate (clearly flagged, and computed the same way the server will settle, so the slip never over-promises).
  • On a heavy favourite a winning bet can return less than the stake — that is how pool betting (PMU-style) works. Use live if you want guaranteed winning > stake.

Fixed

Pre-set decimal odds, locked at bet time (payout = stake × odds). Best for hand-made RP events where you set the price yourself.


House exposure cap

Config.Bet.MaxPayoutPerSelection = 1000000

With live / fixed odds the house owes the payouts. This cap is the safety lever: a bet that would push the house's total potential payout on one outcome past it is refused (err.cap). It also naturally restricts high-odds (riskier) outcomes more than favourites. Combined with Config.Odds.MaxDecimal (the per-bet ceiling), it bounds the house's worst case.

Money is bulletproof. Settlement is idempotent and ledger-guarded (no double payouts across a crash, race or double-click), parimutuel settles from the actual wager rows (the house can never lose to a cache glitch), failed credits are retried not lost, and offline winners are paid on next login. The whole money path was hardened by a full adversarial audit.