Overview

Daily rollups of canonical Stacks chain activity: how many blocks were produced, the average block-time gap, and how many reorgs were detected.

Computed on demand from blocks and chain_reorgs. No decoder, no separate aggregation table yet — small enough to derive in the request path.


API

GET /v1/datasets/network-health/summary?days=30

Returns one row per UTC date covered by the requested window. Default 30 days, max 365.

curl "https://api.secondlayer.dev/v1/datasets/network-health/summary?days=7"
{
  "days": [
    {
      "date": "2026-05-05",
      "block_count": 8602,
      "avg_block_time_seconds": 10.04,
      "reorg_count": 0
    }
  ],
  "tip": { "block_height": 7501982 }
}

Schema

ColumnTypeDescription
datestringUTC calendar date, YYYY-MM-DD
block_countnumberCanonical Stacks blocks produced that day
avg_block_time_secondsnumber | nullAverage gap between consecutive canonical blocks
reorg_countnumberReorgs detected by the indexer that day (rows in chain_reorgs)

Notes

  • v0 has no parquet path. The dataset is small (~1 row per day) and cheap to recompute. Parquet export will land alongside other datasets if there is real demand.
  • Reorg detection is the Stacks Streams indexer's view; it counts any time a previously-canonical block was orphaned in favor of a longer fork.
  • Block time gaps span fast blocks (~10s) plus tenure boundaries. Expect averages near 10s; spikes correlate with miner outages or Bitcoin block delays.