get_crypto_quotes {coinmarketcapr}R Documentation

Get market quotes

Description

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

Usage

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

Other Cryptocurrencies: get_crypto_listings(), get_crypto_map(), get_crypto_marketpairs(), get_crypto_meta(), get_crypto_ohlcv(), get_marketcap_ticker_all(), get_valid_currencies()

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")

## End(Not run)

[Package coinmarketcapr version 0.4 Index]