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 | None | list[str | None]
Default: united_states
The country to get data. Multiple items allowed for provider(s): fred, imf, oecd.

Choices
  • G20
  • G7
  • argentina
  • australia
  • austria
  • belgium
  • brazil
  • canada
  • chile
  • china
  • colombia
  • costa_rica
  • czech_republic
  • denmark
  • estonia
  • euro_area_20
  • europe
  • european_union_27
  • finland
  • france
  • germany
  • greece
  • hungary
  • iceland
  • india
  • indonesia
  • ireland
  • israel
  • italy
  • japan
  • korea
  • latvia
  • lithuania
  • luxembourg
  • mexico
  • netherlands
  • new_zealand
  • norway
  • oecd_total
  • poland
  • portugal
  • russia
  • saudi_arabia
  • slovak_republic
  • slovenia
  • south_africa
  • spain
  • sweden
  • switzerland
  • turkey
  • united_kingdom
  • united_states
  • all

transform: str | None
Default: yoy
Transformation of the CPI data.

Choices
  • index
  • yoy
  • period

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

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

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

end_date: date | None | 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.