Render custom chart snapshot
Render a fully customized chart snapshot from a JSON body. Returns PNG, SVG, or JSON.
Designed for AI agents (MCP), automated pipelines, and advanced users. Supports per-metric styling, custom Y-axes, formulas (SMA, EMA, ratios), dark theme, stack groups, and stroke patterns.
metrics field supports mixed types:
- Strings (shorthand): ["price", "lth_supply"]
- Objects (full config): [{"id": "price", "axis": "right", "style": "line"}]
- Mixed: ["price", {"id": "lth_supply", "axis": "left", "style": "area"}]
Output format is controlled via the format field or Accept header:
- "png" (default) — PNG image
- "svg" — SVG vector graphic
- "json" — chart metadata (no image rendered)
All fields except metrics (or metric/template) are optional with smart defaults.
Formula warmup: When using formulas with rolling windows, set warmup_days (0-730) to the largest rolling window period used. Extra data is fetched before the display range and trimmed after evaluation.
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
Request body
Response
Chart image (PNG/SVG) or JSON metadata, depending on format field or Accept header
Changes
No recorded changes to this operation across all 1 revision of this API.