Skip to main content

historical

Historical Index Levels.

Examples

from openbb import obb
obb.index.price.historical(symbol='^GSPC', provider='fmp')
# Not all providers have the same symbols.
obb.index.price.historical(symbol='SPX', provider='intrinio')

Parameters

symbol: str | list[str]
Symbol to get data for. Multiple items allowed for provider(s): cboe, fmp, intrinio, polygon, yfinance.

start_date: date | str
Start date of the data, in YYYY-MM-DD format.

end_date: date | str
End date of the data, in YYYY-MM-DD format.


Returns

results: list[IndexHistorical]

Serializable results.

provider: Optional[Literal['cboe', 'fmp', 'intrinio', 'polygon', 'yfinance']]

Provider name.

warnings: Optional[list[Warning_]]

list of warnings.

chart: Optional[Chart]

Chart object.

extra: dict[str, Any]

Extra info.


Data

symbol: str
Symbol representing the entity requested in the data.

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.