fred
Historical Fred Indices. Close values for selected Fred indices.
Example
from openbb import obb
obb.index.fred(symbol="SPX", limit=100)
Parameters
- Standard
- intrinio
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| symbol | Union[str, List[str]] | Symbol to get data for. | False | |
| 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 |
| limit | int | The number of data entries to return. | 100 | True |
| provider | Literal['intrinio'] | The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'intrinio' if there is no default. | "intrinio" | True |
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| symbol | Union[str, List[str]] | Symbol to get data for. | False | |
| 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 |
| limit | int | The number of data entries to return. | 100 | True |
| provider | Literal['intrinio'] | The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'intrinio' if there is no default. | "intrinio" | True |
| next_page | str | Token to get the next page of data from a previous API call. | None | True |
| all_pages | bool | Returns all pages of data from the API call at once. | False | True |
| sleep | float | Time to sleep between requests to avoid rate limiting. | 1.0 | True |
Returns
OBBject
results : List[FredIndices]
Serializable results.
provider : Optional[Literal['intrinio']]
Provider name.
warnings : Optional[List[Warning_]]
List of warnings.
chart : Optional[Chart]
Chart object.
metadata: Optional[Metadata]
Metadata info about the command execution.
Data
- Standard
| Name | Type | Description |
|---|---|---|
| date | date | The date of the data. |
| value | float | Value of the index. |