
Historical XAU/EUR is the XAU/USD gold close multiplied by the USD/EUR rate for the same date: get daily gold bars from goldprice.dev and published business-day FX rows from exchangerate.dev, then join them on date.
Start with USD gold bars
GET /v1/bars returns gold prices in USD only. Request XAU-USD-SPOT with interval=1d and use the daily close. The resulting gold price is in US dollars per troy ounce.
This request selects the dated gold observation used at the end of the validated comparison below. Set GOLDPRICE_API_KEY to a key with access to that date.
curl --get 'https://api.goldprice.dev/v1/bars' \ --header "X-API-Key: $GOLDPRICE_API_KEY" \ --data-urlencode 'symbol=XAU-USD-SPOT' \ --data-urlencode 'interval=1d' \ --data-urlencode 'from=2026-07-10' \ --data-urlencode 'to=2026-07-10'Prices are decimal strings. Check is_closed before treating a daily close as final. Results come newest first; continue with next_cursor passed as cursor when paging a longer range.
Get the matching USD/EUR rate
Request the same date from exchangerate.dev. With base=USD and symbols=EUR, the rate means euros per one US dollar.
curl --get 'https://api.exchangerate.dev/v1/range' \ --header "Authorization: Bearer $EXCHANGERATE_API_KEY" \ --data-urlencode 'base=USD' \ --data-urlencode 'symbols=EUR' \ --data-urlencode 'start_date=2026-07-10' \ --data-urlencode 'end_date=2026-07-10'For a longer series, request matching date windows from both APIs. The FX range returns published business-day rows. It does not provide an observation for every calendar date.
Join on date before multiplying
Use an inner join on date, then calculate:
eur_gold_close = xau_usd_close x eur_per_usdThe result is euros per troy ounce. Keep the FX direction consistent: this calculation needs euros per dollar.
Do not forward-fill weekends or holidays. Retain only dates with both a gold close and a published FX observation. A calendar row without a matching FX observation is not an aligned XAU/EUR observation.
Plan windows for gold history
Free includes the last 30 days of daily gold bars. Basic includes the last year. Plus and Pro include daily gold bars from 1996. Free and keyless bars are 15 minutes late.
For intraday work, Plus includes 1-hour and 4-hour bars for the last 30 days. Pro includes all supported intraday intervals at full depth. A daily FX join should not be treated as a same-minute currency conversion for intraday gold bars.
Validated comparison and no look-ahead
The validated one-year comparison ending 10 July 2026 recorded a 23.93% rise in the XAU/USD daily close, from 3323.81 to 4119.172. The same position returned 26.95% in euros using exact-date, non-forward-filled published FX observations.
Use only observations available at the point your strategy makes a decision. Matching dates does not establish that both observations were available earlier that day. Do not use a completed daily close to make an earlier decision.
The local-currency backtest post contains the full aligned Python example.
Today's gold price in euros
For today's euros per gram, use GET /v1/convert?from=XAU&to=EUR&amount=1&unit=gram, with no key. The XAU/EUR price page shows the live price.
Next
- Historical documentation
- Backtest with gold OHLC bars
- USD gold history and free monthly CSV since 1996
Live gold prices, historical OHLC, and multi-source aggregation, available via REST and SSE.