trending_coins: Trending coins

View source: R/trending_coins.R

trending_coinsR Documentation

Trending coins

Description

Retrieves top-7 coins on CoinGecko according to their search popularity

Usage

trending_coins(max_attempts = 3)

Arguments

max_attempts

(double, positive): specifies the maximum number of attempts to call the CoinGecko API (e.g., if the first call fails for some reason). Additional attempts are implemented with an exponential backoff. Defaults to 3.

Details

Popularity of a coin is determined from search patterns at the CoinGecko website over the last 24 hours.

This function is based on the public CoinGecko API, which has a rate limit of 10-30 calls per minute. Please keep this limit in mind when developing your applications.

Value

If the API call succeeds, the function returns a tibble with the following columns:

  • timestamp (POSIXct): date and time of the API request;

  • popularity_rank_24h (integer): popularity rank in the last 24 hours;

  • coin_id (character): coin ID;

  • name (character): common name of the coin;

  • symbol (character): symbol of the coin;

  • market_cap_rank (integer): market capitalisation rank;

  • price_btc (double): price expressed in Bitcoin.

Examples


r <- trending_coins()
print(r)


next-game-solutions/geckor documentation built on April 27, 2023, 10:59 a.m.