R/symbols.R

#' Currency symbols
#'
#' Returns a tibble with the symbol and name of all currencies available
#' through the Fixer API.
#'
#' @export
fixer_symbols <- function() {
  query <- paste0(fixer_url, "symbols?access_key=", fixer_api_key())

  symbols <- fromJSON(query, flatten = TRUE)

  symbols <- success_check(symbols)

  df <- tibble::enframe(symbols$symbols)

  df$value <- as.character(df$value)

  df
}

Try the fixerapi package in your browser

Any scripts or data that you put into this service are public.

fixerapi documentation built on May 2, 2019, 10:32 a.m.