PriceHistory class#
- class yfinance.scrapers.history.PriceHistory(data, ticker, tz, session=None, proxy=None)#
- get_actions(proxy=None) Series #
- get_capital_gains(proxy=None) Series #
- get_dividends(proxy=None) Series #
- get_history_metadata(proxy=None) dict #
- get_splits(proxy=None) Series #
- history(period='1mo', interval='1d', start=None, end=None, prepost=False, actions=True, auto_adjust=True, back_adjust=False, repair=False, keepna=False, proxy=None, rounding=False, timeout=10, raise_errors=False) DataFrame #
- Parameters:
- periodstr
Valid periods: 1d,5d,1mo,3mo,6mo,1y,2y,5y,10y,ytd,max Either Use period parameter or use start and end
- intervalstr
Valid intervals: 1m,2m,5m,15m,30m,60m,90m,1h,1d,5d,1wk,1mo,3mo Intraday data cannot extend last 60 days
- start: str
Download start date string (YYYY-MM-DD) or _datetime, inclusive. Default is 99 years ago E.g. for start=”2020-01-01”, the first data point will be on “2020-01-01”
- end: str
Download end date string (YYYY-MM-DD) or _datetime, exclusive. Default is now E.g. for end=”2023-01-01”, the last data point will be on “2022-12-31”
- prepostbool
Include Pre and Post market data in results? Default is False
- auto_adjust: bool
Adjust all OHLC automatically? Default is True
- back_adjust: bool
Back-adjusted data to mimic true historical prices
- repair: bool
Detect currency unit 100x mixups and attempt repair. Default is False
- keepna: bool
Keep NaN rows returned by Yahoo? Default is False
- proxy: str
Optional. Proxy server URL scheme. Default is None
- rounding: bool
Round values to 2 decimal places? Optional. Default is False = precision suggested by Yahoo!
- timeout: None or float
If not None stops waiting for a response after given number of seconds. (Can also be a fraction of a second e.g. 0.01) Default is 10 seconds.
- raise_errors: bool
If True, then raise errors as Exceptions instead of logging.