Classes
Methods
(inner) convert(amount, fromCurrency, toCurrency, dateopt) → {number}
Convert the given amount from one currency to another using the exchange rate of the given date
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
amount |
number
|
The amount to convert |
||
fromCurrency |
string
|
Which currency to convert from |
||
toCurrency |
string
|
Which currency to convert to |
||
date |
Date
|
string
|
<optional> |
'latest' |
The date to request the historic rate (if omitted, defaults to 'latest') |
Returns:
- Type:
-
number
The converted amount