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
- standard
- cboe
- fmp
- intrinio
- polygon
- yfinance
symbol
: Union[str, list[str]]
Symbol to get data for. Multiple items allowed for provider(s): cboe, fmp, intrinio, polygon, 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): cboe, fmp, intrinio, polygon, 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