A developer-first gold price API with live LBMA-blended XAU spot, 58 years of historical data back to 1968, and conversion to any ISO 4217 currency. JSON by default, XML and JSONP on request. No new charts library needed — we server-render the sparkline and ship you the data.
200 requests/day free (forex + crypto) · Metals on the $9/mo Pro plan · No card to register
LBMA-blended reference rate in USD per troy ounce. Refreshed every 15 minutes on the server; page loads show the last-published fix.
To fetch this value programmatically:
GET /api/commodities/rates
?from=USD&to=XAU
Authorization: Bearer YOUR_API_KEY
Pick a language, copy the snippet, replace YOUR_API_KEY. Every example hits /api/commodities/rates and returns the live XAU/USD spot price. Because XAU is an ISO 4217 code, most downstream finance libraries handle it natively — you can store “grams of gold” the same way you store “dollars”.
curl "https://api.unirateapi.com/api/commodities/rates?api_key=YOUR_API_KEY&from=USD&to=XAU"
{
"amount": 1,
"base": "USD",
"to": "XAU",
"rate": 0.000413,
"result": 0.000413
}
The rate field is troy ounces of gold per USD (so 0.000413 oz/USD ≈ $2,421/oz). Divide 1 by the rate to get USD/oz. Divide by 31.1035 for USD/gram, multiply by 1000 for USD/kg — the three unit conversions that cover 95% of integrations.
Want a full Python walkthrough with pandas and matplotlib charts? See the precious metals tracker tutorial or the older gold API guide (more conceptual; this page is the API reference).
361 monthly closing prices sampled from LBMA data, covering 1996-04-20 to 2026-04-01 (29.9 years).
The USD price of gold is up 1112%
over this window — from $391/oz to $4,739/oz, with an all-time range of $255 to $5,281 per troy ounce.
Pull the full series via /api/commodities/historical/timeseries.
Source: UniRateAPI commodity historical cache, derived from LBMA fixings. Points are sampled at one per month (first available close) for chart clarity. Daily granularity is available on the historical endpoint.
Spot gold is the reference price for immediate delivery of LBMA-grade good-delivery bars (400 troy oz, 99.5%+ purity). It is published via the twice-daily LBMA Gold Price auction at 10:30 and 15:00 London time and re-interpolated throughout the trading day from market feeds.
This is the right price for: portfolio valuation, ETF NAV, jewelry pricing, bullion dealer inventory, accounting and audit, multi-currency e-commerce checkout, regulatory reporting, and anything else that needs a defensible reference rate.
The endpoint that serves it is /api/commodities/rates. We return the XAU price in USD per troy ounce as blended from LBMA, Kitco, and goldprice.org with automatic outlier rejection.
Gold futures are exchange-traded contracts for delivery of 100 troy oz at a specified future date. The most active contract is COMEX GC. Futures prices carry a basis premium or discount to spot driven by US interest rates (gold’s cost of carry), ETF flows, storage costs, and supply/demand expectations.
This is the right price for: hedging physical inventory or production, speculating on short-term moves, tracking contango/backwardation, and implementing delta-one gold strategies.
We do not return futures prices — for that you need an exchange-connected market data vendor or a brokerage API (Interactive Brokers, TradeStation, etc). For 95% of integrations involving gold, spot is what you want.
If you are pricing something — a necklace, an invoice, an ETF share, a custody balance — use spot. If you are trading it or hedging it on a specific future date, use futures. Almost every API integration falls into the first bucket.
Four endpoints cover every gold integration pattern: current spot price, single-date historical, time-series ranges, and symbol metadata. All require api_key either as a query param or Authorization: Bearer header, and require the Pro tier. Full OpenAPI spec lives in the Swagger console.
/api/commodities/rates
Current spot
Pro
Returns live USD-per-troy-ounce prices for gold (XAU), silver (XAG), platinum (XPT) and palladium (XPD). Pass to=XAU for a single metal, or omit it for all four. Refreshed every 15 minutes from the LBMA-blended cache.
api_key — required (Pro plan)from — base (USD by default, or any ISO 4217)to — optional target (XAU/XAG/XPT/XPD)amount — optional multiplierformat — json (default), xml, jsonpGET /api/commodities/rates
?from=USD&to=XAU
→ { "amount": 1, "base": "USD",
"to": "XAU",
"rate": 0.000413,
"result": 0.000413 }
/api/commodities/convert
Convert amount
Pro
Converts between metals and currencies in a single call — commodity-to-commodity, commodity-to-currency, or currency-to-commodity. Use this when you want a pre-calculated amount, not rate metadata.
amount — required, floatfrom, to — any of XAU/XAG/XPT/XPD or ISO 4217 codeformat — json / xml / jsonpGET /api/commodities/convert
?amount=10&from=XAU&to=USD
→ { "amount": 10, "from": "XAU",
"to": "USD", "result": 24287.50 }
/api/commodities/historical/rates
Historical (single date)
Pro
Gold price for any specific date. Use for accounting, tax reporting, ETF NAV backdating, or jewelry-inventory revaluation. Set to to a fiat currency (e.g. EUR) and we convert through the matching historical FX rate for that same date — which is what auditors require.
date — required, YYYY-MM-DDfrom, to, amount — same shape as /ratesGET /api/commodities/historical/rates
?date=2020-03-20&from=XAU&to=USD
→ { "date": "2020-03-20",
"rate": 1479.25, ... }
/api/commodities/historical/timeseries
Range query
Pro
Date-range queries up to 5 years per call. Ideal for drawing charts, running backtests, or bulk-loading a metal series into a data warehouse. Combine with the forex time-series endpoint to get a dated, FX-correct valuation sequence.
start_date, end_date — requiredbase — USD default, any ISO 4217symbols — comma-separated (e.g. XAU)GET /api/commodities/historical/timeseries
?start_date=2024-01-01
&end_date=2024-12-31
&symbols=XAU
Gold spot and historical rates are blended from institutional and market sources, weighted by reliability and recency. When a source returns an outlier tick (fat-finger, feed glitch) it is automatically excluded from the published rate.
Each scraper in the list below is a real module in our pipeline — not a marketing claim — and you can cross-reference them in the pipeline itself via app/scrapers/.
The authoritative benchmark — twice-daily auction-based fixings for gold, silver, platinum and palladium. Used by ETFs, central banks, and bullion banks worldwide to settle contracts.
Retail / wholesale bullion market data from Montreal. Cross-check source for the LBMA blend — useful during off-hours when London and New York are both closed.
Supplementary gold pricing and demand metadata from the WGC / gold.org. Used for recency verification against the LBMA fix.
Public consensus bullion quotes in multiple currencies — used to sanity-check the FX-converted rates on the metals endpoints.
Edge-cached tick feed covering all four metals — used when LBMA and Kitco are both mid-update to avoid stale prices.
Market-hours metal quotes from a regulated Swiss dealer. Third leg of the outlier-rejection check on XAU/XAG, minor contributor on XPT/XPD.
The weighted-blend algorithm decays older observations and favours the LBMA fix during its publication windows. Full source code for each scraper is in app/scrapers/ in the UniRateAPI repo.
Pricing and feature data verified against each vendor’s public pricing page in 2026. All five providers ultimately read from the LBMA fix for the authoritative reference rate — the meaningful differences are packaging, historical depth, bundled features, and price.
| Feature | UniRateAPI | GoldAPI.io | metals-api.com | MetalpriceAPI | Alpha Vantage |
|---|---|---|---|---|---|
| Entry price | $9/mo | Free tier then on request | $19.99/mo (Copper) | $8.99/mo (Basic) | $49.99/mo |
| Requests / month (entry) | 750,000 | ~100 (free tier) | 2,500 | 10,000 | 75 req/min (no daily cap) |
| Metals covered | XAU, XAG, XPT, XPD | XAU, XAG | All four + rhodium | All four | XAU, XAG |
| Historical depth | 58 yrs (XAU/XAG), 36 yrs (XPT/XPD) | Historical available | 30 days on entry, 365 on top tier | Yes (paid) | Yes (paid) |
| Forex + crypto bundled | 170+ FIAT · 420+ crypto | No | FIAT only, no crypto | FIAT + metals, no crypto | FIAT + crypto + stocks |
| Currency conversion | Any ISO 4217, server-side | USD only | Yes (limited) | Yes | USD only |
| Free tier | 6,000/mo (forex + crypto) | ~100/mo | None on entry | 100/mo | 25 req/day |
| Response formats | JSON, XML, JSONP | JSON | JSON | JSON | JSON, CSV |
| Time-series included | Yes, at $9 | Paid tier | Paid tier (Gold+) | Paid tier | Premium |
Pricing accurate as of 2026-04. Verify each vendor’s current plans before committing — metals-api.com in particular has been raising prices regularly since 2024.
Six real use cases — every one of these has shipped to production on the UniRateAPI gold endpoint during 2024–2026.
Show a client’s gold holding in the same ledger as their stocks, bonds, and cash — in any ISO 4217 reporting currency. One call returns XAU in USD; the Convert endpoint re-prices it in EUR, GBP, JPY for multi-currency portfolios.
Python tracker tutorial →Live cost-per-gram for custom jewelry, bullion product pages, and B2B wholesale quotes. Server-side render spot × gram-weight × purity × margin, cache for 15 minutes to match our refresh cadence.
Gold API integration guide →Daily net-asset-value calculations for physically-backed gold ETFs and mutual funds. Use the 15:00 LBMA fix as the authoritative close via /api/commodities/historical/rates?date=....
Treasury and central-bank gold reserves are reported monthly at the LBMA reference price. Automate the revaluation with a single historical call per month per metal — no more manual spreadsheet entry.
Historical API guide →Junior and mid-cap miners revalue their reserves and forecast revenue based on spot gold. A nightly job that pulls the close and posts to Slack or a BI tool takes ~20 lines of Python with this API.
International payments guide →Gold-backed stablecoins (PAXG, XAUT) and lending platforms that accept tokenised gold as collateral need live XAU pricing to size margins and liquidation triggers. Cache the spot with a 60-second TTL to stay responsive without blowing the rate limit.
Free crypto APIs compared →Straight answers, pulled from the People Also Ask block on “gold price api” and the Reddit threads developers actually post about this stuff.
GET /api/commodities/rates?from=USD&to=XAU with your API key. The response returns the current USD-per-troy-ounce price plus a timestamp. Values are sourced from LBMA fixings and cross-checked against Kitco, goldprice.org and major market feeds. Full code samples in Python, Node, Go, PHP, and cURL are in the quickstart section above./api/commodities/historical/rates for a single date or /api/commodities/historical/timeseries for a range.from=XAU&to=EUR (or any ISO 4217 code) and the API converts the spot USD price through our forex cache to the requested currency. For historical conversions, the same thing works on /api/commodities/historical/rates?date=YYYY-MM-DD&from=XAU&to=EUR — we load the historical FX rate for that date so your back-priced gold value is correct on audit.price_per_gram = xau_price / 31.1034768, price_per_kg = price_per_gram * 1000. Most jewelry-pricing integrations want grams; ETF NAV calculations and bullion dealers stay in troy ounces.Register for a free API key, upgrade to Pro ($9/mo) for gold access, and you’re live. Cancel anytime — no annual contract. Gold is bundled with silver, platinum, palladium, 170+ forex currencies, 420+ cryptocurrencies and 27 years of historical data on one key.