---
title: "Historical Gold Price API: OHLCV to 1996 · goldprice.dev"
description: "Gold OHLCV with cursor pagination: Free 30 days, Basic one year, Plus and Pro daily XAU to 1996."
canonical: "https://goldprice.dev/docs/historical"
---

# Historical gold price API reference

Get daily or intraday gold prices (open, high, low, close, and volume where available) for a date range. Daily XAU/USD goes back to 1996 on Plus and Pro. Bars use cursor pagination and carry an is_closed label. Free covers the last 30 days and Basic one year.

## Use /v1/bars for new integrations

`GET /v1/bars` · Bearer optional · Free+

The bars endpoint replaces the deprecated `/v1/prices/history` route. It returns open, high, low, close, volume, and `is_closed` for each interval.

```bash
curl "https://api.goldprice.dev/v1/bars?symbol=XAU-USD-SPOT&interval=1d&from=2026-11-23&to=2026-11-29&limit=7"
```

The dates are the last seven days. The page moves them to today's date when it loads, so they stay inside the Free tier's 30-day window; keep `from` within the last 30 days in your own calls. [Open the live JSON response](https://api.goldprice.dev/v1/bars?symbol=XAU-USD-SPOT&interval=1d&from=2026-11-23&to=2026-11-29&limit=7).

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`.

[Create a free API key →](https://goldprice.dev/login)

## History windows by plan

| Plan | Daily XAU/USD | Other symbols | Intraday bars |
| --- | --- | --- | --- |
| Free | Most recent 30 days | XAG, HG, XPT and XPD spot, XAU-CNY-SGE, live futures bars | None |
| Basic | Most recent year | XAG, HG, XPT and XPD spot, XAU-CNY-SGE, live futures bars | None |
| Plus | Full daily history to 1996 | XAG, HG, XPT and XPD spot, XAU-CNY-SGE, live futures bars | 1h and 4h, last 30 days |
| Pro | Full daily history to 1996 | XAG, HG, XPT and XPD spot, XAU-CNY-SGE, live futures bars | 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. Live futures bars (XAU-COMEX-MAIN, XAG-COMEX-MAIN, HG-COMEX-MAIN, XPT-NYMEX-MAIN and XPD-NYMEX-MAIN, or one month as XAU-COMEX-2027-02) are on every plan. ETF/GLD bars are Legacy plans only. See [pricing](https://goldprice.dev/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](https://goldprice.dev/pricing) for current access and [the bars reference](https://goldprice.dev/docs/api-reference#bars) for request fields and error responses.

## Response and settled bars

The values below are illustrative sample data.

```json
{
  "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" },
  "delayed_minutes": 15
}
```

`is_closed: false` identifies the currently forming bar, so a backtest can exclude provisional data. Spot volume is `null` because there is no consolidated XAU spot exchange. Live futures bars are on every plan, with venue volume when available; ETF bars are Legacy plans only.

## Cursor pagination

Results arrive newest first. When `next_cursor` is not null, pass it unchanged as the next request's `cursor`. A null cursor means the requested range is exhausted.

```javascript
const url = new URL("https://api.goldprice.dev/v1/bars");
url.search = new URLSearchParams({
  symbol: "XAU-USD-SPOT",
  interval: "1d",
  from: "2026-11-01",
  to: "2026-11-29",
  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 the [gold price MCP server](https://goldprice.dev/docs/mcp) 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?

The Free tier can query the most recent 30 days of daily XAU/USD spot bars through GET /v1/bars.

### How far back does the historical gold price API go?

Plus and Pro include daily XAU/USD history back to 1996. Plus has 1h and 4h bars for the last 30 days; Pro has 1m to 4h bars at full depth. Deep intraday files begin in 2006.

### Does gold spot history include volume?

No. XAU/USD spot bars return null volume: there is no consolidated exchange volume. Live futures bars, such as XAU-COMEX-MAIN, are on every plan, with venue volume when available. ETF bars are Legacy plans only.

### Should new integrations use /v1/prices/history?

No. /v1/prices/history is deprecated. New integrations should use /v1/bars, which adds real OHLCV fields, cursor pagination, and the is_closed settlement label.

## See also

- [Complete bars reference](https://goldprice.dev/docs/api-reference#bars) for every field and error code
- [Karat gold price API](https://goldprice.dev/docs/carat) for current 24K through 10K prices per gram
- [API Quickstart](https://goldprice.dev/docs/quickstart) for an anonymous spot-price request in under a minute
- [XAU/USD 1-minute OHLC data](https://goldprice.dev/blog/xauusd-ohlc-1-minute-data) and [XAU/EUR historical data](https://goldprice.dev/blog/xau-eur-historical-data) worked examples

Source: https://goldprice.dev/docs/historical
