Skip to main content

historical

Currency Historical Price. Currency historical data.

Currency historical prices refer to the past exchange rates of one currency against another over a specific period. This data provides insight into the fluctuations and trends in the foreign exchange market, helping analysts, traders, and economists understand currency performance, evaluate economic health, and make predictions about future movements.

Examples

from openbb import obb
obb.currency.price.historical(symbol='EURUSD', provider='fmp')
# Filter historical data with specific start and end date.
obb.currency.price.historical(symbol='EURUSD', start_date='2023-01-01', end_date='2023-12-31', provider='fmp')
# Get data with different granularity.
obb.currency.price.historical(symbol='EURUSD', provider='polygon', interval=15m)

Parameters

NameTypeDescriptionDefaultOptional
symbolUnion[str, List[str]]Symbol to get data for. Can use CURR1-CURR2 or CURR1CURR2 format. Multiple items allowed for provider(s): fmp, polygon, tiingo, 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[CurrencyHistorical]
Serializable results.

provider : Optional[Literal['fmp', 'polygon', 'tiingo', '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.
volumefloatThe trading volume.
vwapAnnotated[float, Gt(gt=0)]Volume Weighted Average Price over the period.