Skip to main content
Version: v5

cpi

Consumer Price Index (CPI).

Examples​

from openbb import obb
obb.fred.economy.cpi(country='united_states', provider='fred')

Parameters​

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

Choices
  • australia
  • austria
  • belgium
  • brazil
  • bulgaria
  • canada
  • chile
  • china
  • croatia
  • cyprus
  • czech_republic
  • denmark
  • estonia
  • finland
  • france
  • germany
  • greece
  • hungary
  • iceland
  • india
  • indonesia
  • ireland
  • israel
  • italy
  • japan
  • korea
  • latvia
  • lithuania
  • luxembourg
  • malta
  • mexico
  • netherlands
  • new_zealand
  • norway
  • poland
  • portugal
  • romania
  • russian_federation
  • slovak_republic
  • slovakia
  • slovenia
  • south_africa
  • spain
  • sweden
  • switzerland
  • turkey
  • united_kingdom
  • united_states

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

Choices
  • index
  • yoy
  • period

frequency: str | 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.


Returns​

results: FredConsumerPriceIndex

Serializable results.

provider: str | None

Provider name.

warnings: Optional[list[Warning_]]

List of warnings.

chart: Optional[Chart]

Chart object.

extra: dict[str, Any]

Extra info.


Data​

date: date | str
The date of the data.

country: str
None

value: float
CPI index value or period change.