Pyth Pro & Benchmarks — Historical Oracle Data
How Pyth Benchmarks powers this app's volatility dashboard and calibration analysis — and how developers can use it.
What Pyth Benchmarks is
Pyth Benchmarks is Pyth's historical price archive. Every price update that has ever been published to Pythnet is stored and queryable — with the price, confidence interval, and timestamp preserved exactly as they were at publication time.
This is what makes rigorous CI calibration possible. You cannot audit whether an oracle's stated confidence was accurate without the original CIs from the past. Benchmarks provides exactly that.
API overview
/v1/shims/tradingview/historyOHLCV candles in TradingView format — great for charting libraries. Supports 1m, 5m, 15m, 1h, 1D resolutions.
Params: symbol, resolution, from, to
/v1/updates/price/{timestamp}Exact price snapshot at a given Unix timestamp. Returns price + conf + expo as published by Pyth at that moment.
Params: ids[] (one per feed), timestamp
/v1/updates/price/latestEquivalent of the Hermes live endpoint, but from Benchmarks (useful for comparing archive vs live).
Params: ids[]
Free tier vs Pyth Pro
- • 30 requests / 10 seconds rate limit
- • Full historical archive access
- • All feed IDs available
- • No API key required
- • No SLA or priority queue
- • Higher rate limits
- • Dedicated infrastructure
- • SLA guarantees
- • Priority support
- • Enterprise data agreements
This app uses the free tier. For production DeFi protocols that need continuous historical queries, Pyth Pro removes rate limit concerns. Add your PYTH_PRO_API_KEY to .env.local to unlock it.
How this app uses it
The CI Calibration Analysis fetches price snapshots at 2-hour intervals over the selected period. For each snapshot t, it records (price_t, conf_t), then fetches the next snapshot to get price_{t+horizon}. The calibration test asks: did |price_{t+h} − price_t| ≤ k × conf_t?
Running this across thousands of data points gives an empirical capture rate at each sigma level — the bar chart on the calibration page. The health score (0–100) summarises how close the oracle is to perfect statistical calibration.