---
title: "Probability history for up to five venue markets"
method: GET
path: "/api/prediction-markets/prices-history"
tags: ["public-pm-data"]
---

# Probability history for up to five venue markets

`GET /api/prediction-markets/prices-history`

## Request

- Base URL: `https://api.coinrithm.com`
- URL: `https://api.coinrithm.com/api/prediction-markets/prices-history`
- Auth: none required

Keyless probability history addressed by venue market id rather than
by event: up to five Polymarket CLOB token ids or Kalshi tickers (an
outcome's `tokenId`), or stored-history outcomes of the other
venues. This is the series behind CoinRithm's event charts; for one
outcome of an event, `/event/{source}/{slug}/price-history` is
simpler.

Polymarket and Kalshi series come from the venue. When a venue
request fails, the series is filled from CoinRithm's stored price
snapshots instead and labelled: that market carries
`historySource: "stored_snapshots"` and `asOf`, and the response
carries `freshness: {status: "lagging", reason:
"upstream_unavailable", storedMarkets}` and is cached for at most
30 seconds. Stored snapshots are written when the price changes, so
they are sparser than the venue series. When every venue request
fails and nothing is stored, the answer is 503
`price_history_unavailable` with `Retry-After: 10`. The route also
has an in-flight cap: 503 `temporarily_busy` with `Retry-After: 5`.
A 200 with `markets: []` means the venue answered with no points.

Point times are unix SECONDS for Polymarket and MILLISECONDS for
Kalshi and the stored-history venues; one response never mixes
units. Only the parameters below are accepted; any other returns 400
`unsupported_query_parameter`.

## Query parameters

- `markets` string
- `market` string
- `tokenIds` string
- `source` 'polymarket' | 'kalshi' | 'rothera' | 'limitless' | 'smarkets' | 'manifold' | 'metaculus' | 'predictit' | 'futuur' | 'myriad' | 'forecastex' | 'gemini'
- `interval` '1h' | '6h' | '1d' | '1w' | '1m' | 'max' | '24h' | '7d' | '30d' | 'all'
- `seriesTicker` string
- `eventId` string
- `fidelity` integer
- `startTs` integer
- `endTs` integer

## Response `200`

One series per market with points, live or labelled as stored

- PublicPmPricesHistoryResponse
  - `interval` string, required: The `interval` as sent (default `1w`).
  - `markets` object[], required: One series per requested market that has points; a market with no points is left out.
    - `market` string, required: The requested venue market id (Polymarket CLOB token id or Kalshi ticker).
    - `history` object[], required: Oldest first.
      - `t` integer, required: Unix time. SECONDS for Polymarket; MILLISECONDS for Kalshi and the stored-history venues.
      - `p` number, required: Probability 0..1.
    - `historySource` 'stored_snapshots': Present only when the venue failed and this series comes from CoinRithm's stored price snapshots instead of the live venue history.
    - `asOf` string, date-time: Time of the last stored point; present with `historySource`.
  - `freshness` object: Present only when at least one series is stored, not live. Such a response is cached for at most 30 seconds.
    - `status` 'lagging', required
    - `reason` 'upstream_unavailable', required
    - `storedMarkets` string[], required: The markets served from stored snapshots.

## Other responses

- `400`: Invalid or missing parameters. On a route with a query allowlist, an undocumented query parameter returns `{"error": "unsupported_query_parameter", "message": "Unsupported query parameter: <key>. Supported: <keys>."}`.
- `429`: Per-IP public rate limit exceeded. Honor `Retry-After` when present, otherwise back off; `RateLimit-*` headers report the window.
- `500`: Server error
- `503`: Retryable: `temporarily_busy` (in-flight cap, `Retry-After: 5`) or `price_history_unavailable` (the venue failed for every market and nothing is stored, `Retry-After: 10`).

---

[API](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api.md) · [All operations](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api/llms.txt) · [OpenAPI document](https://skmtc.dev/coinrithm/apis/coinrithm-agent-trading-api/revisions/28fb59f285fe?raw)
