retail_prices
Get retail prices for common items.
Examples
from openbb import obb
obb.economy.retail_prices(provider='fred')
# The price of eggs in the northeast census region.
obb.economy.retail_prices(item='eggs', region=northeast, provider='fred')
# The percentage change in price, from one-year ago, of various meats, US City Average.
obb.economy.retail_prices(item='meats', transform=pc1, provider='fred')
Parameters
- standard
- fred
Name | Type | Description | Default | Optional |
---|---|---|---|---|
item | str | The item or basket of items to query. | None | True |
country | str | The country to get data. | united_states | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
Name | Type | Description | Default | Optional |
---|---|---|---|---|
item | Literal['beverages', 'cereals', 'dairy', 'fuel', 'produce', 'meats', 'bacon', 'bananas', 'beans', 'beef', 'beer', 'bread', 'butter', 'cheese', 'chicken', 'chops', 'coffee', 'cookies', 'corn', 'diesel', 'eggs', 'electricity', 'flour', 'gas', 'gasoline', 'grapefruit', 'ground_beef', 'ham', 'ice_cream', 'lemons', 'lettuce', 'malt_beverages', 'milk', 'oil', 'orange_juice', 'oranges', 'pork', 'potato_chips', 'potatoes', 'rice', 'soft_drinks', 'spaghetti', 'steak', 'strawberries', 'sugar', 'tomatoes', 'unleaded', 'usda', 'vodka', 'wine', 'yogurt'] | The item or basket of items to query. | fuel | True |
country | Literal['united_states'] | The country to get data. | united_states | True |
start_date | Union[date, str] | Start date of the data, in YYYY-MM-DD format. | None | True |
end_date | Union[date, str] | End date of the data, in YYYY-MM-DD format. | None | True |
region | Literal['all_city', 'northeast', 'midwest', 'south', 'west'] | The region to get average price levels for. | all_city | True |
frequency | Literal['annual', 'quarter', 'monthly'] | The frequency of the data. | monthly | True |
transform | Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log'] | Transformation type; None = No transformation; chg = Change; ch1 = Change from Year Ago; pch = Percent Change; pc1 = Percent Change from Year Ago; pca = Compounded Annual Rate of Change; cch = Continuously Compounded Rate of Change; cca = Continuously Compounded Annual Rate of Change; log = Natural Log | None | True |
Returns
OBBject
results : List[RetailPrices]
Serializable results.
provider : Optional[Literal['fred']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
extra : Dict[str, Any]
Extra info.
Data
- standard
- fred
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
symbol | str | Symbol representing the entity requested in the data. |
country | str | |
description | str | Description of the item. |
value | float | Price, or change in price, per unit. |
Name | Type | Description |
---|---|---|
date | Union[date, str] | The date of the data. |
symbol | str | Symbol representing the entity requested in the data. |
country | str | |
description | str | Description of the item. |
value | float | Price, or change in price, per unit. |