---
title: "Predictions API Reference | Narwhal API"
description: "Kalshi and Polymarket odds by topic and event: market shapes, history, venues and the WebSocket stream."
url: "https://narwhalapi.com/docs/api/predictions"
---

# Predictions API reference

Read prediction probabilities by topic and event, with history, venue details, and streaming updates.

Narwhal returns probabilities only: no official figures and no prices of its own. [See the Predictions product page for an overview.](https://narwhalapi.com/api/predictions.md)

## Endpoints

The base URL is `https://api.narwhalapi.com`. Send `Authorization: Bearer $NARWHAL_API_KEY`. Each MCP tool name matches its operation id.

| Operation id | Method and path |
| --- | --- |
| `predictions_list_topics` | `GET /v1/predictions/topics` |
| `predictions_get_topic` | `GET /v1/predictions/topics/{topic_id}` |
| `predictions_list_events` | `GET /v1/predictions/events` |
| `predictions_get_scalar` | `GET /v1/predictions/scalar/{event_id}` |
| `predictions_get_extreme` | `GET /v1/predictions/extreme/{event_id}` |
| `predictions_get_timing` | `GET /v1/predictions/timing/{event_id}` |
| `predictions_get_binary` | `GET /v1/predictions/binary/{event_id}` |
| `predictions_get_scalar_history` | `GET /v1/predictions/scalar/{event_id}/history` |
| `predictions_get_extreme_history` | `GET /v1/predictions/extreme/{event_id}/history` |
| `predictions_get_timing_history` | `GET /v1/predictions/timing/{event_id}/history` |
| `predictions_get_binary_history` | `GET /v1/predictions/binary/{event_id}/history` |
| `predictions_get_policy_path` | `GET /v1/predictions/policy-paths/{authority}` |
| `predictions_get_policy_path_history` | `GET /v1/predictions/policy-paths/{authority}/history` |
| WebSocket | `/v1/predictions/stream` |

Example request

```
curl --request GET \
  --url "https://api.narwhalapi.com/v1/predictions/scalar/usa-cpi-yoy-2026-09" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
```

Decimals are strings. Probabilities use four decimal places, such as `"0.8250"`. Timestamps are UTC with `Z`, in whole seconds.

Fields with no value are omitted, with four exceptions: scalar outcome bounds `lower` and `upper` use null for an open tail, result market `value` is null when the venue gives none, topic `ended` is null while the topic is live, and `next_cursor` is null on the last page. List fields are always present, with `[]` when empty.

## Topics and events

List topics, then request a topic by `topic_id` to read the topic and its events. Topic ids include `usa-cpi-yoy`, `usa-fed`, and `xau-monthly-extreme`.

| Parameter | Rule |
| --- | --- |
| `group` | Optional on the topic list: `central_banks`, `us_prices`, `us_jobs`, `us_activity`, `global_activity`, `global_prices`, `metals`, `energy`, `rates`, or `fx`. |
| `include_ended` | Optional on the topic list: `true` also lists topics that have ended. They are left out by default. A request for an ended topic by its id still answers. |
| `topic`, `release_id` | Optional filters on the event list. |
| `status` | Optional filter on the event list: `upcoming`, `trading`, `closed`, `settled` or `void`. `open` is not a value. |
| `shape` | Optional filter on the event list: `scalar`, `extreme`, `timing`, `binary`, `categorical` or `set`. |
| `from`, `to` | Optional UTC time filters on `resolves_at` in the event list. `from` must be before `to`. |
| `limit`, `cursor` | Optional on the event list. `limit` is 1–100, default 50. The response includes `next_cursor`; pass it as `cursor` to read the next page. It is `null` on the last page. |

### Topic fields

A topic has `topic_id`, `commodity_key`, `benchmark`, `group`, `title`, `shape`, `unit`, `unit_key`, `price_currency`, `venues`, `resolution_kind`, `calendar`, `ended` and `next_event_id`. `commodity_key`, `benchmark`, `unit`, `unit_key`, `price_currency`, `calendar` and `next_event_id` are sent only when set. `ended` is always sent: the day the topic ended (`YYYY-MM-DD`), or `null` while it is live. The topic detail omits `next_event_id`.

`venues` lists venue ids such as `["kalshi","polymarket"]`. `resolution_kind` is `release`, `price_fix`, `price_window`, or `occurrence`. `calendar` is sent only when set and contains `country` and `family`. `commodity_key` names the commodity a price topic follows, such as `gold`. `benchmark` is sent only where the topic names one, such as `wti` for crude oil. `price_currency` is the currency of the topic's price.

### List and topic rows

Event list rows have `event_id`, `question`, `status`, `closes_at`, `resolves_at`, `topic_id` and `shape`, plus `commodity_key` and `benchmark` for a topic that follows a commodity price, `release_id` and a compact `result` when set. They carry no `as_of`, `stale`, `unit` or `venues`. The `events` list in a topic detail has the same rows without `topic_id`, `shape`, `commodity_key` and `benchmark`: the upcoming and trading events, then the 5 most recent others.

### Event fields

Every event shape uses these fields. Shape-specific fields appear directly on the event. Event pages carry no `shape`; the path identifies it. List rows carry `shape`.

| Field | Contents |
| --- | --- |
| `event_id`, `topic_id`, `question` | The event id, topic id, and question. |
| `status` | `upcoming`, `trading`, `closed`, `settled`, or `void`. |
| `closes_at`, `resolves_at`, `as_of` | Closing, resolution, and capture times. |
| `release_id` | A public calendar release id, left out when it has no value. |
| `resolution`, `resolves_with` | `resolution` is a text description. `resolves_with` is a separate field, sent only when set. |
| `unit`, `venues` | The event unit and venue market records described below. |
| `unit_key` | `unit_key` is the unit in one standard spelling, such as troy_ounce, barrel or tonne; `unit` keeps the source's wording. When a price is quoted in cents, `price_scale` is 0.01: multiply the price by it to get the amount in `currency`. |
| `commodity_key`, `benchmark`, `price_currency` | Sent only when set. `commodity_key` and `benchmark` come from the topic. `price_currency` is the currency of the event's price, sent when `unit` names one, as `usd_per_barrel` does. |
| `stale` | Sent on `upcoming`, `trading` and `closed` events; omitted on `settled` and `void` events. For `upcoming` and `trading` events, it is true when the last venue check was more than 3 minutes ago or the stored snapshot was already stale. For those events, after more than 30 minutes without a venue check, if no check is recorded, or if the stored snapshot had no live quotes, probabilities are omitted, every `quotes` list is empty and every venue is excluded. A closed event also sends no probabilities if it had no live quotes when it closed, and is stale only when its stored snapshot was already stale. Treat either stale state as "do not trade on this". |
| `result` | On settled and void events, the venues' results (see Results below). It is omitted until the event is `settled` or `void`. |

## Odds by market shape

Request the event through its shape path. Scalar, extreme, timing, and binary requests accept an optional `at` for a past captured minute in UTC.

The following bodies are illustrative. Values are made up.

### Scalar

Each outcome has `key`, `label`, `lower`, `upper`, `probability`, and `quotes`. `median`, `p10` and `p90` use the upper bound of the row where cumulative probability reaches 50/10/90%, respectively. For an open top tail, the value is the row's lower bound and the field name appears in `above` (for example, `["p90"]`). `above` is always present, with `[]` when no field is in the open top tail. `median`, `p10` and `p90` are omitted for decisions and when there are no probabilities. A row without a price omits `probability`.

Illustrative scalar body

```
{
  "outcomes": [
    {"key": "le_3.0", "label": "3.0% or lower", "lower": null, "upper": "3.0",
     "probability": "0.8250", "quotes": [
       {"venue": "kalshi", "probability": "0.8250",
        "market_ids": ["KXCPIYOY-26SEP-T3.0"]}
     ]},
    {"key": "gt_3.0_le_3.2", "label": "Above 3.0% to 3.2%", "lower": "3.0", "upper": "3.2",
     "probability": "0.1500", "quotes": [
       {"venue": "kalshi", "probability": "0.1500",
        "market_ids": ["KXCPIYOY-26SEP-T3.0", "KXCPIYOY-26SEP-T3.2"]}
     ]},
    {"key": "gt_3.2", "label": "Above 3.2%", "lower": "3.2", "upper": null,
     "probability": "0.0250", "quotes": [
       {"venue": "kalshi", "probability": "0.0250",
        "market_ids": ["KXCPIYOY-26SEP-T3.2"]}
     ]}
  ],
  "median": "3.0", "p10": "3.0", "p90": "3.2", "above": []
}
```

### Extreme

The `window` has `start` and `end`. Its high and low probabilities appear in `up` and `down` rows with `key`, `level`, `probability`, and `quotes`. `probability` is left out of a row when no venue is blended into it. `observation` is `any_trade`, `close`, or `any_release` (any official figure published in the window).

Illustrative extreme body

```
{
  "window": {"start": "2026-10-01T00:00:00Z", "end": "2026-11-01T00:00:00Z"},
  "observation": "any_trade",
  "up": [{"key": "up:4200", "level": "4200", "probability": "0.3060", "quotes": [
    {"venue": "polymarket", "probability": "0.3060", "market_ids": ["59472725739075996773"]}
  ]}],
  "down": [{"key": "down:3600", "level": "3600", "probability": "0.2000", "quotes": [
    {"venue": "polymarket", "probability": "0.2000", "market_ids": ["38105266318445209131"]}
  ]}]
}
```

### Timing

Each step gives the chance that something has happened by `by`. Steps have `key`, `by`, `kind` (`meeting` for a decision meeting, `date` for the end of that day), `label`, `probability`, and `quotes`; `probability` is left out of a step when no venue is blended into it. The event also includes `not_within_window`.

Illustrative timing body

```
{
  "steps": [
    {"key": "2026-10-28", "by": "2026-10-28T18:00:00Z", "kind": "meeting", "label": "28 Oct 2026 meeting",
     "probability": "0.0035", "quotes": [
       {"venue": "polymarket", "probability": "0.0035", "market_ids": ["44988145651657165705"]}
     ]}
  ],
  "not_within_window": "0.9965"
}
```

### Binary

The event contains `quotes`, and `probability` when a venue is blended into it. `labels` is an object with `yes` and `no` labels, sent only when they differ from Yes and No.

Illustrative binary body

```
{
  "probability": "0.0495",
  "quotes": [
    {"venue": "polymarket", "probability": "0.0495", "market_ids": ["63705498927604542864"]}
  ]
}
```

### Policy path

Request `authority` as `federal-reserve`, `european-central-bank`, `bank-of-england`, `bank-of-japan`, `bank-of-canada`, `reserve-bank-of-australia`, or `bank-indonesia`.

The response contains `as_of` and `meetings`. The policy path returns rate changes in basis points. Today's rate is available from the core data API. Expected changes are calculated from probability-weighted decision rows, with cut 50+ counted as −50 bps and hike 50+ as +50 bps. Cumulative changes sum the expected changes across meetings. The method is documented in the OpenAPI description and MCP tool text.

Illustrative policy path response

```
{
  "as_of": "2026-10-08T12:00:00Z",
  "meetings": [
    {"event_id": "usa-fed-2026-10", "resolves_at": "2026-10-28T18:00:00Z",
     "p_cut": "0.6000", "p_hold": "0.4000", "p_hike": "0.0000",
     "expected_change_bps": "-15.0", "cumulative_change_bps": "-15.0"}
  ]
}
```

## History

Use `/v1/predictions/{shape}/{event_id}/history` for scalar, extreme, timing, and binary events.

| Parameter | Rule |
| --- | --- |
| `interval` | `1m`, `5m`, `1h` (default), or `1d`. `1m` and `5m` bars are kept for 30 days; an older `start` returns `400 invalid_query`, so use `1h` or `1d`. |
| `start`, `end` | Required. UTC times; `end` must be after `start`. The window is at most 2 days for `1m`, 7 days for `5m`, 92 days for `1h`, or 3,660 days for `1d`. |
| `cursor` | Optional string, up to 200 characters. Pass the previous page's `next_cursor` as `cursor` with the same `start`, `end`, and `interval`. |

The response contains `series` and `next_cursor`. Each series has `key`, `active_from`, and `bars`. `active_to` is sent only once the series has ended. Bars contain `timestamp` and `close`. They record closing probabilities per interval. `timestamp` marks the start of the bar, which ends one `interval` later. A bar with `open`, `high` and `low` was captured live. A close-only bar is backfill from one venue, named by `backfill_venue` when set. A page can be empty while `next_cursor` is not null.

Each page holds about 5,000 bars and costs one call. The response includes `next_cursor` (`null` on the last page); pass it as `cursor` with the same `start`, `end`, and `interval` to read the next page. Rolling markets such as WTI, natural gas, and CPI ranges can take many pages. A cursor from another window or a malformed cursor returns `400` `invalid_query`; the MCP history tools accept the same `cursor` and return the same `next_cursor`.

Illustrative history response, one series shown

```
{
  "series": [
    {"key": "le_3.0", "active_from": "2026-10-01T00:00:00Z",
     "bars": [
       {"timestamp": "2026-10-08T11:00:00Z",
        "open": "0.8000", "high": "0.8400", "low": "0.7900", "close": "0.8250"}
     ]}
  ],
  "next_cursor": null
}
```

Policy path history is available at `/v1/predictions/policy-paths/{authority}/history`. `start` and `end` are required, and the window is at most 366 days. It has no `interval`, `cursor` or `next_cursor`. The response has `meeting_dates` and `days`. `meeting_dates` gives `event_id` and `resolves_at` once per meeting. Each entry in `days` has a `date` and `meetings`, with `event_id`, `p_cut`, `p_hold`, `p_hike`, `expected_change_bps` and `cumulative_change_bps` for each meeting.

## Venues and blending

Kalshi and Polymarket venue markets appear in `venues`, one record per venue market found for the question. A venue with a `weight` contributes to the blended probabilities. A venue with an `excluded_reason` is shown for reference and excluded from the blend. Exactly one of these fields is present.

Each `quotes` entry contains `venue`, `probability`, and `market_ids`. Excluded venues still appear in `quotes`; the event's `venues` identify them.

| Venue field | Contents |
| --- | --- |
| `venue` | The venue id. |
| `url`, `rules_url`, `rules_text`, `settlement_source` | The market link, rules link and text, and settlement source. `rules_text` is limited to 2,000 characters. |
| `weight`, `volume_24h_usd`, `open_interest_usd` | The venue's depth share, 24-hour volume, and open interest. |
| `match` | Sent only when there is a difference, with `differences` from the fixed list below and a one-sentence `note`. |
| `excluded_reason` | For the current minute: `stale` (no quote in 3 minutes), `thin` (depth below the topic minimum), or a differences value below. |
| `settlement` | `"settled"` or `"void"`, sent once the venue has settled; absent while pending. The venue's result is in `result`, not here. |

| Difference | Treatment |
| --- | --- |
| `outcome_set` | Rows do not line up one to one. Blend on the shared rows; exclude if fewer than 3 remain. |
| `timing` | Resolves at a different moment; excluded. |
| `source` | Settles on a different source; excluded. |
| `rules` | Uses a different condition; excluded. |

## Results

Settled and void events carry a `result` with each venue's outcome, value, and finality. It is omitted until the event settles. Every account sees it as soon as Narwhal has it.

The compact form in lists is `{final, settled_at}` plus `amended_at` when amended; `settled_at` is omitted until every venue has a result row or is marked `unavailable`, and when no settlement time exists.

| Field | Contents |
| --- | --- |
| `final` | True only when every venue on the event has a final result. A result that is not final can still change. |
| `venues` | One record per venue: `venue` and `markets` (event pages only; lists leave it out). Per-venue `final`, `settled_at` and `amended_at` appear only on events with two or more venues. On a single-venue event, these values equal the event's values. `unavailable` is sent only when true. |
| `outcome`, `value` | Per market in `markets`, with `market_id` (the Kalshi ticker or Polymarket market id). `outcome` is `yes`, `no`, `void`, or `scalar` for Kalshi, and the winning label, `split`, `custom`, or `unresolved` for Polymarket. `value` is a decimal string: Kalshi's YES settlement price (so `no` is `0`) or Polymarket's winning price (`1` for a clean win). Null when the venue gives none. |
| `settled_at` | When the venue settled; at event level, the latest across venues. |
| `amended_at` | When the outcome or value of a final result later changed (a dispute or amendment). Left out if it never changed. |
| `unavailable` | True for a venue that has removed the event's markets and for which Narwhal holds no result. It does not keep `final` from being true. |

If Narwhal cannot read its stored results, it returns the event without `result` and adds the header `X-Narwhal-Results: unavailable`. Retry later. MCP tool results say the same.

The stream and webhooks carry status only. Read the event for its result.

## Freshness

Every venue is read every 60 seconds. REST returns the latest minute with `as_of`. Use `at` to read any captured minute.

Odds are live for every account, including accounts that only use free credit.

The stream and prediction webhooks are open to every account. Each connection and each delivery costs one call. [See the Webhooks API reference for prediction webhooks.](https://narwhalapi.com/docs/api/webhooks.md)

## Stream

Connect to `/v1/predictions/stream` with your API key in the `Authorization: Bearer` header, then send a subscription. Stream tickets (`POST /v1/predictions/stream-ticket`) are for the Narwhal website only; servers and apps always use the key.

Subscription message

```
{"action":"subscribe","topics":["usa-fed"],"event_ids":[]}
```

| Message | Contents or cadence |
| --- | --- |
| `ready` | Sent when the connection opens. Subscribe next. |
| `subscribed` | The matched event ids. |
| `snapshot` | The full event, with `shape` next to it. |
| `update` | The full event except static venue fields: `url`, `rules_url`, `rules_text` and `settlement_source` appear only in `snapshot`. Updates are sent on change, at most once a minute per event, with `shape` next to the event. |
| `status` | An event's new status, as `{"type":"status","event_id":"...","status":"..."}`. |
| `pong` | The reply to `{"action":"ping"}`. |
| `error` | `{"type":"error","code":"..."}`. See the codes below. |
| `rate_limited` | An error code sent when the connection attempt exceeds the short-window rate limit. |
| `heartbeat` | Sent every 30 s as `{"type":"heartbeat"}`, with no timestamp or server clock. |

A connection supports up to 200 events. Reconnecting gives fresh snapshots with no replay. A subscription takes up to 40 `topics` and 200 `event_ids`. A connection accepts up to 30 commands. Error codes: `invalid_command`, `subscribe_required`, `resubscribe_required`, `command_limit`, `slow_consumer`, `stream_limit`, `quota_unavailable`, `insufficient_credits`, `rate_limited`, `revoked`, `unauthorized`, `unavailable`, `shutdown` and `invalid_frame`.

## Errors

Errors use `NarwhalProblem`: `400 invalid_query`, `404 event_not_found` or `503 predictions_unavailable`. [See all errors](https://narwhalapi.com/docs/errors.md)

Requesting an event under the wrong shape, or an unknown topic, returns `404 event_not_found`. The detail gives the right path.

Was this page helpful?
