Skip to main content

historical

ETF Historical Market Price.

Examples

from openbb import obb
obb.etf.historical(symbol='SPY', provider='fmp')
obb.etf.historical(symbol='SPY', provider='yfinance')
# This function accepts multiple tickers.
obb.etf.historical(symbol='SPY,IWM,QQQ,DJIA', provider='yfinance')

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[EtfHistorical]
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.