---
title: "Latest bar for a symbol+interval — the most-recent settled or forming bar"
method: GET
path: "/v1/bars/latest"
tags: ["bars"]
---

# Latest bar for a symbol+interval — the most-recent settled or forming bar

`GET /v1/bars/latest`

Return the single most-recent bar for a symbol+interval.

Ordered by bar_start DESC, returns the first row. Provisional (forming)
bars are returned with is_closed=False. Empty → 200 with bar: null, never
404. No tier gate on this endpoint (latest bar is the lightest read;
depth-gating only applies to ranges).

## Query parameters

- `symbol` string, required — Symbol in slash or dash form. E.g. "XAU/USD", "GLD".
- `interval` string — Bar interval. One of: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d.

## Response `200`

Successful Response

- LatestBarResponse — Response envelope for GET /v1/bars/latest. bar is null (not present) when no bar exists for the given symbol+interval. The response is always 200 — never 404 on empty.
  - `symbol` string, required
  - `interval` string, required
  - `bar` Bar — One OHLCV bar in the /v1/bars wire shape. Prices are Decimal-as-string to match the existing /v1/prices/history contract and avoid float drift on the consumer side.
    - `bar_start` string, required — Bar open timestamp, ISO-8601 UTC with Z suffix (e.g. "2026-06-15T00:00:00Z"). The bar covers the half-open interval [bar_start, bar_start + interval).
    - `open` string, nullable — Open price as decimal string. Null only on data gaps (never fabricated).
    - `high` string, nullable — High price as decimal string.
    - `low` string, nullable — Low price as decimal string.
    - `close` string, nullable — Close price as decimal string.
    - `volume` string, nullable — Trading volume as decimal string. Null for spot instruments (XAU/USD, XAG/USD — no consolidated spot volume). Real for futures (GC, SI, HG) and ETFs (GLD). Never 0, never fabricated.
    - `is_closed` boolean, required — True if the bar's time window has ended and the OHLC values are final (settled). False for the currently-forming bar (provisional).
  - `meta` BarsMeta, required — Metadata block in BarsResponse. source_id is a PAGE-SCOPED provenance summary derived from the bars in this page — NOT a per-bar attribute. It equals the source_id of the first bar in the page, or "mixed" if the page spans multiple source_ids (e.g. a range that crosses from CSV history into a live Pyth feed). It is non-authoritative for mixed pages: consumers wanting per-bar provenance should wait for a future version that exposes bar.source_id per-bar. That per-bar field is a reserved future decision (flagged in the §9.4 public-surface audit); do NOT add it to the current Bar wire shape without a version bump. Examples: 'csv_xau_15m_v1', 'csv_xau_rollup_v1', 'lse_gld', 'mixed'. Null when bars list is empty.
    - `tier` string, required
    - `count` integer, required
    - `source_id` string, nullable — Provenance tag from the price_bars store. Examples: 'csv_xau_15m_v1', 'csv_xau_rollup_v1', 'lse_gld', 'pyth_live'. Null when bars list is empty.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Validation Error
- `429` — Too Many Requests
- `503` — Service Unavailable

---

[API](https://skmtc.net/goldprice/apis/gold-api.md) · [All operations](https://skmtc.net/goldprice/apis/gold-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/goldprice/gold-api/revisions/7885a141754c/schema)
