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}Providers
Section titled “Providers”| Provider | Ids | Where it appears |
|---|---|---|
| Polymarket | numeric Gamma ids (559652) | denpa.ai surfaces (web is Polymarket-only) |
| Kalshi | tickers (kalshi-KXOSCARS-27) | the protocol feed /api/v1/signals/external (~80% of music_culture), Kalshi forks |
| Limitless | lmt- ids | BASETV |
| manual / custom | fork-defined | any 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=falseis not enough — checkendDatetoo. - Always provide a mock or stub fallback when the live market count is 0.