historical
Get historical price data for a given stock. This includes open, high, low, close, and volume.
Parameters
- standard
- alpha_vantage
- cboe
- fmp
- intrinio
- polygon
- tiingo
- tmx
- tradier
- yfinance
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: Literal['1m', '5m', '15m', '30m', '60m', '1d', '1W', '1M']
Time interval of the data to return.
• Default: 1d
• Optional: True
adjustment
: Literal['splits_only', 'splits_and_dividends', 'unadjusted']
The adjustment factor to apply. 'splits_only' is not supported for intraday data.
• Default: splits_only
• Optional: True
extended_hours
: bool
Include Pre and Post market data.
• Default: False
• Optional: True
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: Literal['1m', '1d']
Time interval of the data to return. The most recent trading day is not including in daily historical data. Intraday data is only available for the most recent trading day at 1 minute intervals.
• Default: 1d
• Optional: True
use_cache
: bool
When True, the company directories will be cached for 24 hours and are used to validate symbols. The results of the function are not cached. Set as False to bypass.
• Default: True
• Optional: True
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: Literal['1m', '5m', '15m', '30m', '1h', '4h', '1d']
Time interval of the data to return.
• Default: 1d
• Optional: True
symbol
: str
A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID).
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: Literal['1m', '5m', '10m', '15m', '30m', '60m', '1h', '1d', '1W', '1M', '1Q', '1Y']
Time interval of the data to return.
• Default: 1d
• Optional: True
start_time
: datetime.time
Return intervals starting at the specified time on the start_date
formatted as 'HH:MM:SS'.
• Optional: True
end_time
: datetime.time
Return intervals stopping at the specified time on the end_date
formatted as 'HH:MM:SS'.
• Optional: True
timezone
: str
Timezone of the data, in the IANA format (Continent/City).
• Default: America/New_York
• Optional: True
source
: Literal['realtime', 'delayed', 'nasdaq_basic']
The source of the data.
• Default: realtime
• Optional: True
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: str
Time interval of the data to return. The numeric portion of the interval can be any positive integer. The letter portion can be one of the following: s, m, h, d, W, M, Q, Y
• Default: 1d
• Optional: True
adjustment
: Literal['splits_only', 'unadjusted']
The adjustment factor to apply. Default is splits only.
• Default: splits_only
• Optional: True
extended_hours
: bool
Include Pre and Post market data.
• Default: False
• Optional: True
sort
: Literal['asc', 'desc']
Sort order of the data. This impacts the results in combination with the 'limit' parameter. The results are always returned in ascending order by date.
• Default: asc
• Optional: True
limit
: int
The number of data entries to return.
• Default: 49999
• Optional: True
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: Union[Literal['1m', '5m', '15m', '30m', '90m', '1h', '2h', '4h', '1d', '1W', '1M', '1Y'], str]
Time interval of the data to return.
• Default: 1d
• Optional: True
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: Union[Literal['1m', '2m', '5m', '15m', '30m', '60m', '1h', '1d', '1W', '1M'], str, int]
Time interval of the data to return. Or, any integer (entered as a string) representing the number of minutes. Default is daily data. There is no extended hours data, and intraday data is limited to after April 12 2022.
• Default: day
• Optional: True
adjustment
: Literal['splits_only', 'splits_and_dividends', 'unadjusted']
The adjustment factor to apply. Only valid for daily data.
• Default: splits_only
• Optional: True
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: Literal['1m', '5m', '15m', '1d', '1W', '1M']
Time interval of the data to return.
• Default: 1d
• Optional: True
extended_hours
: bool
Include Pre and Post market data.
• Default: False
• Optional: True
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.
• Optional: False
start_date
: Union[date, str]
Start date of the data, in YYYY-MM-DD format.
• Optional: True
end_date
: Union[date, str]
End date of the data, in YYYY-MM-DD format.
• Optional: True
interval
: Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1W', '1M', '1Q']
Time interval of the data to return.
• Default: 1d
• Optional: True
extended_hours
: bool
Include Pre and Post market data.
• Default: False
• Optional: True
include_actions
: bool
Include dividends and stock splits in results.
• Default: True
• Optional: True
adjustment
: Literal['splits_only', 'splits_and_dividends']
The adjustment factor to apply. Default is splits only.
• Default: splits_only
• Optional: True
Returns
results
: list[EquityHistorical]
Serializable results.
provider
: Optional[Literal['alpha_vantage', 'cboe', 'fmp', 'intrinio', 'polygon', 'tiingo', 'tmx', 'tradier', 'yfinance']]
Provider name.
warnings
: Optional[list[Warning_]]
list of warnings.
chart
: Optional[Chart]
Chart object.
extra
: dict[str, Any]
Extra info.
Data
- standard
- alpha_vantage
- cboe
- fmp
- intrinio
- polygon
- tiingo
- tmx
- tradier
- yfinance
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
adj_close
: Annotated[float, Gt(gt=0)]
The adjusted close price.
dividend
: Annotated[float, Ge(ge=0)]
Dividend amount, if a dividend was paid.
split_ratio
: Annotated[float, Ge(ge=0)]
Split coefficient, if a split occurred.
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
calls_volume
: int
Number of calls traded during the most recent trading period. Only valid if interval is 1m.
puts_volume
: int
Number of puts traded during the most recent trading period. Only valid if interval is 1m.
total_options_volume
: int
Total number of options traded during the most recent trading period. Only valid if interval is 1m.
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
adj_close
: float
The adjusted close price.
unadjusted_volume
: float
Unadjusted volume of the symbol.
change
: float
Change in the price from the previous close.
change_percent
: float
Change in the price from the previous close, as a normalized percent.
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
average
: float
Average trade price of an individual equity during the interval.
change
: float
Change in the price of the symbol from the previous day.
change_percent
: float
Percent change in the price of the symbol from the previous day.
adj_open
: float
The adjusted open price.
adj_high
: float
The adjusted high price.
adj_low
: float
The adjusted low price.
adj_close
: float
The adjusted close price.
adj_volume
: float
The adjusted volume.
fifty_two_week_high
: float
52 week high price for the symbol.
fifty_two_week_low
: float
52 week low price for the symbol.
factor
: float
factor by which to multiply equity prices before this date, in order to calculate historically-adjusted equity prices.
split_ratio
: float
Ratio of the equity split, if a split occurred.
dividend
: float
Dividend amount, if a dividend was paid.
close_time
: datetime
The timestamp that represents the end of the interval span.
interval
: str
The data time frequency.
intra_period
: bool
If true, the equity price represents an unfinished period (be it day, week, quarter, month, or year), meaning that the close price is the latest price available, not the official close price for the period
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
transactions
: Annotated[int, Gt(gt=0)]
Number of transactions for the symbol in the time period.
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
adj_open
: float
The adjusted open price.
adj_high
: float
The adjusted high price.
adj_low
: float
The adjusted low price.
adj_close
: float
The adjusted close price.
adj_volume
: float
The adjusted volume.
split_ratio
: float
Ratio of the equity split, if a split occurred.
dividend
: float
Dividend amount, if a dividend was paid.
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume weighted average price for the day.
change
: float
Change in price.
change_percent
: float
Change in price, as a normalized percentage.
transactions
: int
Total number of transactions recorded.
transactions_value
: float
Nominal value of recorded transactions.
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
last_price
: float
The last price of the equity.
date
: Union[Union[date, datetime], str]
The date of the data.
open
: float
The open price.
high
: float
The high price.
low
: float
The low price.
close
: float
The close price.
volume
: Union[float, int]
The trading volume.
vwap
: float
Volume Weighted Average Price over the period.
split_ratio
: float
Ratio of the equity split, if a split occurred.
dividend
: float
Dividend amount (split-adjusted), if a dividend was paid.