---
title: "Narwhal API 文档与接入指南 | Narwhal API"
description: "用一个密钥访问经济数据、外汇、大宗商品、收益率曲线、预测市场、日历、市场和所有权。阅读 REST 和 MCP 文档。"
url: "https://narwhalapi.com/zh/docs"
---

# Narwhal API 文档中心

一个密钥即可通过 REST 和 MCP 使用所有 Narwhal API。

Narwhal 通过一个 REST API 和一个 MCP 服务器提供经济指标、汇率、大宗商品价格、公共假期和公司数据。同一个密钥可用于全部服务。

先发出一个请求,再选择你需要的 API。

- [**快速入门** 获取密钥并发出第一个请求。](https://narwhalapi.com/zh/docs/quickstart.md)
- [**连接 AI 代理** 将 MCP 服务器添加到 Claude、Cursor 或其他 MCP 客户端。](https://narwhalapi.com/zh/docs/mcp.md)
- [**Narwhal API 参考文档** 所有端点、参数和响应字段。](https://narwhalapi.com/zh/docs/api.md)

## 发出请求

此请求返回美国最新的居民消费价格指数。它从 `NARWHAL_API_KEY` 读取你的密钥。 [快速入门中介绍了获取方法。](https://narwhalapi.com/zh/docs/quickstart.md)

```
curl --request GET \
  --url https://api.narwhalapi.com/v1/economics/USA/cpi \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
```

## API

- [**经济数据 API** 来自官方发布机构的 CPI、劳动力、GDP 和贸易数据。](https://narwhalapi.com/zh/docs/api/economics.md)
- [**外汇 API** 当前汇率、换算和历史数据。](https://narwhalapi.com/zh/docs/api/fx.md)
- [**节假日 API** 全国假日、地区假日和补休假日。](https://narwhalapi.com/zh/docs/api/calendars.md)
- [**棕榈油 API** 来自印度尼西亚和马来西亚的 CPO 和 FFB 价格。](https://narwhalapi.com/zh/docs/api/commodities.md)
- [**现货金属 API** 贵金属、铜、WTI 和布伦特原油。](https://narwhalapi.com/zh/docs/api/commodities/spot.md)
- [**经济数据发布日历** 发布日期和每个已发布的版本。](https://narwhalapi.com/zh/docs/api/economic-calendar.md)
- [**Exchange closures** Closed, early close and late open days by exchange. (英语)](https://narwhalapi.com/docs/api/calendars/exchange-closures.md)
- [**Exchange status** Whether an exchange is open at an instant, with the next open and close. (英语)](https://narwhalapi.com/docs/api/calendars/exchange-status.md)
- [**Exchange list** Every exchange with a published calendar, its time zone and sessions. (英语)](https://narwhalapi.com/docs/api/calendars/exchange-list.md)
- [**工作日天数** Add business days to a date or count them between two dates. (英语)](https://narwhalapi.com/docs/api/calendars/business-days.md)
- [**预测 API** Probabilities by topic and event, with history.](https://narwhalapi.com/zh/docs/api/predictions.md)
- [**贸易数据 API** 按伙伴国和 HS 产品划分的货物进出口。](https://narwhalapi.com/zh/docs/api/trade.md)
- [**任意序列 API** 按 ID 查询世界银行和加拿大统计局的序列。](https://narwhalapi.com/zh/docs/api/any-series.md)
- [**申报文件参考** Statements, filing lists and 5% holder reports.](https://narwhalapi.com/zh/docs/api/filings.md)
- [**政策利率** Central-bank policy rates, reserves and balance sheets.](https://narwhalapi.com/zh/docs/api/economics/policy-rate.md)
- [**价格流** 已停止。请通过 REST 路由读取实时价格。](https://narwhalapi.com/zh/docs/api/prices-stream.md)

## 账户与运营

- [**API 密钥** 创建密钥,将其保存为机密,并作为 Bearer 令牌发送。](https://narwhalapi.com/zh/docs/authentication.md)
- [**API 错误码与额度** 问题响应、重试和请求限制。](https://narwhalapi.com/zh/docs/errors.md)
- [**数据时效性** 发布数据如何被核查、存储和更新。](https://narwhalapi.com/zh/docs/freshness.md)
- [**版本管理** API 如何变化,哪些内容保持稳定。](https://narwhalapi.com/zh/docs/versioning.md)
- [**变更日志** 公开的产品变更。](https://narwhalapi.com/zh/changelog.md)
- [**OpenAPI** 自动生成的架构。](https://api.narwhalapi.com/openapi.json)

此页面对你有帮助吗?
