Prediction markets API

The markets of one prediction event, and the part each plays

Every market that prices one prediction event, each labelled moneyline, spread, total, threshold and so on, with its line and its trading figures.

GET/api/external/prediction/prediction-event-markets/{id}

What it returns

One row per market of the event, ranked by sort_by, each with its role in the event (e.g. MONEYLINE, SPREAD, TOTAL, THRESHOLD_BUCKET), the line or threshold it is about, and the market's own trading figures. eventShape says what kind of event it is (e.g. SPORTS_MATCH, FED_DECISION, ELECTION). The id is an event id from prediction-events, or a market's eventId. Page with offset: there is no total, so a page shorter than limit is the last one. An unknown id, like an offset past the end, answers an empty items and a null eventShape.

Chains

This endpoint is not tied to a chain: it takes no chain in its request.

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/prediction/prediction-event-markets/<id>"
Parameters
ParameterDescription
sort_by

query · string · optional

Which figure to rank markets by. Defaults to 24h volume.volumeUsd24hliquidityUsdtrendingScore24hopenInterestUsdcreatedAt
sort_type

query · string · optional

Sort direction. Defaults to descending.ASCDESC
limit

query · integer · optional

How many rows to return. Defaults to 25; this endpoint caps it at 100.
offset

query · integer · optional

0-based row offset, for paging. At most 1000000.
id

path · string · required

A prediction-market event id (groups one or more markets, e.g. a multi-candidate election) — not a token mint or contract address, and not scoped to any chain this API otherwise supports.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of The markets of one prediction event, and the part each plays
FieldTypeDescription
eventShapestring | nullWhat kind of event this is, e.g. SPORTS_MATCH, ELECTION, PRICE_THRESHOLD, FED_DECISION, BINARY. An open set. Null when items is empty.
itemsobject[]
items[].rolestring | nullThe part this market plays in the event, e.g. MONEYLINE, MONEYLINE_OUTCOME, SPREAD, TOTAL, PROP, THRESHOLD_BUCKET, DATE_BUCKET. An open set.
items[].sortKeynumber | nullThe market's place among the event's markets of the same role, 0 first (e.g. the smallest line). Rows are ranked by sort_by, not by this.
items[].segmentobject | nullThe stat the market is about, e.g. a points spread. Null when the market is not split by a stat.
items[].segment.typestring | nulle.g. STAT.
items[].segment.statstring | nulle.g. POINTS.
items[].segment.valuenumber | nullThe line, e.g. 13.5 for a 13.5-point spread.
items[].thresholdobject | nullFor a market about a figure crossing a level, e.g. a rate change of at least 25 bps. Null otherwise.
items[].threshold.metricstring | nulle.g. RATE_CHANGE_BPS.
items[].threshold.operatorstring | nulle.g. ABOVE, BELOW, EXACTLY.
items[].threshold.valuenumber | nullThe level, in the metric's own unit (e.g. -50 for a 50 bps cut).
items[].marketobject
items[].market.idstring | nullThe market id, as prediction-market takes it.
items[].market.eventIdstring | null
items[].market.eventLabelstring | nullThe event's headline.
items[].market.protocolstring | nullThe venue, e.g. POLYMARKET or KALSHI.
items[].market.statusstring | nullOne of OPEN, SUSPENDED, RESOLVED, CANCELLED, PENDING.
items[].market.questionstring | nullThe market's own question.
items[].market.labelstring | nullA short label for the market within its event. Often null.
items[].market.networkIdnumber | nullThe settlement network id (e.g. 137). Null for a venue that settles off-chain.
items[].market.opensAtnumber | nullUnix seconds.
items[].market.closesAtnumber | nullUnix seconds trading closes.
items[].market.categoriesstring[] | null
items[].market.outcome0object
items[].market.outcome0.idstring | nullThe outcome id — pass to prediction-outcome-order-book.
items[].market.outcome0.labelstring | nulle.g. Yes.
items[].market.outcome0.lastPriceUsdnumber | nullThe outcome's last traded price, USD (0 to 1 for a binary market).
items[].market.outcome0.liquidityUsdnumber | nullLiquidity backing this outcome, USD.
items[].market.outcome1object
items[].market.outcome1.idstring | nullThe outcome id — pass to prediction-outcome-order-book.
items[].market.outcome1.labelstring | nulle.g. Yes.
items[].market.outcome1.lastPriceUsdnumber | nullThe outcome's last traded price, USD (0 to 1 for a binary market).
items[].market.outcome1.liquidityUsdnumber | nullLiquidity backing this outcome, USD.
items[].market.liquidityUsdnumber | nullNull on venues that do not report it.
items[].market.volumeUsd24hnumber | null
items[].market.trades24hnumber | null
items[].market.uniqueTraders24hnumber | nullNull on venues that do not report it.
items[].market.trendingScore24hnumber | null

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key