Retrieves the current market data for TRX (price, market cap, high/low, etc.)

get_current_trx_market_data(vs_currencies = c("usd", "eur"), max_attempts = 3L)

Arguments

vs_currencies

(character): a vector with names of the base currencies to benchmark TRX against, e.g. c("usd", "eur", "btc"). An up-to-date list of supported currencies (both fiat and cryptocurrencies) can be retrieved with the get_supported_coingecko_currencies() function. If vs_currencies contains at least one unsupported currency, the call will fail with the respective error message.

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 200). Additional attempts are implemented with an exponential backoff. Defaults to 3.

Value

A tibble with as many rows as the length of vs_currencies. Please refer to the "Methodology" page on the CoinGecko website for definitions of variables in this tibble.

Examples

r <- get_current_trx_market_data(vs_currencies = c("usd", "eur")) print(r)
#> # A tibble: 2 x 34 #> last_updated_at total_supply circulating_supply vs_currency market_cap #> <dttm> <dbl> <dbl> <chr> <dbl> #> 1 2021-07-12 22:03:08 100850743812 71660220128 usd 4323975921 #> 2 2021-07-12 22:03:08 100850743812 71660220128 eur 3645293309 #> # … with 29 more variables: market_cap_rank <int>, market_cap_change_24h <dbl>, #> # market_cap_percentage_change_24h <dbl>, total_trading_vol_24h <dbl>, #> # current_price <dbl>, price_high_24h <dbl>, price_low_24h <dbl>, #> # price_change_24h <dbl>, price_percentage_change_24h <dbl>, #> # price_percentage_change_7d <dbl>, price_percentage_change_14d <dbl>, #> # price_percentage_change_30d <dbl>, price_percentage_change_60d <dbl>, #> # price_percentage_change_200d <dbl>, price_percentage_change_1y <dbl>, #> # ath <dbl>, ath_change_percentage <dbl>, ath_date <dttm>, atl <dbl>, #> # atl_change_percentage <dbl>, atl_date <dttm>, coingecko_rank <int>, #> # coingecko_score <dbl>, developer_score <dbl>, community_score <dbl>, #> # liquidity_score <dbl>, public_interest_score <dbl>, #> # sentiment_votes_up_percentage <dbl>, sentiment_votes_down_percentage <dbl>