get_crypto_quotes: Get market quotes

Description Usage Arguments Value Note References Examples

View source: R/currencies.R

Description

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

Usage

1
2
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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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)

trafficonese/coinmarketcap_v2 documentation built on Nov. 5, 2019, 10:57 a.m.