1. Hourly Snapshot Data Model & Ingestion Pipeline
Our backend deduplicates snapshots per (market_id, hour_bucket) in PostgreSQL 16 so downstream analytics jobs always receive monotonic, gap-free time-series rows.
Retrieve Contract Metadata + Hourly History Snapshots
Pulls current live quote plus stored PostgreSQL hourly probability history in one call.
curl -sS "https://api.predictionmarketapi.dev/v1/markets/detail?market_id=KXELONMARS-99&venue=kalshi" \
-H "x-api-key: pm_live_YOUR_API_KEY"import requests
detail = requests.get(
"https://api.predictionmarketapi.dev/v1/markets/detail",
params={"market_id": "KXELONMARS-99", "venue": "kalshi"},
headers={"x-api-key": "pm_live_YOUR_API_KEY"},
).json()["data"]
for snap in detail["history_snapshots"]:
print(snap["snapped_at"], snap["yes_probability"])const { data } = await fetch(
"https://api.predictionmarketapi.dev/v1/markets/detail?market_id=KXELONMARS-99&venue=kalshi",
{ headers: { "x-api-key": "pm_live_YOUR_API_KEY" } }
).then(r => r.json());
console.table(data.history_snapshots);{
"code": 0,
"provider": "https://predictionmarketapi.dev",
"status": "ok",
"data": {
"market_id": "KXELONMARS-99",
"venue": "kalshi",
"yes_probability": 0.115,
"price_change_24h": 0.03,
"history_snapshots": [
{
"snapped_at": "2026-11-26T02:00:00.000Z",
"yes_probability": 0.115,
"no_probability": 0.885,
"volume_24h_usd": 72.5,
"liquidity_usd": 40099.4
}
]
}
}Interactive Quant Forecasting Underwriting Terminal · GET /v1/markets/detail
Verify real-time latency, parcel credit math & JSON schema
Frequently Asked Questions
- How much does reading history_snapshots inside /v1/markets/detail cost?
- It is included inside the flat 10-Credit ($0.0004–$0.001) cost of GET /v1/markets/detail with no separate surcharge.