Skip to content

Commit

Permalink
updated get_info to use quotetype to determine presence net Expense R…
Browse files Browse the repository at this point in the history
…atio (net)
  • Loading branch information
ChNgineer committed Dec 10, 2023
1 parent 2fd1349 commit ff314af
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions yfinance/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1751,12 +1751,10 @@ def get_mutualfund_holders(self, proxy=None, as_dict=False):
def get_info(self, proxy=None) -> dict:
self._quote.proxy = proxy or self.proxy
data = self._quote.info
try:
if data['quoteType'] == 'ETF':
holders = self.get_institutional_holders()
expenseRatio = holders[holders[0] == 'Expense Ratio (net)'][1].values[0]
data['annualNetExpenseRatio'] = expenseRatio
except Exception:
pass
return data

def get_fast_info(self, proxy=None):
Expand Down

0 comments on commit ff314af

Please sign in to comment.