# Lukka Prediction Markets Price History

> Lukka Prediction Markets Price History is a paid API for AI agents from api.predictionmarketdata.io, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-15).

Returns OHLCV candlestick price history for a specific prediction market event on exchanges like Kalshi, Polymarket, or Gemini.

## Facts

- Endpoint: GET https://api.predictionmarketdata.io/price-history
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/lukka-prediction-markets-price-history-b0845db0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_voqlV490kuD585yL9SLVJ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability lukka-prediction-markets-price-history-b0845db0
```

Example prompt: Pull 5-minute candle price history for the Kalshi NBA game contract KXNBAGAME-26JUN08SASNYK on exchange 4141 (Kalshi) for the last 24 hours — give me up to 288 buckets using a 300000ms interval.

## When to prefer this

Use this endpoint when you need time-series OHLCV candlestick data for a specific prediction market contract on Kalshi, Polymarket, or Gemini. Prefer this over general market listings when you already have the event ticker and need granular price history for charting, analysis, or monitoring price movements over a defined time window.

## Known failure modes

- Missing required 'event' query param returns validation error
- Missing required 'exchangeId' returns validation error
- Unknown or invalid exchangeId returns empty or error response
- Event ticker not found on specified exchange returns empty data array
- Invalid ISO-8601 timestamps in 'from'/'to' cause parse errors
- Payment failure (402) if USDC micropayment not attached
- Interval/limit combination producing too many buckets may be rejected or truncated

## How this service works

Historical pricing for a single prediction market on one exchange.

## Output

A JSON object containing an array of time-bucketed OHLCV candles for the specified prediction market event, including open, high, low, close prices, volume in contract units and USD, trade count per bucket, and metadata like firstDate, lastDate, eventTicker, and sourceId (exchange).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "event",
      "exchangeId"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "UTC end timestamp in ISO-8601 format."
      },
      "from": {
       "type": "string",
       "description": "UTC start timestamp in ISO-8601 format."
      },
      "event": {
       "type": "string",
       "description": "Event ticker or market identifier (from /prediction-markets)."
      },
      "limit": {
       "type": "string",
       "description": "Maximum number of buckets to return (e.g. 288 for 24h of 5m candles)."
      },
      "interval": {
       "type": "string",
       "description": "Bucket size in milliseconds (e.g. 300000 for 5-minute candles)."
      },
      "exchangeId": {
       "type": "string",
       "description": "Numeric exchange ID. 4141=Kalshi, 4137=Polymarket, 4008=Gemini."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "ts": "2026-06-07T20:25:00Z",
    "markets": [
     {
      "volume": "5817.81",
      "lowPrice": "0.55",
      "highPrice": "0.55",
      "openPrice": "0.55",
      "volumeUsd": "3199.79",
      "closePrice": "0.55",
      "tradeCount": 49,
      "lukkaSymbol": "KXNBAGAME-26JUN08SASNYK-NYK_yes.KALSHI"
     }
    ]
   }
  ],
  "count": 1,
  "dataType": "predictionHistoryCandles",
  "lastDate": "2026-06-07T20:25:00Z",
  "sourceId": 4141,
  "firstDate": "2026-06-07T20:25:00Z",
  "eventTicker": "KXNBAGAME-26JUN08SASNYK.KALSHI"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/lukka-prediction-markets-price-history-b0845db0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.predictionmarketdata.io](https://www.zero.xyz/host/api.predictionmarketdata.io/llms.txt)
