| Ticker-class | R Documentation |
Class for retrieving all data related to a single ticker from the
Yahoo Finance API. Inherits get_history() from
YahooFinanceBase-class.
An R6 class object
Market metadata fields (currency, regular_market_price,
previous_close, and so on) are fetched once per symbol and cached on
the object; the cache has no time expiry. It is keyed by symbol, so changing
the symbol (with set_symbol() or by assigning to symbol)
always fetches fresh metadata. To refresh the values for the same symbol,
create a new Ticker or call set_symbol() again.
YahooFinanceBase -> Ticker
valuation_measuresRetrieves valuation measures
recommendationsRelated symbols recommended by Yahoo Finance and their scores.
technical_insightsTechnical insights and indicators snapshot.
currencyCurrency code for the symbol.
exchange_nameShort name of the stock exchange.
full_exchange_nameFull name of the stock exchange.
first_trade_dateTimestamp of the first recorded trade.
regular_market_timeTimestamp of the last market trade.
timezoneTimezone code of the exchange.
exchange_timezone_nameFull timezone name of the exchange.
regular_market_priceCurrent regular market price.
fifty_two_week_high52-week high price.
fifty_two_week_low52-week low price.
regular_market_day_highHighest price during the current trading session.
regular_market_day_lowLowest price during the current trading session.
regular_market_volumeCurrent trading volume.
previous_closeClosing price of the previous trading day.
Ticker$new()Create a new Ticker object.
Ticker$new(symbol = NA, validate = TRUE)
symbolSymbol (e.g., "AAPL").
validateLogical; if TRUE, validate symbol against Yahoo Finance. Defaults to TRUE.
Ticker$set_symbol()Set a new symbol and clear cached metadata.
Ticker$set_symbol(symbol, validate = TRUE)
symbolNew symbol (e.g., "AAPL").
validateLogical; if TRUE, validate symbol against Yahoo Finance. Defaults to TRUE.
Ticker$get_income_statement()Retrieve income statement data.
Ticker$get_income_statement(frequency = c("annual", "quarterly"))
frequencyOne of "annual" or "quarterly". Defaults to "annual".
A tibble with columns date, period_type,
and income statement line items, or invisible(NULL) on failure.
Ticker$get_balance_sheet()Retrieve balance sheet data.
Ticker$get_balance_sheet(frequency = c("annual", "quarterly"))
frequencyOne of "annual" or "quarterly". Defaults to "annual".
A tibble with columns date, period_type,
and balance sheet line items, or invisible(NULL) on failure.
Ticker$get_cash_flow()Retrieve cash flow statement data.
Ticker$get_cash_flow(frequency = c("annual", "quarterly"))
frequencyOne of "annual" or "quarterly". Defaults to "annual".
A tibble with columns date, period_type,
and cash flow statement line items, or invisible(NULL) on failure.
Ticker$clone()The objects of this class are cloneable with this method.
Ticker$clone(deep = FALSE)
deepWhether to make a deep clone.
Other historical data:
Indice-class,
Tickers,
yf_download_prices(),
yf_get_index_quotes()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.