Fetch

Fetch observations for a curated fred-client indicator or any FRED series ID through the fred-client CLI. Use when a user asks for economic-data values, history, recent observations, a date range, frequency conversion, or units transformation. Accept either a grouped accessor such as growth gdp or a series ID such as GDP. Trigger phrases: FRED 시계열, GDP 추이, 최근 실업률, 경제지표 가져와, fetch FRED data, FRED time series, economic data history.

seokhoonj Updated

File contents

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.

  1. 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.
  2. 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.
  3. Add only requested options, including --observation-start, --observation-end, --limit, and --sort-order. With no options, fetch the available history.
  4. Keep FRED's string values unchanged; "." is a missing observation, not a number.
  5. Summarize long results without flooding the response, and relay a nonzero fred: <message> error without inventing values.

seokhoonj/fred-client commit 95bae87434

Frequently asked questions

npx get-skill add seokhoonj/fetch