get_summary {cryptowatchR} | R Documentation |
Get 24-hour summary of cryptocurrencies
Description
Get 24-hour summary of cryptocurrencies using the REST API of cryptowat.ch. The route is summary or summaries and returns the current 24-hour summary of a given pair or a summary of all pairs. See https://docs.cryptowat.ch/rest-api/markets/summary for further information.
Usage
get_summary(pair, keyBy = NULL, exchange = "kraken", api_key = NULL, allowance = FALSE)
Arguments
pair |
A character string containing a pair symbol, e.g. btcusd (required argument). Run |
keyBy |
A single character string. Possible values are are either id or symbols. |
exchange |
A character string containing the exchange. Default is kraken. Run |
api_key |
A character string containing the API key. See https://docs.cryptowat.ch/rest-api/rate-limit to learn how to create an account and how to generate an API key. |
allowance |
A logical (default is |
Value
Current 24-hour summary of a given pair of currencies. If allowance is TRUE
, get_summary()
returns a list with additional information on allowances.
References
See https://docs.cryptowat.ch/rest-api for further information.
See Also
get_markets
, get_current_price
, get_exchanges
, get_pairs
Examples
## Not run:
# 24h-hour summary of cryptocurrency pairs
summary <- get_summary("btcusd")
summaries <- get_summary()
summaries2 <- get_summary(keyBy = "id")
summaries3 <- get_summary(keyBy = "symbols")
## End(Not run)