---
title: "Lightning Network statistics"
method: GET
path: "/api/v1/onchain/bitcoin/lightning/stats"
tags: ["Digital Economy and Infrastructure"]
---

# Lightning Network statistics

`GET /api/v1/onchain/bitcoin/lightning/stats`

Lightning Network aggregate stats - total channels, nodes, capacity (BTC), average fees. Intervals: latest, 24h, 3d, 1w, 1m, 3m, 6m, 1y, 2y, 3y.

## Query parameters

- `interval` string — Interval: latest, 24h, 3d, 1w, 1m, 3m, 6m, 1y, 2y, 3y

## Response `200`

Lightning Network aggregates for channels, nodes, capacity, and fees over the interval.

- EnvelopeMempoolLightningStatsData
  - `data` MempoolLightningStatsData, required
    - `interval` string, required — Reporting interval.
    - `stats` MempoolStats, required
      - `id` integer, required — Record identifier.
      - `added` string, required — Timestamp when this snapshot was added (ISO 8601 or Unix).
      - `channel_count` integer, required — Lightning channel count.
      - `node_count` integer, required — Lightning node count.
      - `total_capacity` integer, required — Total Lightning Network capacity (satoshi).
      - `tor_nodes` integer, required — Nodes reachable only over Tor.
      - `clearnet_nodes` integer, required — Nodes reachable on clearnet.
      - `unannounced_nodes` integer, required — Nodes that are not announced to the network.
      - `avg_capacity` integer, required — Average channel capacity (satoshi).
      - `avg_fee_rate` integer, required — Average proportional fee rate (ppm).
      - `avg_base_fee_mtokens` integer, required — Average base fee in millisatoshi.
      - `med_capacity` integer, required — Median channel capacity (satoshi).
      - `med_fee_rate` integer, required — Median proportional fee rate (ppm).
      - `med_base_fee_mtokens` integer, required — Median base fee in millisatoshi.
      - `clearnet_tor_nodes` integer, required — Nodes reachable on both clearnet and Tor.
  - `meta` SugraMeta, required — Metadata attached to every /api/v1/* response envelope.
    - `endpoint` string, required — Requested endpoint path.
    - `data_time` string, required — ISO 8601 UTC timestamp of the source data, not of the request.
    - `response_time` string, required — ISO 8601 UTC timestamp when this response was produced.
    - `provider` string, required — API name and version.
    - `source` string, nullable — Identifier of the primary upstream source used for this response.
    - `attribution` string, nullable — Human-readable attribution mandated by an upstream source (e.g. a securities regulator or self-regulatory organization). Present only on responses whose source requires the owner and source to be clearly identified. Do not remove or alter it when using the response.
    - `fallback_used` boolean, nullable — True when the primary source failed and a fallback produced the data.
    - `fallback_chain` string[], nullable — Ordered list of sources attempted, in the order they were tried.
    - `cached` boolean, nullable — True when this response was served from the internal cache.
    - `stale` boolean, nullable — True when the cached response was returned after the upstream rate-limited or errored. Clients can use this to detect degraded data.

## Other responses

- `401` — Missing or invalid `x-api-key` header.
- `422` — Validation Error
- `429` — Daily rate limit exceeded. Check `X-RateLimit-Reset` for the next window.
- `503` — Upstream source is temporarily unavailable. Retry after a short delay.

---

[API](https://skmtc.net/sugra/apis/sugra-api.md) · [All operations](https://skmtc.net/sugra/apis/sugra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sugra/sugra-api/versions/dcf7427e6897/schema)
