Return the latest/historical OHLCV (Open, High, Low, Close, Volume) market values for one or more cryptocurrencies for the current UTC day. Since the current UTC day is still active these values are updated frequently. You can find the final calculated OHLCV values for the last completed UTC day along with all historic days using /cryptocurrency/ohlcv/historical.

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

Arguments

currency

currency code - Default is 'USD'

latest

If `TRUE` (default), only the latest data is retrieved, otherwise historical data is returned.

symbol

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

id

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

...

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

Value

A dataframe with OHLCV values

Note

One of "id" or "symbol" is required for this request.

References

API documentation

See also

Examples

# NOT RUN {
get_crypto_ohlcv("EUR")
get_crypto_ohlcv("EUR", latest = F)
get_crypto_ohlcv("EUR", latest = F, time_period = "hourly",
                 time_start=Sys.Date()-180, count=5, interval="monthly")
# }