R/get_trx_market_data_for_date.R
get_trx_market_data_for_date.Rd
Retrieves TRX market data for a specific date (price, market cap, high/low, etc.)
get_trx_market_data_for_date( date, vs_currencies = c("usd", "eur"), max_attempts = 3L )
date | (character, Date or POSIXct): date to retrieve the data for.
Expected format: |
---|---|
vs_currencies | (character): a vector with
names of the base currencies to benchmark TRX against, e.g.
|
max_attempts | (integer, positive): specifies the
maximum number of additional attempts to call a URL if the
first attempt fails (i.e. its call status is different from
|
A tibble with as many rows as the length of vs_currencies
and
the following columns:
date
(Date): same as date
;
vs_currency
(character): same as vs_currencies
;
market_cap
(double): market cap as of date
;
total_trading_vol
(double): total trading volume on date
;
price
(double): average price on date
.
#> # A tibble: 2 x 5 #> date vs_currency market_cap total_trading_vol price #> <date> <chr> <dbl> <dbl> <dbl> #> 1 2021-07-11 usd 4416356903. 794567260. 0.0616 #> 2 2021-07-11 eur 3718413524. 668997029. 0.0519