get_revenue_miners | R Documentation |
These functions grab the revenue in USD of blocks of miners. The revenue comes from fees and from block rewards. The function get_revenue_miners returns either jsut the aggregated (if get_agg is true) or all miner revenues. Individual miners revenue can be found using get_miner_rev and passing the name of the miner.
get_revenue_miners(
chain = "BTC",
since = NULL,
until = NULL,
frequency = "24h",
get_agg = TRUE,
currency = "USD",
api_key = Sys.getenv("GN_API_KEY"),
as_date = TRUE
)
get_miner_rev(
miner = "aggregated",
chain = "BTC",
since = NULL,
until = NULL,
frequency = "24h",
currency = "USD",
api_key = Sys.getenv("GN_API_KEY"),
as_date = TRUE
)
chain |
The chain to use ("BTC" or "ETH") |
since |
The date to start the extraction |
until |
The date to end the extraction |
frequency |
What frequency to pull (either "1h" or "24h") |
get_agg |
A logical for whether to get all miners |
currency |
Should the value be returned in "USD" or "NATIVE" |
api_key |
The API key. It defaults to the GN_API_KEY environmental variables |
as_date |
A logical whether to return a date object if the frequency is "24h" |
miner |
The name of the miner to use |
NOTE: Aggregated miner revenue is available for ETH and BTC but individual miner revenue is only available for BTC.
This returns a
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.