Public data feeds for precious metals prices — market, spot, and Goldback rates.
Used by staktrakr.com ·
Source: lbruton/StakTrakrApi
https://api.staktrakr.com/data/ | All endpoints are relative to this base |
| Path | Description | Updated |
|---|---|---|
| api/manifest.json |
Market (retail) prices for all tracked coins Key fields: coins[], generated_at (ISO 8601 UTC)
|
Every 15 min |
| hourly/YYYY/MM/DD/HH.json |
Spot prices for a specific UTC hour Array of {timestamp, gold, silver, platinum, palladium} entries. Use current UTC hour; fall back to previous if not yet written.
|
Twice/hour |
| api/goldback-spot.json |
Goldback G1 exchange rate Key fields: g1_usd, scraped_at (ISO 8601 UTC)
|
Daily |
| api/{coin-slug}/latest.json |
Latest retail price for a specific coin e.g. api/ase/latest.json for American Silver Eagle
|
Every 15 min |
| spot-history-YYYY.json |
Yearly spot price history (seed file) One entry per day at noon UTC. For live data use the hourly/ endpoint above.
|
Daily (noon UTC) |
const now = new Date(); const y = now.getUTCFullYear(); const mo = String(now.getUTCMonth() + 1).padStart(2, "0"); const d = String(now.getUTCDate()).padStart(2, "0"); const hr = String(now.getUTCHours()).padStart(2, "0"); const url = `https://api.staktrakr.com/data/hourly/${y}/${mo}/${d}/${hr}.json`; const entries = await fetch(url).then(r => r.json()); const latest = entries.at(-1); // most recent entry in the hour console.log(latest); // { timestamp: "2026-02-22 18:00:00", gold: 2910.50, silver: 32.14, ... }
const manifest = await fetch("https://api.staktrakr.com/data/api/manifest.json") .then(r => r.json()); console.log(manifest.generated_at); // "2026-02-22T18:05:00Z" console.log(manifest.coins); // [ { slug: "ase", name: "American Silver Eagle", ... }, ... ]
| All timestamps | ISO 8601 UTC (Z suffix) or naive "YYYY-MM-DD HH:MM:SS" (treat as UTC) |
| CORS | GitHub Pages serves permissive headers — suitable for browser fetch() calls |
| Rate limiting | No enforced limit, but please cache responses — data only changes on the schedule above |
| Availability | Served via GitHub Pages — no SLA, but historically very reliable |