Skip to main content

Consumer Price Index


Implementation details

Class names

Model nameParameters classData class
ConsumerPriceIndexConsumerPriceIndexQueryParamsConsumerPriceIndexData

Import Statement

from openbb_core.provider.standard_models.consumer_price_index import (
ConsumerPriceIndexData,
ConsumerPriceIndexQueryParams,
)

Parameters

country: str | list[str]
Default: united_states
The country to get data. Multiple items allowed for provider(s): fred, oecd.

transform: Literal['index', 'yoy', 'period']
Default: yoy
Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).

frequency: Literal['annual', 'quarter', 'monthly']
Default: monthly
The frequency of the data.

harmonized: bool
Default: False
If true, returns harmonized data.

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.

Data

date: date | str
The date of the data.

country: str
None

value: float
CPI index value or period change.