
Outcome's markets by category, with live odds. Every row opens outcome.xyz in a new tab.
What you need
@outcome.xyz/hip41.3.0 or later.- A frontend that runs JavaScript. The example uses plain TypeScript and Vite.
- Mainnet. The SDK targets testnet unless you pass
{ testnet: false }, and Outcome’s markets are on mainnet. - No API key and no backend. The data comes from Hyperliquid’s public API, called from the visitor’s browser.
How it works
hip4.events.fetchMarkets()returns every live HIP-4 market with the coins of both sides. ShowparsedName: for a template market such astemplate:priceTouchit’s the readable name, “BTC touches 90000 by Nov 1, 00:00 UTC”.- Keep Outcome’s markets: their
raw.venueis"out". Other deployers publish on Hyperliquid too, and outcome.xyz doesn’t open their markets. Skip markets that have already expired. A recurring market’sexpiryis in the past, but it stays in the catalog until it settles. - Show a question as one card with its options, such as a match with Arsenal, Draw and Leeds United. Show every other market as a card of its own.
- Price each side with
hip4.client.fetchAllMids(). A side’s mid price is its implied probability. A side with no mid price yet shows a dash, notNaN%. - Give each card a category, and link it to outcome.xyz.
Categories
outcome.xyz files every event under one category. Apply the same rules, in this order:Links to outcome.xyz
- Use
allas the category of an uncategorized event. - Add
utm_sourcewith your brand andutm_medium=referral. outcome.xyz records them on a visitor’s first visit. - Open links in a new tab with
target="_blank"andrel="noopener".
Run the example
The example is in the SDK repository, inexamples/web-showcase.
http://localhost:5173. Before you ship, replace acme-games in src/markets.ts with your brand.
Before you go live
- Hyperliquid allows 1,200 request weight per minute per IP. The requests run in each visitor’s browser, so every visitor has their own budget. One refresh weighs 84, and the example refreshes once a minute. If you fetch on a server instead, cache the result, because all your traffic then shares one IP.
- If a refresh fails, keep showing the last result.
- Outcome isn’t available in some jurisdictions. See Risks, and promote markets only where your users can trade them.
Next steps
- Showcase markets code
- Full trading integration, to let users trade on your site