API Reference
Welcome to the Blocklens API! Our API provides programmatic access to 210+ on-chain metrics — the same high-fidelity data that powers our web dashboards. It's built for professional traders, analysts, funds, and developers who need reliable, consistent data for their models, research, and applications.
Getting Started
To get started with the Blocklens API, you will need an API Key. Access to the API is available to users on our paid subscription plans.
- Subscribe: Upgrade to a plan allowing API access on our Pricing Page.
- Generate a Key: Navigate to the API Keys section of your account dashboard to create your first key.
- Authenticate: Include your API key in the
Authorizationheader of your requests.
For full details, please see the Authentication guide.
Chart Snapshot API
The Snapshot API lets you render on-chain analytics charts as PNG images, SVG vector graphics, or JSON metadata — all via a single endpoint.
# Simple: render a BTC price chart
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.blocklens.co/v1/chart/snapshot?metric=price" -o chart.png
# Template: MVRV ratio with dark theme
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.blocklens.co/v1/chart/snapshot?template=mvrv_ratio&theme=dark" -o mvrv.png
Use pre-built templates for common charts, or the POST endpoint for full customization (per-metric styling, formulas, custom axes, heatmaps, cycle performance overlays). The MCP Server uses this API under the hood for the render_chart tool.
See the full Snapshot API documentation for all parameters, templates, and examples.
API Philosophy
Our API is designed with the following principles in mind:
- Consistency: Endpoint structures and data schemas are designed to be predictable and consistent across all supported networks.
- Performance: We optimize our infrastructure to deliver low-latency responses for time-sensitive queries.
- Clarity: Our documentation and data fields are named clearly to be self-explanatory.
- Reliability: We build for high uptime and provide a transparent Changelog for all updates.