Skip to main content
GET
/
api
/
{exchange}
/
fetchOHLCV
import pmxt

# API key optional — enables faster catalog-backed lookups
exchange = pmxt.Polymarket(
    pmxt_api_key="YOUR_PMXT_API_KEY",
)
result = exchange.fetch_ohlcv(
    id="12345",
    resolution="1h",
    start="value",
    end="value",
    limit=10,
)
{
  "success": true,
  "error": {
    "message": "<string>"
  },
  "data": [
    {
      "timestamp": 123,
      "open": 123,
      "high": 123,
      "low": 123,
      "close": 123,
      "volume": 123
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://pmxt.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

More data with an API key — Without an API key, OHLCV is limited to Polymarket’s native API: short history windows, no volume, and venue-specific rate limits. With a PMXT API key you get volume, 1+ years of history, and normalized candles across venues. Kalshi, Limitless, and more are coming soon. Get your API key.

Use cases

Get hourly candles for a market

import pmxt

# Pass pmxt_api_key for volume data and deeper history
api = pmxt.Polymarket()
market = api.fetch_market(slug="will-alexandria-ocasio-cortez-win-the-2028-us-presidential-election")

candles = api.fetch_ohlcv(market.yes, resolution="1h", limit=100)
for c in candles:
    print(f"{c.open:.2f}  {c.high:.2f}  {c.low:.2f}  {c.close:.2f}  V:{c.volume}")

Path Parameters

exchange
enum<string>
required

The prediction market exchange to target.

Available options:
polymarket,
kalshi,
kalshi-demo,
limitless,
probable,
baozi,
myriad,
opinion

Query Parameters

id
string
required
resolution
string

Required for candle aggregation

start
string<date-time>

Start of the time range

end
string<date-time>

End of the time range

limit
number

Maximum number of results to return

Response

200 - application/json

Fetch OHLCV response

success
boolean
Example:

true

error
object
data
object[]