Price history
Price over time for one outcome: OHLC candles built from the live quote stream where TPM has it, otherwise polled snapshots.
When to use it
- Draw a price chart for an outcome.
- Measure how far a price moved over a window.
Get outcome_id from an outcome's id in event detail. Without it you get the leading outcome.
/api/public/v1/events/{slug}/historyAPI key requiredGet price history
source tells you where points come from: TPM's streamed candles (quote_candles), the venue's own price history for markets TPM doesn't stream (venue_history), both (mixed), legacy polls (snapshots) or nothing (none).
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| slug | path | string | Yes | — | Event slug. |
| outcome_id | query | string | No | — | Outcome id from /events/{slug}. Defaults to the leading outcome. |
| hours | query | integer | No | 168 | How far back, in hours. Default 7 days, max 4320 (180 days). |
| interval_minutes | query | integer | No | — | Candle width, 1 to 1440 minutes. Chosen automatically when omitted. |
Request
curl -s 'https://api.thepredictionmarkets.com/api/public/v1/events/democratic-presidential-nominee-2028/history?outcome_id=5c66f06e-dcac-44fa-93af-ba710d2a9ed2&hours=24&interval_minutes=60' \
-H 'X-API-Key: tpm_demo_key_authorized_2026'Response
Example 200 response. Values are illustrative and change over time.
{
"data": {
"event_slug": "democratic-presidential-nominee-2028",
"outcome_id": "5c66f06e-dcac-44fa-93af-ba710d2a9ed2",
"source": "quote_candles",
"interval_minutes": 60,
"points": [
{
"timestamp": "2026-10-21T06:00:00Z",
"probability": 0.16,
"open": 0.15,
"high": 0.16,
"low": 0.15,
"close": 0.16
},
{
"timestamp": "2026-10-21T07:00:00Z",
"probability": 0.16,
"open": 0.16,
"high": 0.17,
"low": 0.16,
"close": 0.16
}
]
}
}Response fields
| Field | Type | Description |
|---|---|---|
| event_slug | string | The event. |
| outcome_id | string | null | The outcome these points belong to. |
| source | string | quote_candles (streamed by TPM), venue_history (the venue's own price history, for markets TPM doesn't stream), mixed (venue history for the older part, streamed candles after), snapshots (legacy polls) or none. |
| interval_minutes | integer | null | Candle width used. |
| points[].timestamp | string | Start of the candle, or time of the snapshot (UTC). |
| points[].probability | number | null | The price at that time (the close, for candles). |
| points[].open, high, low, close | number | null | OHLC for candles. May be null for snapshots. |
Errors
| HTTP | Code | When |
|---|---|---|
| 404 | not_found.event | No event has this slug. |
| 400 | validation.invalid_parameter | hours or interval_minutes is out of range. |
| 401 | auth.missing_key | No X-API-Key header was sent. |
| 401 | auth.invalid_key | The key is wrong or was revoked. |
| 429 | rate_limit.per_second | Too many requests this second. Wait for Retry-After. |
{
"error": {
"code": "not_found.event",
"message": "Event not found",
"request_id": "0f8969a6-0968-4d7c-9cbb-de379e8c19c4"
}
}All codes are listed on the errors page.
Try it
Runs a live request from your browser. Pre-filled with the shared demo key (5 requests per second for everyone); paste your own key for steadier results.
Press Send to run this request.Related
Build with TPM
Get your free API key
One key gives you Kalshi and Polymarket events, prices with freshness, price history, cross-venue gaps and the live quotes WebSocket.