R/get_trx_ohlc_data_for_last_n_days.R
get_trx_ohlc_data_for_last_n_days.Rd
Retrieves TRX open-high-low-close price data for the last n
days
get_trx_ohlc_data_for_last_n_days(vs_currency = "usd", days, max_attempts = 3L)
vs_currency | (character): name of the base currency to benchmark TRX
against ( |
---|---|
days | (numeric or |
max_attempts | function_params("max_attempts") |
A tibble with the following columns:
timestamp
(POSIXct): timestamp;
vs_currency
(character): same as the argument vs_currency
;
price_open
(double): TRX price in the beginning of a time iterval;
price_high
(double): highest TRX price observed within a time interval;
price_low
(double): lowest TRX price observed within a time interval;
price_close
(double): TRX price in the end of a time interval.
Granularity of the retrieved data
(i.e. candle's
body) depends on the number of requested days
as follows:
1 day: 30 minutes
7 - 30 days: 4 hours
31 and above: 4 days
#> # A tibble: 43 x 6 #> timestamp vs_currency price_open price_high price_low price_close #> <dttm> <chr> <dbl> <dbl> <dbl> <dbl> #> 1 2021-07-06 00:00:00 usd 0.0654 0.0654 0.0654 0.0654 #> 2 2021-07-06 04:00:00 usd 0.0649 0.0656 0.0649 0.065 #> 3 2021-07-06 08:00:00 usd 0.0651 0.0663 0.0651 0.0662 #> 4 2021-07-06 12:00:00 usd 0.0664 0.0664 0.0649 0.0649 #> 5 2021-07-06 16:00:00 usd 0.0656 0.0658 0.0648 0.0648 #> 6 2021-07-06 20:00:00 usd 0.0649 0.0649 0.0646 0.0648 #> 7 2021-07-07 00:00:00 usd 0.0648 0.0648 0.0642 0.0647 #> 8 2021-07-07 04:00:00 usd 0.0650 0.0651 0.0648 0.0650 #> 9 2021-07-07 08:00:00 usd 0.0654 0.0657 0.0654 0.0656 #> 10 2021-07-07 12:00:00 usd 0.0656 0.0658 0.0656 0.0657 #> # … with 33 more rows