https://github.com/otoneko1102/google-finance-quote
Node Google Finance API wrapper for free. No API key is required!
https://github.com/otoneko1102/google-finance-quote
api exchange finance free google nodejs npm package quote rate
Last synced: 3 months ago
JSON representation
Node Google Finance API wrapper for free. No API key is required!
- Host: GitHub
- URL: https://github.com/otoneko1102/google-finance-quote
- Owner: otoneko1102
- Created: 2024-10-22T08:47:38.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-02-13T15:37:04.000Z (4 months ago)
- Last Synced: 2025-03-16T16:46:27.119Z (3 months ago)
- Topics: api, exchange, finance, free, google, nodejs, npm, package, quote, rate
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/google-finance-quote
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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
```js
const { Finance, symbols, currencyCodesSymbols, cryptoCurrencyCodesSymbols } = require("google-finance-quote");console.log(symbols); // Returns available symbols.
console.log(currencyCodesSymbols); // Returns available currency codes symbols.
console.log(cryptoCurrencyCodesSymbols); // Returns available crypto currency codes symbols.const finance = new Finance(); // You can use this: new Finance({ from 'USD', to: 'JPY' });
// You can use http(s) proxies.
/*
const proxy = {
host: 'example.com',
port: 2000,
protocol: 'http'
}
const finance = new Finance({ proxy });
*/finance
.setFrom('USD');
.setTo('JPY');(async () => {
console.log(await finance.quote()); // { success: true, rate: 150.94225699999998 }
})();
```
### 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![]()