Skip to main content
This cookbook uses the SDK:

Search markets

Contract mapping:

Discovery feed

markets.discover maps to the verified HTTP-backed discovery slice at /api/public/ideas. The CLI command sf discover --quality --json is broader because it also aggregates local CLI sources.

Inspect one market

Contract mapping:
depth: true asks the server to include orderbook levels where available. Contract-info reads run through the configured SimpleFunctions API base URL. By default that is https://simplefunctions.dev; the server then uses DB/cache rows, Kalshi orderbook proxy or credentials, or Polymarket CLOB depending on venue and deployment config.

Candles and K-lines

Contract mapping:
screenCandles() is an SDK helper. It calls market.candles for each ticker/timeframe and ranks movement, range, realized volatility, volume, breakout state, and trend. It is watchlist-first; it does not crawl every venue market from the client.

History

The current endpoint returns the available cached 7-day indicator/regime history. It is read-only.

Direct Agent tool mode

The trace stores a compact summary, not the full market payload.