exchange-rates-trial
v1.0.4
Published
Exchange rates and currency converter
Downloads
2
Maintainers
Readme
Currency Exchange Rate Library
Using European Central Bank Data (https://www.ecb.europa.eu/stats/eurofxref/eurofxref-hist-90d.xml)
Installation
npm install exchange-rates-trial
Example
const exchange = require("exchange-rates");
Usage
Get currency1's exchange reate in currency2
exchange.exchangeRate(date, currency1, currency2)
Get the amount of currency2 you could exchange for the specified amount of currency1
exchange.convert(date, currency1, currency2, amount)
Date Must be in format: "YYYY-MM-DD"
Currency Codes
(All currency arguments must be the currencies' abbreviation)
EUR
USD
JPY
BGN
CZK
DKK
GBP
HUF
PLN
RON
SEK
CHF
ISK
NOK
HRK
RUB
TRY
AUD
BRL
CAD
CNY
HKD
IDR
ILS
INR
KRW
MXN
MYR
NZD
PHP
SGD
THB
ZAR