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).
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
Single metric ID
Comma-separated metric IDs (max 6)
Chart template ID
Days of history (default 365)
Start date (YYYY-MM-DD)
End date (YYYY-MM-DD)
Chart style: line, area, bar
Y-axis scale: linear or log
Add price overlay as a subtle dashed line on the right axis (use 'price')
Image width in pixels (default 1200)
Image height in pixels (default 600)
Custom chart title (auto-generated if omitted)
Color theme: light or dark
Extra days before start_date for formula rolling window warmup (0-730)
Response
Chart image (PNG/SVG) or JSON metadata, depending on Accept header
Changes
No recorded changes to this operation across all 1 revision of this API.