Get the latest/historical market quotes for 1 or more cryptocurrencies

get_crypto_quotes(currency = "USD", symbol = NULL, slug = NULL,
  id = NULL, latest = TRUE, ...)

Arguments

currency

currency code - Default is 'USD'

symbol

One or more cryptocurrency symbols. Example: c("BTC","ETH").

slug

Alternatively pass a vector of exchange slugs. Example: c("binance","cryptsy")

id

Alternatively pass one or more CoinMarketCap cryptocurrency IDs. Example: c(1,2)

latest

If `TRUE` (default), only the latest data is retrieved, otherwise historical data is returned. (NOTE: Historic Data require higher API rights)

...

Further arguments can be passed to historical data. Further information can be found in the API documentation

Value

A dataframe with the latest market quote for 1 or more cryptocurrencies

Note

At least one "id" or "slug" or "symbol" is required for this request.

References

API documentation

See also

Examples

# NOT RUN {
get_crypto_quotes()
get_crypto_quotes(symbol="ETH")
get_crypto_quotes(symbol=c("ETH","BTC"))
get_crypto_quotes(slug=c("litecoin","dogecoin"))
get_crypto_quotes("EUR", id=c(3,4))
get_crypto_quotes(latest = FALSE, symbol = c("BTC","ETH"),
                  time_start = Sys.Date()-180, time_end=Sys.Date(), count = 10,
                  interval = "30m")
# }