1. Grounding LLM Forecasts with Live Event-Contract Priors
When a research agent evaluates macro risk, regulatory approval likelihood, or tech launch timelines, injecting live market probabilities + liquidity depth creates an auditable baseline.
- Step 1 — Discover: Call search_prediction_markets (GET /v1/markets/search) with the topic query to retrieve active contracts across venues.
- Step 2 — Verify Liquidity: Check volume_usd, liquidity_usd, and spread_bps via get_market_orderbook so thin quotes are down-weighted.
- Step 3 — Audit Rules: Call get_market_detail to read exact settlement rules and hourly historical probability shifts before synthesizing a report.
2. Keyless Agent Billing via Base Mainnet USDC (x402)
Autonomous agents without a pre-registered API key receive an HTTP 402 Payment Required challenge carrying full Coinbase Bazaar Discovery metadata and settle $0.001 USDC on Base Mainnet only when non-empty data returns.
Probe Keyless x402 Challenge
Omit the x-api-key header on any /v1/markets/* route to inspect the x402 Base Mainnet USDC payment schema.
curl -i "https://api.predictionmarketapi.dev/v1/markets/search?query=inflation&limit=5"import requests
# With API key (recommended for high-throughput agents)
resp = requests.get(
"https://api.predictionmarketapi.dev/v1/markets/movers",
params={"category": "tech", "limit": 10},
headers={"x-api-key": "pm_live_YOUR_API_KEY"},
)
print(resp.json()["data"]["movers"][:3])const res = await fetch("https://api.predictionmarketapi.dev/v1/markets/movers?category=tech&limit=10", {
headers: { "x-api-key": "pm_live_YOUR_API_KEY" },
});
const { data } = await res.json();
console.log(data.movers.slice(0, 3));{
"code": 0,
"provider": "https://predictionmarketapi.dev",
"status": "ok",
"data": {
"category": "tech",
"count": 10,
"snapshot_interval": "hourly_pg16",
"movers": [
{
"market_id": "KXELONMARS-99",
"venue": "kalshi",
"yes_probability": 0.115,
"price_change_24h": 0.03,
"direction": "up"
}
]
}
}Interactive Quant Forecasting Underwriting Terminal · GET /v1/markets/movers
Verify real-time latency, parcel credit math & JSON schema
Frequently Asked Questions
- Does x402 charge my agent wallet if a market query returns 0 results?
- No. Our Atomic Query-Before-Settle engine executes the upstream query first and only settles on-chain when HTTP 200 returns non-empty items.