> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yehangshe.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 无风险利率历史

> 按天取得 SOFR 或指定期限的美债利率，可作为期权定价和历史分析的利率输入

按天取得 SOFR 或指定期限的美债利率，可作为期权定价和历史分析的利率输入。

适用于 Pro 与 Pro+。实际可用端点见当前 Key 的 `GET /v1/discover`。

## 请求

`GET /v1/macro/risk-free-rates`

MCP command 为 `macro.risk_free_rates`，需要 `derived:read` 或 `data-api:read` scope。

symbol 支持 SOFR 和 11 个美债期限。短端为 TREASURY\_M1、TREASURY\_M3、TREASURY\_M6。年期为 TREASURY\_Y1、TREASURY\_Y2、TREASURY\_Y3、TREASURY\_Y5、TREASURY\_Y7、TREASURY\_Y10、TREASURY\_Y20、TREASURY\_Y30。from、to 均含端点，单次最多 31 天。

```bash theme={null}
curl -H "Authorization: Bearer $DATA_API_KEY" \
  'https://api.yehangshe.com/v1/macro/risk-free-rates?symbol=SOFR&from=2026-11-21&to=2026-11-22'
```

## 读懂结果

rates 每行只含 date（适用日期）和 rate\_pct（百分数），3.92 表示 3.92%，模型需要小数时用 0.0392。周末和显式查询的未来日期也可能带有沿用值。该日期无法证明当日发生了新的利率发布。as\_of 与数据新鲜度为空。

`total_rates` 为当前查询总行数，`returned_rates` 为本页行数。limit 默认 400、上限 1000，单页大小限制可能让实际返回行数更少。将 `_meta.next_cursor` 原样传给相同查询的 cursor，直到为空。

## 计量

每个成功页计 1 unit。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.