Fetch FRED data
Call one of the package's two fetch forms and relay its JSON rows.
fred fetch "<SERIES_ID>" [OPTIONS] --json
fred fetch "<GROUP>" "<INDICATOR>" [OPTIONS] --json
--json returns the complete rows; without it the CLI prints an aligned table that, for a
long series, shows only the first and last 10 rows.
Requires fred-client installed (pipx install fred-client) and a FRED API key in
FRED_API_KEY or ~/.config/fred-client/credentials.json.
- Use a grouped accessor when the user names one of fred-client's ready-made indicators. Use list if its group or indicator name is unknown.
- Use a series ID for any other FRED statistic. Use search first when the ID is unknown. Series IDs are case-insensitive in fred-client.
- Add only requested options, including
--observation-start,--observation-end,--limit, and--sort-order. With no options, fetch the available history. - Keep FRED's string values unchanged;
"."is a missing observation, not a number. - Summarize long results without flooding the response, and relay a nonzero
fred: <message>error without inventing values.