diff --git a/openbb_terminal/stocks/stocks_helper.py b/openbb_terminal/stocks/stocks_helper.py index 1a08f985256d..e801f81bf5b2 100644 --- a/openbb_terminal/stocks/stocks_helper.py +++ b/openbb_terminal/stocks/stocks_helper.py @@ -926,22 +926,19 @@ def additional_info_about_ticker(ticker: str) -> str: if ".US" in ticker.upper(): ticker = ticker.rstrip(".US") ticker = ticker.rstrip(".us") - ticker_info = yf.Ticker(ticker).info + ticker_stats = yf.Ticker(ticker).stats() extra_info += "\n[param]Company: [/param]" - if "shortName" in ticker_info and ticker_info["shortName"]: - extra_info += ticker_info["shortName"] + extra_info += ticker_stats.get("quoteType", {}).get("shortName") extra_info += "\n[param]Exchange: [/param]" - if "exchange" in ticker_info and ticker_info["exchange"]: - exchange_name = ticker_info["exchange"] - extra_info += ( - exchange_mappings["X" + exchange_name] - if "X" + exchange_name in exchange_mappings - else exchange_name - ) + exchange_name = ticker_stats.get("quoteType", {}).get("exchange") + extra_info += ( + exchange_mappings["X" + exchange_name] + if "X" + exchange_name in exchange_mappings + else exchange_name + ) extra_info += "\n[param]Currency: [/param]" - if "currency" in ticker_info and ticker_info["currency"]: - extra_info += ticker_info["currency"] + extra_info += ticker_stats.get("summaryDetail", {}).get("currency") else: extra_info += "\n[param]Company: [/param]"