google-finance-quote
Node Google Finance API wrapper for free.
No API key is required!
Note: This results may vary by up to 20 minutes.
Usage
Get Started
const { Finance, symbols } = require("google-finance-quote");
console.log(symbols);
const finance = new Finance();
finance
.setFrom('USD');
.setTo('JPY');
(async () => {
console.log(await finance.quote());
})();
Class
Finance({ from?:string, to?:string, proxy?:object })
Functions
-
.setFrom(from: string)
Set the parameter of from.
-
.setTo(to: string)
Set the parameter of to.
-
.getParam(): object
Returns the current param.
-
.quote(amount?: number): Promise<{ success: boolean, rate: number }>
Returns the converted amount based on the exchange rate.
Note: If the current rate cannot be obtained due to rate limits or network errors, success: false is returned.
Get Support