> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Index, Regime, and Calibration APIs

> Market-wide SimpleFunctions Index, regime scans, event calendar, trade ideas, and calibration scorecards.

These endpoints summarise the prediction-market universe rather than a single ticker. Most are public reads — auth is optional but unlocks higher rate limits.

## SimpleFunctions Index

```http theme={null}
GET /api/public/index
GET /api/public/index/history
```

The SimpleFunctions Index aggregates disagreement, geopolitical risk, fiscal stress, monetary policy, and tail-risk signals into a single time series and component breakdown. See [SimpleFunctions Index methodology](/concepts/index-methodology).

```bash theme={null}
curl "https://simplefunctions.dev/api/public/index"
curl "https://simplefunctions.dev/api/public/index/history?days=90"
```

`/history` query params: `days` (default 30, max 365), `theme` (optional sub-component filter).

## Regime

```http theme={null}
GET /api/public/regime/scan
```

Detect current market state changes, flow shifts, and monitor candidates. See [Regime](/concepts/regime).

```bash theme={null}
curl "https://simplefunctions.dev/api/public/regime/scan"
```

`GET /api/public/regime/history` is deprecated and returns `410 Gone`. Regime score is now computed at query time from a static classification prior, so per-ticker regime history is not a meaningful time series. For spread/depth history use:

```bash theme={null}
curl "https://simplefunctions.dev/api/public/market-microstructure-history?ticker=KXRATECUT-26DEC31&days=7"
```

## Calendar

```http theme={null}
GET /api/public/calendar
```

Structured upcoming catalysts — econ releases, FOMC, elections, settlements. Used by `sf calendar` and `sf milestones`.

## Trade ideas

```http theme={null}
GET /api/public/ideas
GET /api/public/ideas/{id}
```

Daily idea pipeline output. See [Idea pipeline](/concepts/idea-pipeline).

## Calibration

```http theme={null}
GET /api/calibration
```

**Auth:** required. `Authorization: Bearer sf_live_...` or browser session.

Returns calibration scorecards — how well prices have predicted realised outcomes over the requested window. Used by `sf calibration` and visible in the dashboard.

**Query parameters**

| Parameter    | Type   | Default  | Notes                                                        |
| ------------ | ------ | -------- | ------------------------------------------------------------ |
| `source`     | string | all      | `kalshi`, `polymarket`, or omit for all venues.              |
| `period`     | string | `30d`    | `7d`, `30d`, `90d`, `all`.                                   |
| `category`   | string | optional | Top-level category filter (`macro`, `geo`, `monetary`, ...). |
| `topic`      | string | optional | Topic-level filter (`fed_rates`, ...).                       |
| `min_volume` | number | optional | Exclude markets below this dollar volume.                    |

The `/api/public/calibration` alias re-exports this `GET` endpoint without auth and is used by external crawlers — it is the same response shape but rate-limited.

```bash theme={null}
curl -H "Authorization: Bearer $SF_API_KEY" \
  "https://simplefunctions.dev/api/calibration?period=90d&min_volume=10000"

# public alias (no auth)
curl "https://simplefunctions.dev/api/public/calibration?period=30d"
```

## Edges

```http theme={null}
GET /api/edges
```

**Auth:** required.

Returns the current set of mispriced edges across the market universe — prices that diverge from SimpleFunctions's model. Used by `sf edges` and the dashboard edge feed.

**Query parameters**

| Parameter     | Type   | Notes                                          |
| ------------- | ------ | ---------------------------------------------- |
| `limit`       | int    | Max edges, default 25.                         |
| `minStrength` | number | Filter by SimpleFunctions edge strength score. |
| `theme`       | string | Restrict to a theme.                           |
| `venue`       | string | `kalshi` \| `polymarket`.                      |

```bash theme={null}
curl -H "Authorization: Bearer $SF_API_KEY" \
  "https://simplefunctions.dev/api/edges?limit=10&minStrength=0.6"
```

## See also

<CardGroup cols={2}>
  <Card title="SimpleFunctions Index methodology" href="/concepts/index-methodology">
    How the index is constructed.
  </Card>

  <Card title="Calibration concept" href="/concepts/regime">
    Regime, calibration, and indicators in context.
  </Card>

  <Card title="Public market data" href="/api-reference/public-market-data">
    Per-market reads under `/api/public/*`.
  </Card>

  <Card title="Snapshots" href="/concepts/snapshots">
    Public HuggingFace exports.
  </Card>
</CardGroup>
