---
title: "Render chart snapshot"
method: GET
path: "/v1/chart/snapshot"
tags: ["Chart Snapshots"]
---

# Render chart snapshot

`GET /v1/chart/snapshot`

## Request

- Base URL: `https://api.blocklens.co` (the document declares no server; this is the origin it was published from)
- URL: `https://api.blocklens.co/v1/chart/snapshot`
- Auth: none declared

Render an on-chain analytics chart as a PNG image, SVG vector graphic, or JSON metadata.

Provide exactly one of: `metric` (single), `metrics` (comma-separated), or `template`.

**Output format** is controlled via the `Accept` header:
- `image/png` (default) — PNG image
- `image/svg+xml` — SVG vector graphic
- `application/json` — chart metadata (no image rendered)

**Examples:**
- `GET /v1/chart/snapshot?metric=price` — BTC price chart
- `GET /v1/chart/snapshot?metrics=lth_supply,sth_supply&style=area&days=730` — multi-metric area chart
- `GET /v1/chart/snapshot?template=mvrv_ratio&theme=dark` — dark-themed MVRV template

**Access:** Requires Pro or Enterprise tier. Rate limits: 60/hour (Pro), 300/hour (Enterprise).

Smart defaults: colors, axis placement, chart styles, and titles are auto-configured from the metrics registry.

**Formula warmup:** When using formulas with rolling windows (e.g., `sma(m1, 200)`), set `warmup_days` to
the rolling window period. This fetches extra historical data before the start date so that formula values
are computed from the very first displayed data point (instead of showing nulls).

## Query parameters

- `metric` string, nullable: Single metric ID
- `metrics` string, nullable: Comma-separated metric IDs (max 6)
- `template` string, nullable: Chart template ID
- `days` integer: Days of history (default 365)
- `start_date` string, nullable: Start date (YYYY-MM-DD)
- `end_date` string, nullable: End date (YYYY-MM-DD)
- `style` string, nullable: Chart style: line, area, bar
- `scale` string: Y-axis scale: linear or log
- `overlay` string, nullable: Add price overlay as a subtle dashed line on the right axis (use 'price')
- `width` integer: Image width in pixels (default 1200)
- `height` integer: Image height in pixels (default 600)
- `title` string, nullable: Custom chart title (auto-generated if omitted)
- `theme` string: Color theme: light or dark
- `warmup_days` integer: Extra days before start_date for formula rolling window warmup (0-730)

## Response `200`

Chart image (PNG/SVG) or JSON metadata, depending on Accept header

- object

## Other responses

- `400`: Invalid parameters (e.g., unknown metric, conflicting inputs)
- `401`: Missing or invalid API key
- `403`: Requires Pro+ tier, or insufficient grade for requested metrics
- `422`: Validation Error
- `429`: Snapshot rate limit exceeded (per-tier hourly limit)
- `504`: Chart rendering timed out — try a shorter date range

---

[API](https://skmtc.dev/blocklens/apis/blocklens-on-chain-api.md) · [All operations](https://skmtc.dev/blocklens/apis/blocklens-on-chain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/blocklens/apis/blocklens-on-chain-api/revisions/dacc02ae0f9a?raw)
