Read a market page
A market page is four reads. Two are CORS-open and cacheable (/api/network/market/:id, /api/polymarket/market-history); streams, related and live are same-origin — fetch them server-side.
1. Context
Section titled “1. Context”curl https://denpa.ai/api/network/market/559652Returns { market: { id, provider, title, yesPrice, noPrice, volume, status, outcome, endDate, url, updatedAt, resolution } } — resolution is the outcome claim once resolved. This route answers for closed and resolved markets too; the Gamma listing does not. (The same-origin GET /api/m/:id returns the raw page shape: question, description, endDate, resolved, resolutionValue, clobTokenId, volume, liquidity.)
2. Price history
Section titled “2. Price history”curl "https://denpa.ai/api/polymarket/market-history?marketId=559652&interval=24H"# → { history: [{ t, p }] } unix seconds, YES probability 0–1CLOB-backed. Intervals: 1H | 24H | 7D | ALL. For long-running questions use ALL and fit the chart to the real trading range.
3. Bound streams and live operators
Section titled “3. Bound streams and live operators”curl https://denpa.ai/api/m/559652/streams # { streams: [{ handle, url, label, updatedAt }] }curl https://denpa.ai/api/streamers/live # { live, recent } — fallback when nothing is bound4. The rest of the event
Section titled “4. The rest of the event”curl https://denpa.ai/api/m/559652/related # { active, related[] } volume-rankedDiscovery
Section titled “Discovery”curl https://denpa.ai/api/polymarket/featured # heatmap tilescurl "https://denpa.ai/api/polymarket/featured?mode=resolving24h" # next-24h boardcurl "https://denpa.ai/api/polymarket/markets?q=coachella" # universe search (batch + filter; 100/page)Render rules
Section titled “Render rules”- Show a price only when one exists; unknown is
--and the signal blocks are inert. - Every state has a face: loading, empty and error all render
NO SIGNAL. - Key rotating panels by
marketId. - YES is
#3DF23D, NO is#15D6C0on charts.