simplefunctions.dev/api/public/*. The public API is for analytical objects and agent workflows. The data API is for fast market data.
Last verified: 2026-05-06.
Base URLs
REST:wss://data.simplefunctions.dev/v1/ws yet. It is the intended canonical data-domain WebSocket name, but current routing can return 426 Upgrade Required. Use wss://app.simplefunctions.dev/ws until the WS route is moved off Vercel or a direct WS CNAME is configured.
Data conventions
Coverage and hydration
The data API is backed by an in-memory market registry plus venue REST fallbacks.
Hydration is exact-ticker only. It is not a general text-search crawler.
REST endpoints
Heartbeat
Markets
Search
Response:
Raw snapshot
[0.01, 0.99] are excluded.
Movers
/v1/movers is powered by in-memory tick/trade samples. After deploy or reconnect, short windows can return count: 0 until samples accumulate.
Orderbook, candles, trades
WebSocket
WebSocket topics
When subscribing to a ticker topic, the server may send initial cached
ticker_info and orderbook frames if available.
Frame shapes
featured:
ticker_info:
orderbook, trade, and candle use the same shapes as the REST examples above, with a top-level type.
Operational notes
- Public REST callers use
https://data.simplefunctions.dev/v1; the edge proxy injects the internal origin token. - Direct origin routes at
https://app.simplefunctions.dev/api/data/v1/*are edge-token gated and return403without the internal token. - Anonymous WebSocket connections are capped per IP.
- The server pings WebSocket clients every 30 seconds and closes stale connections after a failed pong.
- Kalshi and Polymarket are normalized into one ticker namespace, but not all fields are available from both venues.
- A non-empty market response and an empty trades response can both be healthy: trades are process-local recent prints, while market metadata can be hydrated from venue REST.