Skip to content

v1.0.0 — Initial release

Latest

Choose a tag to compare

@sru-codes sru-codes released this 15 Oct 14:29
· 5 commits to main since this release

gold-api v1.0.0

First public release: a small, self-hosted market-data API for gold and USD/INR.

It pulls gold spot (XAU/USD), USD/INR reference FX, daily gold bars and optional
macro/news context on a 60-second loop, assembles one snapshot, and serves it
as plain JSON. No API keys required.

Highlights

  • 60s scheduler with per-source cadences and a forced first cycle
  • Read-only, versioned JSON API (/api/v1/...) + OpenAPI docs at /docs
  • Degraded-mode reporting (LIVE / PARTIAL / DEGRADED) and per-provider health
  • Best-effort disk cache and atomic snapshot persistence
  • Optional ADMIN_TOKEN protection for the manual refresh endpoint
  • Docker + railway.json for one-service deployment (PORT-aware, /health)

Endpoints

Method Path Purpose
GET /health Liveness / readiness
GET /api/v1/snapshot Everything in one payload
GET /api/v1/gold Gold spot + derived INR/gram
GET /api/v1/fx USD/INR reference rate
GET /api/v1/bars Daily gold bars
GET /api/v1/macro Optional FRED series
GET /api/v1/news Optional news context
GET /api/v1/providers Per-provider health
POST /api/v1/refresh Force a refresh

Data sources

  • goldprice.dev — XAU/USD spot + daily bars (keyless)
  • Frankfurter — USD/INR reference FX (no auth)
  • FRED — optional macro
  • GNews — optional news

Deploy

See the README. On Railway: deploy from the repo, attach a Volume at /data,
set a domain. (The Dockerfile deliberately omits VOLUME — Railway rejects it.)

Notes

  • Values are reference data, not executable price feeds.
  • Free commercial use of the goldprice.dev keyless tier requires visible attribution.

Full changelog: see CHANGELOG.md.