---
title: "Blockchain Metric Data"
method: GET
path: "/v1/blockchain/{metric_id}"
tags: ["Blockchain Metrics"]
---

# Blockchain Metric Data

`GET /v1/blockchain/{metric_id}`

## 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/blockchain/{metric_id}`
- Auth: none declared

Retrieves time-series data for blockchain-level metrics stored in the unified `metric_data` table.

The response uses the metric's own field name as the JSON key (e.g., `block_height`) for frontend compatibility.

Available metrics: `block_height` (more coming soon).

## Path parameters

- `metric_id` string, required: Metric ID (e.g., 'block_height')

## Query parameters

- `start_date` string, date, nullable: Start date (YYYY-MM-DD)
- `end_date` string, date, nullable: End date (YYYY-MM-DD)
- `limit` integer: Number of records to return
- `fields` string, nullable: Comma-separated field names to include (date columns always kept)

## Response `200`

Successful Response

- ApiResponse: Standard API response model
  - `success` boolean, required
  - `data` unknown, required
  - `message` string, nullable
  - `count` integer, nullable
  - `timestamp` string, date-time

## Other responses

- `422`: Validation Error

---

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