View source: R/get_lightening_network.R
get_lightning_network | R Documentation |
This function retrieves all available statistisc on the lightning network and returns them as a tidy data set.
get_lightning_network(
since = NULL,
until = NULL,
frequency = "24h",
currency = "USD",
api_key = Sys.getenv("GN_API_KEY"),
as_date = TRUE
)
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 |
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
A tidy data set of characteristics
## Not run:
# Need a valid API key to run
x <- get_lightning_network()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.