fixer_convert: Convert currencies

Description Usage Arguments Value Examples

Description

Convert from one currency to another, on a given date or using the latest available exchange rates.

Currency conversion is available on all paid plans.

Usage

1
fixer_convert(from, to, amount = 1, date = NULL)

Arguments

from

Symbol of currency to convert from.

to

Symbol of currency to convert to.

amount

The numeric value of the from currency to convert. Defaults to 1, and accepts integers greater than 0 and less than 100000.

date

Optional variable. A date in YYYY-MM-DD format, or any value that can be coerced to YYYY-MM-DD format with as.Date(). Defaults to NULL, which returns the latest conversion data.

Value

A list containing the value of the conversion, the exchange rate and the date and time of the currency conversion.

Examples

1
2
3
4
5
6
7
8
9
## Not run: 

x <- fixer_convert(from = "GBP", to = "JPY", amount = 25)

y <- fixer_convert(from = "GBP", to = "JPY",
                   amount = 25, date = "2018-05-05")


## End(Not run)

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