Historical Gold Price API
Gold OHLCV bars with cursor pagination, settled-bar labels, and history windows. Daily XAU/USD reaches 1996 on Plus and Pro.
Use /v1/bars for new integrations
The bars endpoint replaces the deprecated/v1/prices/history route. It returns open, high, low, close, volume, and is_closed for each interval.
curl "https://api.goldprice.dev/v1/bars?symbol=XAU-USD-SPOT&interval=1d&from=2026-10-08&to=2026-10-14&limit=7"This example rolls forward daily, so it stays inside the Free tier's 30-day window. Open the live JSON response.
The anonymous request above is useful for a first proof. A free key identifies your integration, includes 5,000 calls per month, and includes authenticated-only options such as include=stats.
History windows by plan
| Plan | Daily XAU/USD | Other symbols | Intraday bars |
|---|---|---|---|
| Free | Most recent 30 days | XAG and HG spot | None |
| Basic | Most recent year | XAG and HG spot | None |
| Plus | Full daily history to 1996 | XAG and HG spot | 1h and 4h, last 30 days |
| Pro | Full daily history to 1996 | XAG and HG spot | 1m to 4h, full depth |
Deep intraday files begin in 2006. /v1/download is Basic+: last year on Basic, every year on Plus and Pro. Futures and ETF/GLD bars are Legacy plans only. See pricing for plan details.
Intervals, coverage, and missing bars
The bars API accepts 1m, 5m, 15m,30m, 1h, 2h, 4h, and 1d. Availability still depends on the symbol, plan, requested window, and the underlying market history. Retention is not the same as accumulated history.
A bar represents the observations available for its window. An open bar has is_closed: false; a missing or incomplete source window is not evidence that the market traded at zero. Check the returned rows and timestamps before filling gaps in an analysis. Spot instruments return volume: null because there is no consolidated spot exchange volume.
Use pricing for current access and the bars reference for request fields and error responses.
Response and settled bars
The values below are illustrative sample data.
{
"symbol": "XAU-USD-SPOT",
"interval": "1d",
"bars": [
{
"bar_start": "2026-07-15T00:00:00Z",
"open": "3327.12",
"high": "3354.81",
"low": "3312.44",
"close": "3348.65",
"volume": null,
"is_closed": true
}
],
"next_cursor": "MjAyNi0wNy0xNVQwMDowMDowMFo",
"meta": { "tier": "free_2026", "count": 1, "source_id": "mixed" }
}is_closed: false identifies the currently forming bar, so a backtest can exclude provisional data. Spot volume isnull because there is no consolidated XAU spot exchange. Futures/ETF bars: Legacy plans only, with venue volume when available.
Cursor pagination
Results arrive newest first. When next_cursor is not null, pass it unchanged as the next request'scursor. A null cursor means the requested range is exhausted.
const url = new URL("https://api.goldprice.dev/v1/bars");
url.search = new URLSearchParams({
symbol: "XAU-USD-SPOT",
interval: "1d",
from: "2026-09-16",
to: "2026-10-14",
limit: "7",
}).toString();
let cursor;
do {
if (cursor) url.searchParams.set("cursor", cursor);
const page = await fetch(url).then((response) => response.json());
consume(page.bars.filter((bar) => bar.is_closed));
cursor = page.next_cursor;
} while (cursor);MCP and bulk download
Agent clients can use get_historical through thegold price MCP server with the same 1m, 5m, 15m, 30m, 1h, 2h, 4h, and 1d interval names. For offline research, /v1/download returns a redirect to a time-limited archive file for one symbol, interval, and calendar year: Parquet by default or CSV when requested.
FAQ
How much historical gold data is available for free?
How far back does the historical gold price API go?
Does gold spot history include volume?
Should new integrations use /v1/prices/history?
See also
- Complete bars reference for every field and error code
- Karat gold price API for current 24K through 10K prices per gram
- API Quickstart for an anonymous spot-price request in under a minute