Description Usage Arguments Details Value Examples
View source: R/coin_history_snapshot.R
Coin-specific market data for a given historical date
1 | coin_history_snapshot(coin_id, date, vs_currencies = "usd", max_attempts = 3)
|
coin_id |
(character): ID of the coin of interest or a vector with several IDs.
The maximum number of coins that can be queried simultaneously is 30.
An up-to-date list of supported coins and their IDs can be retrieved
with the |
date |
(Date): date of interest. If no data exist for the requested
date, nothing ( |
vs_currencies |
(character): a vector with
names of the reference currencies to express the price in, e.g.
|
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. |
This function is based on the public CoinGecko API, which has a limit of 50 calls per minute. Please keep this limit in mind when developing your applications.
A tibble with the following columns:
coin_id
(character): same as the argument coin_id
;
symbol
(character): symbol of the coin;
name
(character): common name of the coin;
date
(Date): same as the argument date
;
vs_currency
(character): reference currency, in which the price
is expressed (ordered alphabetically);
price
(double): price of the coin;
market_cap
(double): market capitalisation of the coin;
total_volume
(double): total trading volume recorded on that date
.
1 2 3 4 5 6 | r <- coin_history_snapshot(
coin_id = "cardano",
date = as.Date("2021-05-01"),
vs_currencies = c("usd", "eth")
)
print(r)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.