Metals OHLC API: XAU Candles as JSON

Metals-API 1 min read
Metals OHLC API: XAU Candles as JSON

A metals OHLC API returns one UTC-day candle: open, high, low, and close. On Metals-API that is GET https://metals-api.com/api/open-high-low-close/{YYYY-MM-DD} with query access_key. Official docs sample: base=XAU, symbols=USD, date 2022-05-20, close 1844.828964194302, unit per ounce.

Copper Monthly starts at $19.99/mo (2,500 calls, 10-minute updates, 10 symbols). There is no Free Trial. Gold Monthly is $149.99. One symbol per OHLC request. Open/close are UTC day bounds, not COMEX session hours. Docs: metals-api.com/documentation (OHLC).

Request: official XAU → USD candle

curl "https://metals-api.com/api/open-high-low-close/2022-05-20?access_key=YOUR_API_KEY&base=XAU&symbols=USD"

Response: official OHLC sample

{
"success": true,
"timestamp": 1653931700,
"date": "2022-05-20",
"base": "XAU",
"symbol": "USD",
"rates": {
"open": 1841.1889341969709,
"high": 1851.6666851833336,
"low": 1816.419890887657,
"close": 1844.828964194302
},
"unit": "per ounce"
}

If you query today, high and close can still move. Do not mix ISO XAU with LBMA (USDLBXAUPM).

Same key

  • GET /api/latest?symbols=XAU — spot; read rates.USDXAU when base=USD.
  • GET /api/timeseries — daily series.
  • GET /api/fluctuation — start/end change.

MCP: metals-api.com/mcp (metals.ohlc).

Go live

1. Register — paid plan (no free trial).

2. Copy access_key.

3. GET /api/open-high-low-close/2022-05-20.

4. Chart rates.open … rates.close.

Read XAU candles with a Metals key →