Twinkle HubTwinkle Hub
登入

📌 2026-08-17 新增:⚖️ 台灣法條時光機 — 歷史法條原文 · 修法沿革 · 全文檢索 · 條文關聯圖(935 個 dataset · 35,454+ 筆 row)

查看完整 Changelog →

美聯儲 FRED 時序觀測值 (單一 series)

us_get_fred_series_observations

台灣​專屬MIT

**關鍵字 / Keywords**: 美聯儲 經濟數據 觀測值 時間序列 GDP 失業率 CPI 通膨 利率 FRED observations values time series data macro UNRATE GDP CPIAUCSL FEDFUNDS T10Y2Y quarterly monthly

Scope: US Federal Reserve Economic Data (FRED) · one series'
per-period values, optionally date-sliced.

Endpoint:
    https://api.stlouisfed.org/fred/series/observations?series_id=…

Args:
    series_id: FRED series id — human-memorable, stable strings.
               Common anchors:
                 "GDP"       · US Gross Domestic Product (quarterly)
                 "UNRATE"    · Unemployment Rate (monthly)
                 "CPIAUCSL"  · Consumer Price Index (monthly, SA)
                 "FEDFUNDS"  · Effective Federal Funds Rate
                 "T10Y2Y"    · 10-Year vs 2-Year Treasury Spread
               Discover via us_search_fred_series first.
    observation_start / observation_end: YYYY-MM-DD inclusive
                                          bounds. Omit for full
                                          history.
    limit: max observations returned (default 1000, hard cap 100000).
    sort_order: "asc" (default · oldest first) or "desc".
    units: optional FRED transform code applied server-side —
           "lin" (raw · default), "chg" (change), "ch1" (change
           over 1 year), "pch" (% change), "pc1" (% change over
           1 year), "pca" (annualized % change), "cch"
           (continuously compounded), "cca", "log".
    frequency: optional aggregation frequency ("d","w","bw","m",
               "q","sa","a"). Only if you want re-aggregation
               different from the series' native frequency.
    aggregation_method: "avg" (default), "sum", "eop"
                        (end-of-period). Only meaningful with
                        `frequency`.

Returns dict with `series_id`, `series_title`, `units`,
`frequency`, `seasonal_adjustment`, `copyright` (from the
series' `notes` field — OECD/Eurostat/ISM/private-source
attribution lives here), `count`, `observations: [{date,
value, missing, realtime_start, realtime_end}, ...]`.

Values arrive as strings (FRED convention); "." denotes
missing — pre-flagged via `missing=True` for convenience.

Requires US_FRED_API_KEY. License warning per FRED terms —
third-party series carry origin-jurisdiction copyright; the
response's `copyright` field surfaces the per-series notice
so agents can check before redistributing.

輸入 schema

{
  "properties": {
    "series_id": {
      "title": "Series Id",
      "type": "string"
    },
    "observation_start": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Observation Start"
    },
    "observation_end": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Observation End"
    },
    "limit": {
      "default": 1000,
      "title": "Limit",
      "type": "integer"
    },
    "sort_order": {
      "default": "asc",
      "title": "Sort Order",
      "type": "string"
    },
    "units": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Units"
    },
    "frequency": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Frequency"
    },
    "aggregation_method": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Aggregation Method"
    }
  },
  "required": [
    "series_id"
  ],
  "title": "us_get_fred_series_observationsArguments",
  "type": "object"
}

呼叫​方式

配置​好 Twinkle Hub 的 MCP client 後,​agent 會​看到 us_get_fred_series_observations。直接讓它呼叫​即可,​例如:

# Ask Claude / any MCP client:
請用 us_get_fred_series_observations 處理 "…"。

# It will call:
us_get_fred_series_observations(input="…")

尚未​設定 Client?

Claude Desktop 約 3 分鐘即可完成​設定 — 下載 .mcpb 檔案並雙擊​即可,或參閱​文件中的各 Client 安裝​步驟。

查看使用者設定​文件