Ticker#

class yfinance.Ticker(ticker, session=None, proxy=None)#

Attributes

actions
analyst_price_targets
balance_sheet
balancesheet
basic_info
calendar

Returns a dictionary of events, earnings, and dividends for the ticker

capital_gains
cash_flow
cashflow
dividends
earnings
earnings_dates
earnings_estimate
earnings_history
eps_revisions
eps_trend
fast_info
financials
funds_data
growth_estimates
history_metadata
income_stmt
incomestmt
info
insider_purchases
insider_roster_holders
insider_transactions
institutional_holders
isin
major_holders
mutualfund_holders
news
options
quarterly_balance_sheet
quarterly_balancesheet
quarterly_cash_flow
quarterly_cashflow
quarterly_earnings
quarterly_financials
quarterly_income_stmt
quarterly_incomestmt
recommendations
recommendations_summary
revenue_estimate
sec_filings
shares
splits
sustainability
upgrades_downgrades

Methods

__init__(ticker, session=None, proxy=None)
get_actions(proxy=None) Series
get_analyst_price_targets(proxy=None) dict

Keys: current low high mean median

get_balance_sheet(proxy=None, as_dict=False, pretty=False, freq='yearly')
Parameters:
as_dict: bool

Return table as Python dict Default is False

pretty: bool

Format row names nicely for readability Default is False

freq: str

“yearly” or “quarterly” Default is “yearly”

proxy: str

Optional. Proxy server URL scheme Default is None

get_balancesheet(proxy=None, as_dict=False, pretty=False, freq='yearly')
get_calendar(proxy=None) dict
get_capital_gains(proxy=None) Series
get_cash_flow(proxy=None, as_dict=False, pretty=False, freq='yearly') DataFrame | dict
Parameters:
as_dict: bool

Return table as Python dict Default is False

pretty: bool

Format row names nicely for readability Default is False

freq: str

“yearly” or “quarterly” Default is “yearly”

proxy: str

Optional. Proxy server URL scheme Default is None

get_cashflow(proxy=None, as_dict=False, pretty=False, freq='yearly')
get_dividends(proxy=None) Series
get_earnings(proxy=None, as_dict=False, freq='yearly')
Parameters:
as_dict: bool

Return table as Python dict Default is False

freq: str

“yearly” or “quarterly” Default is “yearly”

proxy: str

Optional. Proxy server URL scheme Default is None

get_earnings_dates(limit=12, proxy=None) DataFrame | None

Get earning dates (future and historic)

Parameters:
  • limit (int) – max amount of upcoming and recent earnings dates to return. Default value 12 should return next 4 quarters and last 8 quarters. Increase if more history is needed.

  • proxy – requests proxy to use.

Returns:

pd.DataFrame

get_earnings_estimate(proxy=None, as_dict=False)

Index: 0q +1q 0y +1y Columns: numberOfAnalysts avg low high yearAgoEps growth

get_earnings_history(proxy=None, as_dict=False)

Index: pd.DatetimeIndex Columns: epsEstimate epsActual epsDifference surprisePercent

get_eps_revisions(proxy=None, as_dict=False)

Index: 0q +1q 0y +1y Columns: upLast7days upLast30days downLast7days downLast30days

get_eps_trend(proxy=None, as_dict=False)

Index: 0q +1q 0y +1y Columns: current 7daysAgo 30daysAgo 60daysAgo 90daysAgo

get_fast_info(proxy=None)
get_financials(proxy=None, as_dict=False, pretty=False, freq='yearly')
get_funds_data(proxy=None) FundsData | None
get_growth_estimates(proxy=None, as_dict=False)

Index: 0q +1q 0y +1y +5y -5y Columns: stock industry sector index

get_history_metadata(proxy=None) dict
get_income_stmt(proxy=None, as_dict=False, pretty=False, freq='yearly')
Parameters:
as_dict: bool

Return table as Python dict Default is False

pretty: bool

Format row names nicely for readability Default is False

freq: str

“yearly” or “quarterly” Default is “yearly”

proxy: str

Optional. Proxy server URL scheme Default is None

get_incomestmt(proxy=None, as_dict=False, pretty=False, freq='yearly')
get_info(proxy=None) dict
get_insider_purchases(proxy=None, as_dict=False)
get_insider_roster_holders(proxy=None, as_dict=False)
get_insider_transactions(proxy=None, as_dict=False)
get_institutional_holders(proxy=None, as_dict=False)
get_isin(proxy=None) str | None
get_major_holders(proxy=None, as_dict=False)
get_mutualfund_holders(proxy=None, as_dict=False)
get_news(proxy=None) list
get_recommendations(proxy=None, as_dict=False)

Returns a DataFrame with the recommendations Columns: period strongBuy buy hold sell strongSell

get_recommendations_summary(proxy=None, as_dict=False)
get_revenue_estimate(proxy=None, as_dict=False)

Index: 0q +1q 0y +1y Columns: numberOfAnalysts avg low high yearAgoRevenue growth

get_sec_filings(proxy=None) dict
get_shares(proxy=None, as_dict=False) DataFrame | dict
get_shares_full(start=None, end=None, proxy=None)
get_splits(proxy=None) Series
get_sustainability(proxy=None, as_dict=False)
get_upgrades_downgrades(proxy=None, as_dict=False)

Returns a DataFrame with the recommendations changes (upgrades/downgrades) Index: date of grade Columns: firm toGrade fromGrade action

history(*args, **kwargs) DataFrame
option_chain(date=None, tz=None)