get_revenue_miners: Get revenue (fee and block reward) for miners

View source: R/mining.R

get_revenue_minersR Documentation

Get revenue (fee and block reward) for miners

Description

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.

Usage

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
)

Arguments

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

Details

NOTE: Aggregated miner revenue is available for ETH and BTC but individual miner revenue is only available for BTC.

Value

This returns a


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