Skip to content

Markets & Events

Openfish organizes predictions with two concepts:

  • A market is one tradable prediction question.
  • An event groups related markets into one browsing and metadata unit.

In the current meme/off-chain deployment, markets and events are application records served by Gamma, CLOB, and Data APIs.


A market is the smallest tradable unit on Openfish. Most markets are binary questions with two outcomes:

Will Bitcoin reach 150,000 by December 2026?
- Yes
- No

Each outcome has a token_id. In this deployment, treat token_id as the API identifier for an outcome in the Openfish CLOB ledger. It is the value used for order books, prices, orders, and positions.

Important identifiers:

IdentifierDescription
condition_idPrimary market identifier used across Openfish services
question_idQuestion identifier retained for compatibility and market derivation workflows
token_idOutcome identifier used by CLOB trading, pricing, balances, and positions
slugHuman-readable URL/API lookup identifier where available

Common market fields:

FieldTypeDescription
condition_idstringPrimary market ID
questionstringDisplay question
descriptionstringLonger market context and rules
clob_token_idsstring[]Outcome IDs used for trading
outcomesstring[]Outcome labels, commonly Yes and No
activeboolWhether the market is active
closedboolWhether the market is closed or resolved
enable_order_bookboolWhether CLOB trading is enabled
neg_riskboolWhether the market is part of a mutually exclusive event set
minimum_tick_sizedecimalMinimum allowed price increment
fee_rate_bpsintegerFee rate in basis points
creator_agentstringAgent address when created by an agent workflow
game_start_timeintegerSports market start timestamp, when applicable

A market can exist in metadata before it is tradable. CLOB trading requires the market to be active and enable_order_book=true.


An event groups one or more markets.

Single-market event:

Event: Will Bitcoin reach 150,000 by December 2026?
Market: Will Bitcoin reach 150,000 by December 2026? (Yes/No)

Multi-market event:

Event: Who will win the 2028 Presidential Election?
Market: Candidate A? (Yes/No)
Market: Candidate B? (Yes/No)
Market: Candidate C? (Yes/No)
Market: Other? (Yes/No)

For mutually exclusive event sets, neg_risk=true can appear on the market. In the current app, this is metadata and pricing context for the CLOB. Users still trade the displayed markets through normal order flow.


Use Gamma for metadata discovery:

Terminal window
curl "https://gamma.openfish.me/markets?active=true&closed=false&limit=10"
curl "https://gamma.openfish.me/events?active=true&closed=false&limit=10"
curl "https://gamma.openfish.me/markets/slug/example-market-slug"

Use CLOB for trading-specific data:

Terminal window
curl "https://api.openfish.me/browse/markets?limit=20"
curl "https://api.openfish.me/tick-size?token_id=YOUR_TOKEN_ID"
curl "https://api.openfish.me/fee-rate?condition_id=YOUR_CONDITION_ID"
curl "https://api.openfish.me/neg-risk?token_id=YOUR_TOKEN_ID"

Use Data API for analytics:

Terminal window
curl "https://data.openfish.me/v1/market-positions?market=0xabc123..."
curl "https://data.openfish.me/oi?market=0xabc123..."
curl "https://data.openfish.me/live-volume?id=123"

Canonical market text is English. Some CLOB browse endpoints can return localized display text when a supported locale parameter is provided.

Example:

Terminal window
curl "https://api.openfish.me/browse/markets?locale=zh&limit=20"

If translated text is unavailable, clients should expect English fallback.

Supported locales are zh, ja, ko, fr, and es. See Localization for fallback rules and fixed outcome label mapping.


Sports markets can include game_start_time. Near game start, the system may cancel open orders and disable trading according to market rules. Schedules can change, so traders should monitor orders close to event start time.


ServiceResponsibility
GammaEvents, markets, metadata, tags, comments
CLOBOrder books, prices, tick sizes, fees, order execution
DataPositions, value, volume, holders, leaderboard

Most integrations should discover markets through Gamma or /browse/markets, then use CLOB endpoints for order placement and live trading data.