Skip to main content

historical

Historical futures prices.

Examples

from openbb import obb
obb.derivatives.futures.historical(symbol='ES', provider='yfinance')
# Enter multiple symbols.
obb.derivatives.futures.historical(symbol='ES,NQ', provider='yfinance')
# Enter expiration dates as "YYYY-MM".
obb.derivatives.futures.historical(symbol='ES', provider='yfinance', expiration='2025-12')

Parameters

NameTypeDescriptionDefaultOptional
symbolUnion[str, List[str]]Symbol to get data for. Multiple items allowed for provider(s): 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
expirationstrFuture expiry date with format YYYY-MMNoneTrue

Returns

OBBject
results : List[FuturesHistorical]
Serializable results.

provider : Optional[Literal['yfinance']]
Provider name.

warnings : Optional[List[Warning_]]
List of warnings.

chart : Optional[Chart]
Chart object.

extra : Dict[str, Any]
Extra info.

Data

NameTypeDescription
dateUnion[datetime, str]The date of the data.
openfloatThe open price.
highfloatThe high price.
lowfloatThe low price.
closefloatThe close price.
volumefloatThe trading volume.