Example: /api/v1/today
{
"date": "2026-04-09",
"gramsPerBtc": 436.28056654498613,
"btcUsd": 70965.46,
"goldUsdPerOz": 5059.2998046875
}
Public JSON endpoints for the BTC/gold dataset. Responses include permissive CORS and are designed so paid tiers can add broader history and extra assets later.
| Method | Path | Notes |
|---|---|---|
| GET | /api/v1/today | Returns { date, gramsPerBtc, btcUsd, goldUsdPerOz }. |
| GET | /api/v1/history?limit=30 | Returns the last N days of data, clamped to 30 on the free tier. |
| OPTIONS | /api/v1/* | CORS preflight support for browser clients. |
Older snapshots and metric endpoints remain available for backwards compatibility while the public API migrates to /api/v1.
/api/health/api/snapshots/latest/api/snapshots/history/api/metrics/latest/api/metrics/history{
"date": "2026-04-09",
"gramsPerBtc": 436.28056654498613,
"btcUsd": 70965.46,
"goldUsdPerOz": 5059.2998046875
}
{
"snapshots": [
{
"date": "2026-04-07",
"gramsPerBtc": 442.0886272894343,
"btcUsd": 71910.2,
"goldUsdPerOz": 5059.2998046875
},
{
"date": "2026-04-08",
"gramsPerBtc": 437.0215593700262,
"btcUsd": 71085.99,
"goldUsdPerOz": 5059.2998046875
},
{
"date": "2026-04-09",
"gramsPerBtc": 436.28056654498613,
"btcUsd": 70965.46,
"goldUsdPerOz": 5059.2998046875
}
]
}
Paid tiers can extend the same shape with longer history windows and additional assets such as silver, S&P 500, or oil. The current response structure keeps that door open without forcing a breaking change later.
For production, pair the free tier with Cloudflare rate limiting at 100 requests per day per IP.
CORS header: Access-Control-Allow-Origin: *