OHLCV bar history — cursor-paginated, real data, is_closed label
Changed onPaginated OHLCV bar history from the canonical price_bars store.
Results are ordered DESC by bar_start (newest first). Paginate via next_cursor — pass it as ?cursor= on the next request. When next_cursor is null the result is exhausted. Empty range returns 200 with bars: [].
Daily (1d) depth by plan:
- Free: last 30 days, gold (XAU) only
- Physical: last 1 year, gold (XAU) only
- Pro and Realtime Pro: full daily history (XAU/USD from 1996; other symbols start later, e.g. silver from 2007)
Intraday intervals (1m, 5m, 15m, 30m, 1h, 2h, 4h) require Pro or Realtime Pro (or Pro 2026); Plus 2026 gets 1h and 4h. Depth is 30 days (older ranges return 400 range_too_deep; use /v1/download), except Pro 2026, which reaches full depth.
Free and keyless callers get bars 15 minutes late.
Request
- Base URLhttps://api.goldprice.dev
- URLhttps://api.goldprice.dev/v1/bars
- Auth
- none
- or HTTP bearer
- or API key in header X-API-Key
Query parameters
Symbol in slash or dash form. E.g. "XAU/USD", "XAU-USD-SPOT", "GLD".
Bar interval. One of: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d.
ISO-8601 start (inclusive).
ISO-8601 end (inclusive).
Max bars per page (1-10000). Default 100.
Opaque keyset pagination cursor from a prior response's next_cursor. When set, returns bars older than the cursor within the from/to window.
Response
Successful Response
Changes
- breaking
the response property
became optional for the status - breaking
the response property
became optional for the status - breaking
the response property
became optional for the status - breaking
the response property
became optional for the status - breaking
the response property
became optional for the status - breaking
the response property
became optional for the status - breaking
response property
messagelist-of-types was widened by adding typesnullto media typeapplication/jsonof response400 - breaking
response property
messagelist-of-types was widened by adding typesnullto media typeapplication/jsonof response401 - breaking
response property
messagelist-of-types was widened by adding typesnullto media typeapplication/jsonof response403 - breaking
response property
messagelist-of-types was widened by adding typesnullto media typeapplication/jsonof response404 - breaking
response property
messagelist-of-types was widened by adding typesnullto media typeapplication/jsonof response429 - breaking
response property
messagelist-of-types was widened by adding typesnullto media typeapplication/jsonof response503 - warning
removed the optional property
from the response with the status - info
the endpoint scheme security
ApiKeyAuthwas added to the API - info
the endpoint scheme security
BearerAuthwas added to the API - info
added the non-success response with the status
- info
added the required property
to the response with the status - info
added the required property
to the response with the status - info
added the required property
to the response with the status
- breaking