Example: /api/v1/today
{
"date": "2026-09-24",
"gramsPerBtc": 607.6500597364058,
"btcUsd": 84356.17,
"goldUsdPerOz": 4317.89990234375
}
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-09-24",
"gramsPerBtc": 607.6500597364058,
"btcUsd": 84356.17,
"goldUsdPerOz": 4317.89990234375
}
{
"snapshots": [
{
"date": "2026-09-22",
"gramsPerBtc": 612.617929805541,
"btcUsd": 86198.05,
"goldUsdPerOz": 4376.39990234375
},
{
"date": "2026-09-23",
"gramsPerBtc": 607.7391683110708,
"btcUsd": 84378.31,
"goldUsdPerOz": 4318.39990234375
},
{
"date": "2026-09-24",
"gramsPerBtc": 607.6500597364058,
"btcUsd": 84356.17,
"goldUsdPerOz": 4317.89990234375
}
]
}
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.
The free tier is capped at 100 requests per UTC day per IP, with an extra Cloudflare burst limiter in front of it.
CORS header: Access-Control-Allow-Origin: *