yfinance
yfinance copied to clipboard
Index Components
Hi, would it be possible to add functionality allowing access to an index's component stocks. So for example, a get_components() method for a Ticker for the S&P500 (^GSPC)? Thanks a lot!
It seems possible with utils.get_json(ticker_url + '/components', proxy, self.session) and then more specifically by extracting the components with data['components']['components'] at yfinance.utils line 108.