get_crypto_ohlcv | R Documentation |
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, ... )
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 |
A dataframe with OHLCV values
One of "id" or "symbol" is required for this request.
Other Cryptocurrencies:
get_crypto_listings()
,
get_crypto_map()
,
get_crypto_marketpairs()
,
get_crypto_meta()
,
get_crypto_quotes()
,
get_marketcap_ticker_all()
,
get_valid_currencies()
## 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") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.