Skip to content

World Cup Topic

The World Cup topic endpoint powers openfish.me/world-cup.html and integrations that need a tournament or match view instead of a flat market list. It groups Openfish World Cup markets by game, date, and market section.

GET https://api.openfish.me/browse/topics/world-cup/games

No authentication is required.

ParameterTypeDescription
sectionstringOptional comma-separated section filter, such as winner, total, or spread. Use all or omit it for every section.
eventSlugstringOptional game/event slug filter, for example fifwc-team-a-team-b-2026-06-11.
localestringOptional display locale. Supports en, zh, ja, ko, fr, es and aliases such as zh-CN, ja-JP, fr-FR.

The response is a topic document:

FieldDescription
topicTopic metadata including slug, title, source, and updatedAt.
localizationLocale metadata including normalized locale, source, fallback locale, and fallback counts.
summaryAggregate event, market, live-market, volume, and 24h volume counts.
datesDate rollups for rendering schedule navigation.
eventsGames with eventSlug, startTime, status, rollups, and grouped sections.
priceStreamWebSocket subscription metadata for all outcome token IDs in the topic payload.

Each market appears under:

events[].sections[].markets[]

Each outcome token ID appears under:

events[].sections[].markets[].outcomes[].tokenId

Use conditionId for market-level REST queries and tokenId for order books, prices, orders, and WebSocket subscriptions.

The endpoint supports API-level display localization:

Terminal window
curl "https://api.openfish.me/browse/topics/world-cup/games?locale=zh"
curl "https://api.openfish.me/browse/topics/world-cup/games?locale=ja&section=winner"

Localized fields are display-only. The endpoint may add canonical fields alongside localized fields:

Localized fieldCanonical companion
topic.titletopic.canonicalTitle
events[].titleevents[].canonicalTitle
events[].homeTeamDisplayevents[].homeTeam
events[].awayTeamDisplayevents[].awayTeam
sections[].titlesections[].canonicalTitle
markets[].questionTextmarkets[].canonicalQuestionText
outcomes[].labeloutcomes[].canonicalLabel

Machine fields remain language-neutral across locales:

  • conditionId
  • polyConditionId
  • tokenId
  • eventSlug
  • section.key
  • status
  • prices and order-book fields
  • priceStream

Localization is best-effort and layered:

  • clob_markets.translations is used first when a market already has translated question/outcome text.
  • World Cup deterministic renderers localize match titles, tournament team names, section titles, fixed outcome labels, and common match-result questions.
  • Any unsupported custom text falls back to canonical English and is counted in localization.fallbackCounts.

The topic endpoint is optimized for page discovery and initial render:

  • It reads mv_world_cup_games_topic when available and falls back to Gamma topic metadata if the materialized view is unavailable.
  • It applies current in-memory CLOB best bid/ask while building the response.
  • The final topic response is cached for 300 seconds per section and eventSlug filter.

Do not treat embedded price, bestBid, and bestAsk values as a real-time feed. For near-real-time prices, extract token IDs and subscribe to /ws/market, or query /price, /prices, /book, or /books at request time.

The response includes priceStream metadata:

{
"type": "websocket",
"endpoint": "/ws/market",
"publicEndpoint": "wss://api.openfish.me/ws/market",
"assetIdField": "events[].sections[].markets[].outcomes[].tokenId",
"subscribeTemplate": {
"type": "subscribe",
"assets_ids": ["<tokenId>"],
"level": 2,
"initial_dump": false
}
}

Recommended flow:

  1. Fetch /browse/topics/world-cup/games.
  2. Extract all tokenId values from outcomes you render.
  3. Open wss://api.openfish.me/ws/market.
  4. Send one or more subscribe messages with level: 2.
  5. Apply price_change, best_bid_ask, and last_trade_price events to the rendered outcomes.

Request level: 3 with initial_dump: true only when you need one initial full order book snapshot before applying deltas.

Fetch all World Cup games:

Terminal window
curl "https://api.openfish.me/browse/topics/world-cup/games"

Fetch localized display text:

Terminal window
curl "https://api.openfish.me/browse/topics/world-cup/games?locale=zh"

Fetch match-winner markets only:

Terminal window
curl "https://api.openfish.me/browse/topics/world-cup/games?section=winner"

Fetch a single game:

Terminal window
curl "https://api.openfish.me/browse/topics/world-cup/games?eventSlug=fifwc-team-a-team-b-2026-06-11"