Skip to main content
This page describes the core entities in the Prediction Markets API and how they relate. All field names below come from build/metadata-api/openapi.json.

High-Level Model

Events group one or more markets. Each market has onchain accounts (mints and a ledger), and produces orderbook and trade data. The API does not expose a dedicated “Order” schema; order intent is represented in the orderbook payloads.

Example (Red Sox vs Yankees)

Event: “Will the Boston Red Sox win the World Series?”
Market: A single YES/NO market under that event.
Orderbook: The current bid/ask ladders for that market.
Trade: Executed trades for that market ticker.
In practice:
  • You discover the event and its markets.
  • You look up market accounts (yes/no mints, ledger).
  • You pull orderbook and trade history by market ticker or mint.

Trading Flow (Spot → Outcome Token)

The Trade API /order endpoint can trade from any spot token to a prediction market outcome token. The transaction always routes through the settlement mint as an intermediate step:
  1. Input Token → Settlement Mint
  2. Settlement Mint → Outcome Token
The /order response returns a single transaction that executes both swaps.

Market Initialization Behavior

The Trading API automatically detects whether the market is initialized:
  • Initialized markets: the two-step swap path executes directly.
  • Uninitialized markets: the transaction includes on-demand market tokenization before executing the swap path.
On-demand market tokenization incurs a small fee, which is included in the transaction when trading into an uninitialized market.

Checking Initialization Status (Optional)

You can check isInitialized in the market response from the Markets API, but you do not need to do this ahead of time—the Trading API handles it automatically.

Entity Reference

Event (SingleEventResponse)

FieldTypeNotes
tickerstringEvent ticker
seriesTickerstringSeries identifier
titlestringEvent title
subtitlestringEvent subtitle
competitionstring | nullCompetition name
competitionScopestring | nullScope of competition
imageUrlstring | nullImage URL
liquidityinteger | nullAggregate liquidity
openInterestinteger | nullAggregate open interest
volumeinteger | nullTotal volume
volume24hinteger | null24h volume
strikeDateinteger | nullUnix timestamp
strikePeriodstring | nullStrike period label
settlementSourcesarray | nullSettlement sources
marketsarray | nullArray of markets (if included)
SettlementSource fields:
FieldTypeNotes
namestringSource name
urlstringSource URL

Market (SingleMarketResponse)

FieldTypeNotes
tickerstringMarket ticker
eventTickerstringParent event ticker
marketTypestringMarket type
titlestringMarket title
subtitlestringMarket subtitle
yesSubTitlestringYES outcome label
noSubTitlestringNO outcome label
openTimeintegerUnix timestamp
closeTimeintegerUnix timestamp
expirationTimeintegerUnix timestamp
statusstringMarket status
resultstringResolution outcome
volumeintegerMarket volume
openInterestintegerMarket open interest
canCloseEarlybooleanEarly close enabled
earlyCloseConditionstring | nullEarly close condition
rulesPrimarystringPrimary rules
rulesSecondarystring | nullSecondary rules
yesBidstring | nullBest bid (YES)
yesAskstring | nullBest ask (YES)
noBidstring | nullBest bid (NO)
noAskstring | nullBest ask (NO)
accountsobjectMap of account info
MarketAccountInfo fields:
FieldTypeNotes
marketLedgerstringMarket ledger mint
yesMintstringYES outcome mint
noMintstringNO outcome mint
isInitializedbooleanAccount initialized
redemptionStatusstring | nullRedemption state
scalarOutcomePctinteger | nullScalar outcome %

Trade (SingleTradeResponse)

FieldTypeNotes
tradeIdstringTrade identifier
tickerstringMarket ticker
priceintegerPrice (0-10000 scale)
countintegerQuantity
yesPriceintegerYES price
noPriceintegerNO price
yesPriceDollarsstringYES price in dollars
noPriceDollarsstringNO price in dollars
takerSidestringBuyer/seller side
createdTimeintegerUnix timestamp

Orderbook

Orderbook responses include a sequence number and bid ladders for YES and NO. Each ladder is a map of price strings (4‑decimal probability) to size integers.
FieldTypeNotes
sequenceintegerMonotonic sequence id
yes_bidsobjectMap of price → size
no_bidsobjectMap of price → size
Example:
{
  "no_bids": {
    "0.0100": 2892941,
    "0.0200": 9478,
    "0.0300": 349205
  },
  "sequence": 4169465,
  "yes_bids": {}
}
Use:
  • GET /api/v1/orderbook/{market_ticker}
  • GET /api/v1/orderbook/by-mint/{mint_address}
See the endpoint docs: