Skip to content

Market Data Overview

All market data on Openfish is open to everyone. No API key, no authentication, no wallet required. Data is served from the CLOB server on port 3002 and the Gamma API server.

ServiceBase URLDescription
CLOB Serverhttps://api.openfish.fun (port 3002)Prices, order books, WebSocket feeds
Gamma APIhttps://gamma.openfish.funEvents, markets, metadata, search

Openfish structures prediction market data around two primary entities:

  • Event — A top-level question or topic (e.g., “Will Bitcoin reach $100k by year end?”). An event groups one or more markets.
  • Market — An individual tradable binary outcome within an event. Each market maps to a pair of CLOB token IDs, a condition ID, and a market address.
TypeExample
Single-market event”Will BTC hit $100k?” — one market (Yes/No)
Multi-market event”Who will win the election?” — separate markets per candidate

Each market carries outcomes and outcomePrices arrays in a one-to-one correspondence. Prices reflect implied probabilities:

{
"outcomes": ["Yes", "No"],
"outcomePrices": ["0.35", "0.65"]
}

Here, the market prices in a 35% chance of Yes.

EndpointDescription
GET /eventsList events with filtering and pagination
GET /events/{id}Get a single event by ID
GET /marketsList markets with filtering and pagination
GET /markets/{id}Get a single market by ID
GET /public-searchSearch across events and markets
GET /tagsList ranked tags and categories
GET /sportsSports metadata
EndpointDescription
GET /priceCurrent price for a single token
GET /pricesPrices for multiple tokens
GET /bookFull order book for a token
GET /prices-historyHistorical price series for a token
GET /midpointMidpoint price for a token
GET /spreadCurrent spread for a token
EndpointDescription
GET /ws/marketReal-time order book and trade events
GET /ws/userAuthenticated order and trade updates
GET /ws/rtdsReal-time price data streaming
GET /ws/sportsLive sports score updates
EndpointDescription
GET /ws/commentsReal-time comment stream for events

Pull the five highest-volume active events:

Terminal window
curl "https://gamma.openfish.fun/events?active=true&closed=false&order=volume_24hr&ascending=false&limit=5"

Grab the order book for a specific token:

Terminal window
curl "https://api.openfish.fun/book?token_id=71321045679252212594626385532706912750332728571942532289631379312455583992563"
use openfish_client_sdk::GammaClient;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let gamma = GammaClient::new("https://gamma.openfish.fun");
// Fetch active events sorted by 24h volume
let events = gamma
.events()
.active(true)
.closed(false)
.order("volume_24hr")
.limit(10)
.send()
.await?;
for event in &events {
println!("{}: {} markets", event.title, event.markets.len());
for market in &event.markets {
println!(" {} -- {:?}", market.question, market.outcome_prices);
}
}
Ok(())
}