Prediction Hunt API

Price History

Historical OHLC price data from TimescaleDB. Gaps in flat markets are forward-filled at the query layer.

GET/v2/prices/history

Query Parameters

platformstringRequired

Platform identifier (required).

market_idstringRequired

Platform-native market ID (required).

fromstring

Start timestamp (ISO 8601). Default: 7 days ago.

tostring

End timestamp (ISO 8601). Default: now.

intervalstring

Candle size: 1m | 5m | 15m | 1h | 1d. Default: 1h.

Response Schema

market_idstring

Platform-native market ID.

platformstring

Platform identifier.

intervalstring

Candle interval used.

candlesobject[]

OHLC candle data ordered by timestamp ascending.

timestampstring

Candle start time (ISO 8601).

opennumber

Opening price of the interval.

highnumber

Highest price during the interval.

lownumber

Lowest price during the interval.

closenumber

Closing price of the interval.

yes_bidnumber

Last YES bid price in the interval.

yes_asknumber

Last YES ask price in the interval.

midnumber

Midpoint of yes_bid and yes_ask.

volumeinteger

Total volume during the interval.

dollar_volumenumber

Total dollar volume during the interval.

Authentication

API Key

To secure your requests, we strongly recommend passing your API key via the X-API-Key header. This prevents sensitive keys from being exposed in access logs or browser history.

Request HeaderX-API-Key: pmx_test_5e8f...

Rate Limits

API rate limits are enforced based on the tier associated with your API key. Limits are tracked on two dimensions: requests per second and requests per month. Only successful responses (where success is true) count toward your monthly quota.

Current usage is returned in every API response via the following headers:

Response HeadersX-RateLimit-Limit-Second: 10X-RateLimit-Remaining-Second: 9X-RateLimit-Limit-Month: 1000X-RateLimit-Remaining-Month: 842

If you exceed a rate limit, the API returns a 429 status with a Retry-After header indicating when you can resume.

Request

Live API Key

Demo Mode
Verified

Parameters

PlatformRequired
Market IDRequired
From
To
Interval

Response

Enter an API key and click "Try it now" to see the live response data.