---
title: "[DEPRECATED — use /v1/bars] Aggregated close history for a symbol — interval ∈ {1d, 1h}."
method: GET
path: "/v1/prices/history"
tags: ["prices"]
---

# \[DEPRECATED — use /v1/bars\] Aggregated close history for a symbol — interval ∈ {1d, 1h}.

`GET /v1/prices/history`

## Request

- Base URL: `https://api.goldprice.dev`
- URL: `https://api.goldprice.dev/v1/prices/history`
- Auth: one of:
  - none
  - HTTP bearer
  - API key in header `X-API-Key`

Dispatch to the per-interval handler. The handler is the Module
Interface; per-interval helpers are Deep Modules hiding the
interval-specific policy + storage shape.

DEPRECATED in favour of /v1/bars (C4). This endpoint retains the
legacy close-only series[] wire shape for backward compatibility.
Deprecation + Sunset + Link headers are injected on every 200 response
(and on 403 plan_gated, where the caller may need to upgrade before
migrating). The sunset DATE is founder-controlled (see config
prices_history_sunset_date) — NOT hardcoded here.

## Query parameters

- `symbol` string, required
- `from` string, required
- `to` string, required
- `interval` string
- `limit` integer

## Response `200`

Success. See Deprecation + Sunset + Link headers.

- HistoryResponse: Response envelope for GET /v1/prices/history (DEPRECATED — use /v1/bars). IMPORTANT: This model is for OpenAPI documentation only. The handler returns JSONResponse directly; Pydantic validation does not run on the actual response (preserves byte-identical wire contract). Do not add fields here and expect them to appear in production responses without also updating the handler.
  - `symbol` string, required
  - `interval` string, required: One of "1d", "1h".
  - `from` string, required: ISO-8601 date or timestamp.
  - `to` string, required
  - `series` HistorySeriesEntry[], required
    - `date` string, required: Daily bars: "YYYY-MM-DD". Intraday bars: ISO-8601 UTC timestamp with Z suffix.
    - `open` string, nullable: Open price as decimal string.
    - `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: Always null in the current implementation (close-only legacy path).
    - `is_stale` boolean, required: True if the underlying data row was stale when fetched.
    - `is_closed` boolean, nullable: True = settled bar; False = currently-forming (provisional).
  - `meta` HistoryMeta, required: Meta block in HistoryResponse.
    - `tier` string, required
    - `count` integer, required
    - `ohlc_note` string, required

## Other responses

- `400`: Bad request.
- `401`: Authentication failed.
- `403`: The caller's tier does not allow this request.
- `422`: Validation Error
- `429`: Rate limit or quota exceeded. `error` is one of: `rate_limited` (keyless caller over the per-IP hourly cap, X-RateLimit-Scope anon-ip-hour), `rate_limit_exceeded` (API key over its per-minute limit, scope tier-rate-minute) or `quota_exceeded` (monthly quota used, scope tier-quota-month). Wait for Retry-After seconds before retrying; do not retry a monthly quota error automatically.
- `500`: The operation failed internally.
- `503`: A required backend or data source is temporarily unavailable.

## Changes

- **2026-08-18** `b7c4b36e1fa1`: 1 warning, 11 info
  - removed the optional property `detail` from the response with the `422` status
  - the endpoint scheme security `ApiKeyAuth` was added to the API
  - the endpoint scheme security `BearerAuth` was added to the API
  - added the media type `application/json` for the response with the status `400`
  - …8 more

[Operation history](https://skmtc.dev/goldprice/apis/gold-api/changes/v1/prices/history/get.md)

---

[API](https://skmtc.dev/goldprice/apis/gold-api.md) - [All operations](https://skmtc.dev/goldprice/apis/gold-api/llms.txt) - [OpenAPI document](https://skmtc.dev/goldprice/apis/gold-api/revisions/cb56f61da26c?raw)
