Skip to content

Markets

A market is the object the protocol attaches to: a question that resolves, with an id, a price, a status and an oracle.

type DenpaMarket = {
id: string
provider: "polymarket" | "kalshi" | "manual" | "mock"
title: string
yesPrice?: number
noPrice?: number
volume?: number
status: "open" | "closed" | "resolved" | "unknown"
url?: string
updatedAt: string
}
ProviderIdsWhere it appears
Polymarketnumeric Gamma ids (559652)denpa.ai surfaces (web is Polymarket-only)
Kalshitickers (kalshi-KXOSCARS-27)the protocol feed /api/v1/signals/external (~80% of music_culture), Kalshi forks
Limitlesslmt- idsBASETV
manual / customfork-definedany fork that needs its own questions

Price history comes from the CLOB prices-history endpoint with clobTokenIds[0] as the token id — never from the Gamma listing.

  • Do not hard-code provider assumptions into generic components. A fork must be able to use custom or manual markets.
  • A market can exist without wallet trading.
  • Fill surfaces with upcoming markets only. closed=false is not enough — check endDate too.
  • Always provide a mock or stub fallback when the live market count is 0.