Open bennycode opened 7 years ago
You need to feed it with some exchange rate data and provide a base currency. For example
fx.base = "USD";
fx.rates = {
"EUR" : 0.745101, // eg. 1 USD === 0.745101 EUR
"GBP" : 0.647710, // etc...
"HKD" : 7.781919,
"USD" : 1, // always include the base rate (1:1)
/* etc */
}
Open Exchange Rates has an API to get these information. (Limited to 1,000 requests/month for a free account).
Today I ran
npm i --save money
and tried to get it to work in my Node.js application:Unfortunately, all I get is this: