get_lightning_network: Get statistics on the Lightning Network

View source: R/get_lightening_network.R

get_lightning_networkR Documentation

Get statistics on the Lightning Network

Description

This function retrieves all available statistisc on the lightning network and returns them as a tidy data set.

Usage

get_lightning_network(
  since = NULL,
  until = NULL,
  frequency = "24h",
  currency = "USD",
  api_key = Sys.getenv("GN_API_KEY"),
  as_date = TRUE
)

Arguments

since, until

A POSIX compatible value that will be converted to a unix data number

frequency

What resolution to use. See API docs for possible values. The default is "24h" (daily)

currency

What currency to use. Choices are "USD" or "NATIVE"

api_key

The api key used to retrieve the data

as_date

A logical for turning the datatime object returned to a date object if it is daily data

Details

The specific functions it returns are: - Mean channel size (channel_size_mean) - Median channel size (channel_size_median) - Total capacity of the network (network_capacity_sum) - The total number of channels (channels_count) - The total number of nodes (nodes_count) - Lightning network median base fee (fee_base_median) - Lightning netowrk fee rate (fee_rate_median) - Network Gini capacity distribution (gini_capacity) - Network Gini Channel Distribution (gini_channel) - Network node connectivity (node_connectivity) The default is to return the value amounts as USD unless "NATIVE" is chosen for currency

Value

A tidy data set of characteristics

Examples

## Not run: 
# Need a valid API key to run
x <- get_lightning_network()

## End(Not run)

James-Crypto-Research/GlassnodeR documentation built on Feb. 24, 2025, 3:21 p.m.