Skip to main content
The market-detail endpoint returns one market’s complete profile in a single round-trip: live price, top of book and optional 5-level depth, SimpleFunctions indicators, regime label, cross-venue counterpart, attached thesis edges, follow-up nextActions, and canonical URLs. A sibling endpoint returns a 7-day rolling history of that market’s indicators and regime snapshots.

Endpoints

GET /api/public/market/{ticker}
GET /api/public/market/{ticker}/history
Auth: none. Both endpoints are public, cached at the edge.

Identifiers

FormatExampleNotes
Kalshi raw tickerKXFEDDECISION-26DEC10-T0Uppercase + hyphens.
Polymarket conditionId0x5db999fad322cea2918a3681...66-char hex.
Polymarket numeric id12345Decimal id. Accepted but conditionId preferred.
UUIDs from the deprecated external_markets table return 410 Gone so search engines de-index those URLs faster than they would for a 404.

Detail

GET /api/public/market/{ticker}
curl "https://simplefunctions.dev/api/public/market/KXFEDDECISION-26DEC10-T0"

Query parameters

ParamTypeDefaultNotes
depthbooleanfalseWhen true, include 5-level orderbook depth (bidLevels, askLevels).
refreshbooleanfalseForce a fresh regime computation (~LLM cost). Requires Authorization: Bearer sf_live_xxx — otherwise 401.
cv_presetstringdetailCross-venue match preset. Other presets exist; detail is the default.
cv_min_confnumber0.60Min cross-venue match confidence (0–1).
cv_max_dt_daysnumberMax close-time delta (days) for cross-venue match.
nextActionsoffWhen off, omit the nextActions block.
The endpoint streams a single response — there is no pagination. Cache: Cache-Control: public, s-maxage=60, stale-while-revalidate=120.

Response shape

Field reference

FieldTypeNotes
ticker, venue, title, descriptionstringIdentity. description may be empty.
pricenumberCurrent YES probability [0, 1].
bestBid, bestAsk, spreadnumberTop of book and bestAsk - bestBid.
volume, volume24h, openInterestnumberTraded volume / open interest. volume24h is enriched from marketIndicators when the venue API returns 0.
statusstringactive, closed, settled.
closeTimeISO 8601When the market closes.
categorystringKalshi-supplied category. Polymarket markets do not carry one.
liquidityScorehigh | medium | lowCoarse bucket from spread + depth.
slugstringCanonical SEO slug used by /markets/{slug}.
bidLevels, askLevelsArray<{price, size}>5 levels each, only present with depth=true.
edges[]arrayThesis-derived mispricings touching this ticker — see /api-reference/thesis.
indicatorsobject | nullBundle of computed indicators (see below). null if the ticker isn’t yet in the cached set.
crossVenueobject | nullCounterpart on the other venue when SimpleFunctions has matched a pair. null otherwise.
regimeobject | nullAdverse-selection score + label + raw signals. May be re-computed when stale.
pageUrl, apiUrl, inspectUrlstringCanonical absolute URLs for the same market.
fetchedAtISO 8601When this response was assembled.
nextActionsobjectPre-built follow-up URLs (inspect, related). Omit with nextActions=off.

Indicators bundle

Returned in indicators when the ticker is in marketIndicators. All numeric fields are nullable.
FieldMeaning
tauDaysDays to expiry.
iyYes, iyNoImplied annualized yield (%) for each side. Suppressed (set to null) when tauDays < 1 or `IY> 1000%` to prevent display blow-up on intraday markets.
criCliff risk = max(p, 1-p) / min(p, 1-p).
eeExpected edge in cents. eeSource documents the origin (thesis or regime).
lasLiquidity-adjusted spread = spread / mid.
cvrCross-venue ratio.
overroundEvent overround when this ticker is part of a multi-leg event.
rv, vr, iarRealized variance, variance ratio, implied/actual ratio (where available).
adjIyIY adjusted for liquidity and overround.
daysToEvent, expectedVr, residualVrCatalyst proximity and variance fit.
hasThesis, hasOrderbookBooleans — whether SimpleFunctions currently has a thesis edge or a cached orderbook for this ticker.
lastComputedAtWhen the bundle was last refreshed.

Regime block

The regime block reports SimpleFunctions’s adverse-selection scoring (0–1) plus the label maker, taker, or neutral. The cached snapshot is served when fresh (≤15 min old). When stale or when the live spread differs from the cached spread by >50%, the server re-computes on demand and returns fresh: true. With ?refresh=true (auth required), the server always re-computes.

Errors

StatusBodyCause
400{ error: "Invalid ticker" }Empty or under 3 chars.
401{ error: "refresh=true requires API key" }?refresh=true without a Bearer key.
404{ error: "Market not found" }Venue API returned 404/422.
410{ error: "This market ID format is no longer supported" }Legacy UUID — cached for 24h to accelerate de-indexing.
500{ error: "Failed to fetch market", detail: "..." }Upstream venue error.

History

GET /api/public/market/{ticker}/history
7-day rolling window of two parallel time-series for the ticker:
curl "https://simplefunctions.dev/api/public/market/KXFEDDECISION-26DEC10-T0/history"
FieldNotes
windowDaysAlways 7 (server-side).
indicatorHistory[]From marketIndicatorHistory, oldest → newest. Up to 2,000 rows.
regimeHistory[]From marketRegimeSnapshots, oldest → newest. Up to 500 rows.
indicatorCount, regimeCountHow many rows the underlying tables actually hold for this ticker (after limits).
Both arrays are empty for tickers outside the warm-regime cron’s top-500 coverage. Frontends should handle the empty state — most non-top tickers return indicatorHistory: [] and a populated regimeHistory, or vice versa, depending on which cron has touched them. Cache: Cache-Control: s-maxage=600, stale-while-revalidate=1200. Errors return 400 ticker required or 500 history failed.

CLI equivalents

sf inspect <ticker> --json
sf inspect <ticker> --depth --json
sf book <ticker> --json
sf inspect calls /api/agent/inspect/{ticker} for an agent-shaped dossier; sf book hits /api/public/market/{ticker}?depth=true directly.

See also

Indicators

What iy, cri, ee, las, cvr, tauDays mean.

Market regime

Adverse-selection score, label, signal interpretation.

Inspect ticker

Agent-shaped variant: /api/agent/inspect/{ticker}.

Real-time data

Streaming orderbook / candles / trades for the same ticker over WS.