ranaroussi / yfinance

Download market data from Yahoo! Finance's API
https://aroussi.com/post/python-yahoo-finance
Apache License 2.0
13.13k stars 2.33k forks source link

Retrieve more ETF data #422

Open pieterjandotpy opened 4 years ago

pieterjandotpy commented 4 years ago

I would like to retrieve more data from ETFs, in specific the sector weightings (%) of a specific ETF, found in the tab Holdings on the Yahoo website: https://finance.yahoo.com/quote/IWDA.AS/holdings?p=IWDA.AS

Is this possible in the current API? If not, does someone know how I could add this to the API? I'm guessing it would be in base.py, but I'm not sure where. All help is welcome!

yoshrubin commented 4 years ago

yea would be cool to get more info regarding ETFs regarding the holdings etc...

idanre1 commented 2 years ago

I think only documentation is needed. For example to get bond ratings you should do the following:

gsy = yf.Ticker("GSY")
info = gsy.get_info()
print(info['bondRatings'])