Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.llmquantdata.com/llms.txt

Use this file to discover all available pages before exploring further.

已暴露为 MCP 工具macro_indicator_search + macro_indicator_history —— 在 Claude / Cursor / 任意 MCP 客户端中直接调用。详见 MCP Server 60 秒配置。
已上线   1 credit · history   免费 · search

它为 Agent 做什么

macro_indicator_history 返回单个支持的美国宏观指标(CPI、UNRATE、Fed Funds、10Y 收益率、GDP 等)的 latest-vintage 历史时间序列 —— 一组 { date, value, realtime_start, realtime_end } observation。它是 agent 的 宏观时间序列拉取器:要把过去 5 年通胀画图、要算收益率曲线斜率、要把 observation 喂下游模型时调它。 canonical 的 agent 流程是两步:先调 macro_indicator_search(免费)找到正确的 indicator alias,再调 macro_indicator_history 拉序列。两种查询模式:
  • Recent 模式 —— 传 limit(默认 60)取最近 N 个 observation。
  • Range 模式 —— 传 start_date + end_date 取一个固定窗口。

Agent flow

返回值

data
MacroHistorical
required
指标元信息 + observations 数组。
meta.count
number
本次返回的 observation 数量。
meta.stale
boolean
上游刷新失败、降级返回缓存时为 true
meta.creditsUsed
number
固定 1
meta.remainingCredits
number
账户剩余 credit。
meta.sourceNotice
string
FRED API notice 字符串。
200 OK · macro_indicator_history
{
  "data": {
    "indicator": "us.cpi.headline",
    "series_id": "CPIAUCSL",
    "title": "Consumer Price Index for All Urban Consumers: All Items in U.S. City Average",
    "frequency": "Monthly",
    "units": "Index 1982-1984=100",
    "observations": [
      {
        "date": "2026-01-01",
        "value": 318.412,
        "realtime_start": "2026-02-12",
        "realtime_end": "2026-02-12"
      },
      {
        "date": "2026-02-01",
        "value": 319.082,
        "realtime_start": "2026-03-12",
        "realtime_end": "2026-03-12"
      },
      {
        "date": "2026-03-01",
        "value": 319.799,
        "realtime_start": "2026-04-10",
        "realtime_end": "2026-04-10"
      }
    ],
    "attribution": "Source: U.S. Bureau of Labor Statistics via FRED"
  },
  "meta": {
    "count": 3,
    "stale": false,
    "creditsUsed": 1,
    "remainingCredits": 99,
    "sourceNotice": "This product uses the FRED® API but is not endorsed or certified by the Federal Reserve Bank of St. Louis."
  }
}

说明

Revision-aware:宏观 observation 会被修订。我们返回的是当前 latest vintage —— FRED 今天发布的值,不一定是当初首发的值。用 realtime_start / realtime_end 判断你是不是看到了修订后的版本。MVP 不支持 ALFRED 风格的 as-of 历史回放。
默认 limit=60 大致覆盖月频 5 年、周频 1 年、日频 3 个月。需要更长就提到 500 或改用 Range 模式。缓存跨用户共享,热门指标基本秒回。
Recent 与 Range 模式互斥。 要么单传 limit,要么同时传 start_date + end_date。只传一个 date 返回 400
仅 allowlist 内。 约 50 个精选美国指标,allowlist 之外返回 404。用 macro_indicator_search 浏览可用列表。

直接调用

// 1) 找 alias
{
  "method": "tools/call",
  "params": {
    "name": "macro_indicator_search",
    "arguments": { "q": "cpi", "category": "Inflation" }
  }
}

// 2) 取最近的 history(默认 60)
{
  "method": "tools/call",
  "params": {
    "name": "macro_indicator_history",
    "arguments": { "indicator": "us.cpi.headline", "limit": 60 }
  }
}

// 2b) 或取一个明确的日期范围
{
  "method": "tools/call",
  "params": {
    "name": "macro_indicator_history",
    "arguments": {
      "indicator": "us.cpi.headline",
      "start_date": "2020-01-01",
      "end_date": "2026-03-01"
    }
  }
}

完整参数参考

indicator
string
平台 alias(如 us.cpi.headlineus.rates.fed_funds)。与 series_id 二选一
series_id
string
FRED series ID(如 CPIAUCSL)。与 indicator 二选一。必须在 allowlist 内。
start_date
string
Range 模式。ISO 日期 YYYY-MM-DD。必须与 end_date 同时使用。
end_date
string
Range 模式。ISO 日期 YYYY-MM-DD。必须与 start_date 同时使用。
limit
number
default:60
Recent 模式返回条数。范围 1–500。Range 模式下被忽略。

相关接口

宏观指标目录

浏览约 50 个精选指标 allowlist(免费)。

宏观指标快照

只看最新值 + 涨跌(不返回完整序列)。