This is the finance grabber. It relies on the rapid api call.
net.pieroxy.conkw.webapp.grabbers.yahooFinance.YahooFinanceGrabberyahoofIn order to use it, you need to:
Note that if you want to extract more stock prices, you need to create one instance of this extractor per stock price you want.
Note that the basic plan is limited to 500 requests per month, which amounts roughly to 1 request every two hours. Note again that if you use several grabbers with the same token, they will all count against the same 500rq/month quota. Hence, the default refresh rate has been set to once every 5 hours. Adjust this value as you see fit.
Here is the sample config portion:
{
"implementation": "net.pieroxy.conkw.webapp.grabbers.yahooFinance.YahooFinanceGrabber",
"name":"apple",
"config": {
"ttl":"5h", // Adjust as you see fit.
"symbol":"AAPL",
"region":"US",
"key":"your yahoo finance rapidapi key here"
}
},
As this is a TimeThrottledGrabber, you can define ttl and errorTtl. See here for more details. The default ttl is 5 hours.
num.priceAvg50Days: The average price in the last 50 days.num.price: The current price.num.change: The daily change, in local currency.num.changeprc: The daily change in %.str.marketCapFmt: The total market valuation for the symbol, formatted.
str.name: The human readable name for the symbol.str.currencySymbol: The symbol of the local currency (used for price and changes).str.currency: The currency used for price and changes.There are a lot of metrics in the API that are not extracted, such as volume, hints, exchange symbol, etc ...
If you need them, please provide a pull request or just open an issue. For reference, here is the playground for the api.