Skip to main content

historical

Get historical price data for a given stock. This includes open, high, low, close, and volume.

Examples

from openbb import obb
obb.equity.price.historical(symbol='AAPL', provider='fmp')
obb.equity.price.historical(symbol='AAPL', interval=1d, provider='intrinio')

Parameters

NameTypeDescriptionDefaultOptional
symbolUnion[str, List[str]]Symbol to get data for. Multiple items allowed for provider(s): alpha_vantage, cboe, fmp, polygon, tiingo, tmx, tradier, yfinance.False
start_dateUnion[date, str]Start date of the data, in YYYY-MM-DD format.NoneTrue
end_dateUnion[date, str]End date of the data, in YYYY-MM-DD format.NoneTrue

Returns

OBBject
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

NameTypeDescription
dateUnion[Union[date, datetime], str]The date of the data.
openfloatThe open price.
highfloatThe high price.
lowfloatThe low price.
closefloatThe close price.
volumeUnion[float, int]The trading volume.
vwapfloatVolume Weighted Average Price over the period.