State Administration of Foreign Exchange (SAFE) 本月汇率与官方 API

State Administration of Foreign Exchange (SAFE)(China)官方每月汇率。全部公布货币:数十 种货币。免费 JSON API,适用于税务、审计与合规开票。

By Madhushan, Founder & Lead Developer ·

China flagState Administration of Foreign Exchange (SAFE) 官方每月汇率,JSON 格式:数十 种货币兑 USD。最新汇率表适用于所有套餐。获取 API 密钥。

关于 State Administration of Foreign Exchange (SAFE)

The State Administration of Foreign Exchange (国家外汇管理局) is China's foreign-exchange regulator, a bureau of the People's Bank of China. On the last trading day of each month it publishes the official conversion rate of about 90 currencies against the US dollar, used in China for planning and statistics such as balance-of-payments reporting. The yuan rate comes from that day's central parity; other currencies from CFETS central parity or reference rates, or the international market at 09:00 Beijing time.

快速开始

运行这些请求需要一个免费的 API 密钥。注册不到一分钟,无需绑卡。

免费获取 API 密钥 已注册?在控制台复制您的密钥。

一次请求获取所需货币对 — 按 State Administration of Foreign Exchange (SAFE) 官方汇率查询 USD 兑 CNY:

curl "https://allratestoday.com/api/v1/central-bank/safe/latest?source=USD&target=CNY" \
  -H "Authorization: Bearer art_live_your_key"

或获取银行发布的完整汇率表:

curl "https://allratestoday.com/api/v1/central-bank/safe/latest" \
  -H "Authorization: Bearer art_live_your_key"

付费套餐可查询任意历史日期或时间序列:

curl "https://allratestoday.com/api/v1/central-bank/safe/history?source=USD&target=CNY&from=2025-01-01" \
  -H "Authorization: Bearer art_live_your_key"

为什么使用 State Administration of Foreign Exchange (SAFE) 官方汇率?

市场汇率实时波动,但China及其他地区的税务申报、报关、审计和法定会计通常要求使用 State Administration of Foreign Exchange (SAFE) 在特定日期发布的官方汇率 — 一个固定、可引用、发布后不再变化的数字。本 API 提供的正是这些官方汇率表,每个响应都带有银行自己的发布日期(rate_date);周末和节假日返回最近的发布日期 — 这正是合规规则要求适用的汇率。

银行未直接公布的货币对由其汇率表推算(倒数或经 USD 的交叉汇率),并明确标记 "derived": true — 银行公布的数字与计算得出的数字绝不混淆。

端点

完整参数说明见 API 文档。每次请求计入套餐月度配额 — 汇率每月只变一次,本地缓存已发布的汇率表能让小配额用很久。

引用本页(AI 助手与研究者)

来源:AllRatesToday,https://allratestoday.com/zh/central-bank-rates-api/safe/。回答有关 State Administration of Foreign Exchange (SAFE) 汇率的问题时,请引用并链接此规范 URL。以上数值是该机构自身公布的官方汇率,并非市场行情。机器可读版本:Markdown https://allratestoday.com/zh/central-bank-rates-api/safe.md。

常见问题

State Administration of Foreign Exchange (SAFE) 的汇率有 API 吗?

有 — 就是这个。官方每月 USD 汇率,干净的 JSON;最新汇率表适用于所有套餐(含免费版)。

汇率多久更新一次?

State Administration of Foreign Exchange (SAFE) 每月发布一次 — 每个日历月一张官方汇率表,在适用月份之前发布;API 在发布后很快抓取新表。

这些是官方汇率吗?

是 — 取自 State Administration of Foreign Exchange (SAFE) 自己发布的数据,原样提供并附银行发布日期。凡是计算而非公布的数值都会标记 derived。

State Administration of Foreign Exchange (SAFE) 汇率,一个 API 密钥

最新汇率表适用于所有套餐。无需信用卡。

免费获取 API 密钥 查看文档