Chart Snapshots

Render chart snapshot

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).

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

Query parameters

metricstring nullable

Single metric ID

Example:price
metricsstring nullable

Comma-separated metric IDs (max 6)

Example:lth_supply,sth_supply
templatestring nullable

Chart template ID

Example:mvrv_ratio
daysinteger

Days of history (default 365)

start_datestring nullable

Start date (YYYY-MM-DD)

Example:2024-01-01
end_datestring nullable

End date (YYYY-MM-DD)

Example:2025-12-31
stylestring nullable

Chart style: line, area, bar

scalestring

Y-axis scale: linear or log

overlaystring nullable

Add price overlay as a subtle dashed line on the right axis (use 'price')

widthinteger

Image width in pixels (default 1200)

heightinteger

Image height in pixels (default 600)

titlestring nullable

Custom chart title (auto-generated if omitted)

themestring

Color theme: light or dark

warmup_daysinteger

Extra days before start_date for formula rolling window warmup (0-730)

Response

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

object required

Changes

No recorded changes to this operation across all 1 revision of this API.