BTC Lightning Network Statistics
This namespace contains endpoints to retrieve statistics on Lightning Network. We provide certain metrics such as the number of channel, nodes and network capacity from lightning network. For more detailed information, please refer to the description of each metric.
Lightning Network Statistics contains various metrics which are calculated from lightning network.
Supported Stats
network_capacity
The total network capacity (sum of balances available across all lightning payment channels) (BTC)
network_capacity_usd
The total network capacity (sum of balances available across all lightning payment channels) (USD)
capacity_per_channel_mean
The average channel capacity (BTC)
capacity_per_channel_mean_usd
The average channel capacity (USD)
capacity_per_node_mean
The average node capacity (BTC)
capacity_per_node_mean_usd
The average node capacity (USD)
number_of_node
The total number of available nodes (Number)
number_of_channel
The total number of available payment channels (Number)
channel_per_node_mean
The average number of channels per node (Number)
node_age_days
The average day of duration of nodes (Number)
channel_age_days
The average day of duration of channels (Number)
base_fee_median
The median base fee of transactions (Sat)
base_fee_median_usd
The median base fee of transactions (USD)
fee_rate_median
The median fee rates of transactions (Sat)
fee_rate_median_usd
The median fee rates of transactions (USD)
Supported Windows
hour, day*
(*) Default
For each API request, include this HTTP header:
Authorization with the Bearer {access_token}. Bearer access token is the type of HTTP Authorization. You have to include access token to the HTTP header and note that leading bearer is required.
You must include your access token in HTTP header in every request you make. The token is unique, issued for each client, and regularly changed(once a year). To obtain an access token, please upgrade your plan to Professional or Premium plan. You'll be able to see your access token on the API tab of your profile page after the subscription.
Currently, we support day and hour.
dayExample: dayThis defines the starting time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the earliest time.
20191001T100000This defines the ending time for which data will be gathered, formatted as YYYYMMDDTHHMMSS (indicating YYYY-MM-DDTHH:MM:SS, UTC time). If window=day is used, it can also be formatted as YYYYMMDD (date). If window=block is used, you can also specify the exact block height (e.g. 510000). If this field is not specified, response will include data from the latest time.
20191001T103025The maximum number of entries to return before the latest data point (or before to if specified). This field ranges from 1 to 100,000.
100Example: 100A format type about return message type. Supported formats are json, csv.
jsonExample: jsonBTC Lightning Network Stats
curl "https://api.cryptoquant.com/v1/btc/lightning/stats-in-total?window=day&limit=2"BTC Lightning Network Stats
{
"status": {
"code": 200,
"message": "success"
},
"result": {
"window": "day",
"data": [
{
"datetime": "2019-10-02",
"metric_type": "tx_count",
"metric_unit": "number",
"result": {
"network_capacity": null,
"network_capacity_usd": null,
"capacity_per_channel_mean": null,
"capacity_per_channel_mean_usd": null,
"capacity_per_node_mean": null,
"capacity_per_node_mean_usd": null,
"number_of_node": null,
"number_of_channel": null,
"channel_per_node_mean": null,
"node_age_days": null,
"channel_age_days": null,
"base_fee_median": null,
"base_fee_median_usd": null,
"fee_rate_median": null,
"fee_rate_median_usd": null
}
}
]
}
}Last updated
Was this helpful?