---
title: "BTC price history"
method: GET
path: "/v1/market/price-history"
tags: ["market"]
---

# BTC price history

`GET /v1/market/price-history`

## Request

- Base URL: `https://satoshidata.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://satoshidata.ai/v1/market/price-history`
- Auth: none declared

Free cached BTC price-history rows for wallet charts and market context. Rows use the [timestamp_ms, open, high, low, close] candle-compatible shape; buckets with one upstream market_chart sample are close-derived rather than exchange OHLC.

## Query parameters

- `range` '24h' | '1d' | '7d' | '30d' | '90d' | '365d' | 'all': Requested BTC history window. 24h is accepted as a compatibility alias for 1d.
- `include_indicators` boolean: Return chart overlays such as STH realized price alongside the candle array.

## Response `200`

BTC price history

- union
  - array[]
    - number[]
  - PriceHistoryIndicatorsResponse
    - `candles` array[]
      - number[]
    - `sth_realized_price` PriceHistoryIndicatorPoint[]
      - `ts` integer, required: UTC epoch milliseconds, aligned with price-history candle timestamps.
      - `value` number, required
    - `as_of` string, nullable: Candle history end date for this response. STH overlay freshness lives in _meta.sth_realized_price_as_of.
    - `source` string, nullable
    - `range` string, required
    - `_meta` object: Includes candle date bounds, STH realized-price source, STH as_of, freshness status, and warnings.
    - `beta` boolean, nullable

## Other responses

- `400`: Bad request.
- `404`: Resource not found.
- `405`: Method not allowed.
- `422`: Request validation failed.

---

[API](https://skmtc.dev/satoshidata/apis/satoshidata-agent-api.md) · [All operations](https://skmtc.dev/satoshidata/apis/satoshidata-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/satoshidata/apis/satoshidata-agent-api/revisions/9fc9edc41ac4?raw)
