用实时数据更快交易 宏观发布数据
来自央行与统计机构的标准化、带时间戳的API数据流。在官方发布后50毫秒内实时推送。
起价 $25/月 · 14天免费试用
{ "currency": "USD", "indicator": "inflation", "unit": "%YoY", "data": [ { "date": "2026-04-30", "val": 2.4, "announcement_datetime": 1746086400 }, … ] }
覆盖范围图
映射到影响外汇的宏观枢纽
所有 14 种受支持的货币都涵盖在公告、日历和外汇即期端点中 — 这是驱动货币对定价的完整宏观枢纽集。
端点清单
可用公告端点
按宏观领域分组 — 通过公告 API 可用的每个指标。
类别
Economy
类别
Labor Market
类别
Monetary Policy
类别
Money Supply
类别
Government Bond Yields
宏观数据在您的 AI 工作流中
FXMacroData MCP 服务器让 Claude、Cursor、VS Code 和任何兼容 MCP 的 AI 主机能够直接查询实时央行数据 — 无论交易员和分析师在哪里工作。
Claude(网页版和桌面版)
在 Claude 设置中将 FXMacroData 添加为远程 MCP 连接器。用简单的英语查询实时政策利率、CPI、GDP 和外汇即期历史数据 — 无需代码。
VS Code 和 Cursor
在您的编辑器的连接器面板中添加 MCP 端点。在每次编码会话中获取实时宏观上下文 — 无需复制粘贴,无需上下文切换。
自定义代理和 SDK
任何兼容 MCP 的运行时。支持 OAuth 2.0 或 API 密钥认证的可流式 HTTP 传输。构建宏观感知代理、警报和管道。
覆盖范围
宏观驱动型外汇工作流所需的一切
通过完整的指标覆盖、发布日历以及为量化交易员、系统研究员和开发人员提供的实施路径,从经济数据发布到信号生成。
回测完整性
无未来函数偏差 — 时间点数据
每次经济数据发布都带有其真实的 公布日期时间,而不仅仅是参考期。当您在历史窗口上进行回测时,您的模型只会看到在该确切时刻公开可用的数据 — 与真实交易条件相符。兼容 pandas
merge_asof、事件研究框架和向量化信号管道。
数据新鲜度
实时央行数据源
公告数据在官方央行和统计机构发布后50毫秒内实时交付 — FRED, ECB, RBA, BoE, SNB, BoJ, BoC, 和 RBNZ。无中间延迟。构建实时信号监控器、利率差异仪表板或事件触发的执行逻辑,无需陈旧输入。
数据质量
跨来源标准化
每个指标在所有支持的货币中都使用一致的单位、字段名称和 JSON 模式。无需特定于货币的解析逻辑。响应直接转换为
pd.DataFrame,带有 ISO 8601 时间戳 — 适用于
resample(),
rolling()和跨货币点差计算。
集成
专为研究管道构建
同步和异步 Python 客户端、REST 端点和 Postman 集合,用于快速原型设计。在 Jupyter notebook、计划的 Airflow 作业或实时交易信号引擎中使用相同的数据模型 — 环境之间无需更改模式。
REST 端点覆盖
9 个专注于外汇宏观工作流的端点
经济指标公布系列、发布日历、COT 持仓、外汇即期汇率、交易时段和商品基准 — 都在一个一致的 API 中。
Macro Indicator Series
USD free · Pro key for othersPoint-in-time macro releases with announcement timestamps
Historical macroeconomic indicator series stamped with the exact datetime of official publication. GDP, inflation, policy rates, unemployment, and more across 14 currencies.
- Announcement-timestamped observations for event-driven backtesting
- 14 currencies with 20+ indicators per currency
- Central bank target metadata included where applicable
- Period-over-period and 12-month percentage change enrichment
GET /api/v1/announcements/{currency}/{indicator}
Forecast Layer
USD free · Pro key for othersEvery release joined to consensus, central-bank and FXMacroData forecasts
A unified forecast layer attached to every macro release. Surveys, central-bank own projections, IMF World Economic Outlook, and the FXMacroData blended forecast — all returned as a list of predictions on each announcement, joined to actuals via a stable announcement_id.
- Market consensus and survey predictions where published
- Central-bank own projections (RBNZ MPS, BoC MPR, ECB SPF, RBA SoMP, and more)
- IMF World Economic Outlook projections for inflation and GDP
- FXMacroData blended forecast on every announcement, every supported currency
- Joined to realised values via a stable announcement_id field
GET /api/v1/predictions/{currency}
Release Scheduling
Always freeUpcoming macro release dates for every currency
Upcoming release dates sorted by announcement timestamp. Filter by currency and indicator to build targeted event monitors and scheduling pipelines.
- 18 currencies plus commodity release schedules (COMM)
- Optional indicator filter for targeted scheduling
- Cross-domain rows with routing metadata for COT, commodities
- Pre-sorted by announcement timestamp for pipeline consumption
GET /api/v1/calendar/{currency}
Indicator Discovery
Always freeDiscover available indicators and metadata per currency
Programmatic indicator discovery with name, unit, frequency, and forecast metadata. Use it to enumerate what is available before querying announcement series.
- Full indicator inventory per currency with metadata
- Unit, frequency, and official forecast flag per indicator
- Optional capabilities flag adds route and auth discovery
- Optional coverage flag adds cross-currency availability grid
GET /api/v1/data_catalogue/{currency}
FX Spot Rates
Always freeDaily FX spot rates with optional technical indicators
Historical daily spot-rate series for any supported currency pair. Append technical indicators like SMA, RSI, MACD, and Bollinger Bands to each row with a single query parameter.
- Any pair combination across supported currencies
- Optional technical indicators: SMA, RSI, MACD, Bollinger Bands
- Date range filtering with sensible defaults
- JSON-native output ready for charting and analysis
GET /api/v1/forex/{base}/{quote}
Session Timing
Always freeReal-time FX session and overlap timetable
Live open/close state for Sydney, Tokyo, London, and New York sessions plus overlap windows with peak-liquidity metadata. Use for market-timing, session-aware execution, and dashboard displays.
- Four major sessions with real-time open/close state
- Overlap windows with liquidity priority ratings
- Historical snapshots via optional timestamp parameter
- Holiday-aware market day detection
GET /api/v1/market_sessions
Market Positioning
Pro key requiredWeekly CFTC speculative positioning by currency
Net speculative positioning from the CFTC Legacy Futures-Only report. Includes open interest, long/short splits for commercial, non-commercial, and non-reportable categories with FX spot overlay metadata.
- 8 major currencies mapped to CME FX futures contracts
- Full long/short/spread breakdown by trader category
- Announcement-timestamped for point-in-time accuracy
- FX spot overlay pair metadata for charting
GET /api/v1/cot/{currency}
Precious Metals
Pro key requiredGold, silver, and platinum daily price series
Daily precious metals prices from official fixing sources (LBMA, spot markets) with period-over-period and rolling 12-month change enrichment for cross-asset analysis.
- Gold (LBMA PM Fix), silver (LBMA Fix), and platinum spot
- Consistent schema with announcement series for unified pipelines
- Percentage change and 12-month rolling change enrichment
- Date range filtering with sensible defaults
GET /api/v1/commodities/{indicator}
包含参数、认证和示例的完整端点参考
开发者生态系统
更快地构建您的策略堆栈
通过笔记本、API、文档和社区渠道使用平台,这些都适用于量化研究和开发者入门。
开发者 SDK
适用于所有语言
使用官方 Python SDK 进行一行式访问,或从任何语言调用 REST API。查询参数认证,JSON 响应,除 HTTP 外零依赖。
pip install fxmacrodata
from fxmacrodata import Client client = Client(api_key="YOUR_API_KEY") # 获取 USD 通胀数据(免费,无需密钥) cpi = client.get_indicator("usd", "inflation") # 任何支持货币的政策利率 rate = client.get_indicator("eur", "policy_rate")
官方 Python SDK
安装 fxmacrodata 来自 PyPI。同步和异步客户端,pandas 就绪输出,一行式数据访问。
通过 REST 支持任何语言
带有查询参数认证的标准 JSON API。适用于 Go、R、Java、C#、MATLAB、Rust — 任何可以发出 HTTP 请求的语言。
包含 OpenAPI 规范
从已发布的生成 40 多种语言的类型化客户端 OpenAPI 规范.
USD 数据免费,无需密钥
USD 指标无需 API 密钥即可使用,因此您可以在订阅前探索数据结构并构建模型。
可嵌入小部件
将实时宏观图表添加到任何页面
FXMacroData 仪表板中的每个图表都有可嵌入版本。选择一个图表,复制一个
<iframe>
代码片段,即可将交互式利差交易、收益率差、通货膨胀和即期汇率图表添加到您的研究网站或交易博客 — 无需 API 密钥。
- 9 种图表类型 — 利差、收益率、通货膨胀、失业率、贸易差额等
- 任何支持的货币对 — EUR/USD、GBP/USD、USD/JPY 等
- 适用于任何 HTML 页面、WordPress、Notion 或静态网站
<iframe src="https://fxmacrodata.com/dashboard/embed/EUR_USD/carryChart" width="100%" height="400" ...></iframe>
免费数据下载
下载宏观数据集为 CSV 或 JSON
FXMacroData 仪表板中的每个指标都可供下载。USD 数据对所有用户免费 — 无需登录。通过 Pro 订阅解锁所有 14 种货币。
- 政策利率、通货膨胀、GDP、失业率、贸易差额等
- CSV 和 JSON — 适用于 pandas、R 或任何数据管道
- 由 Google Datasets 索引的结构化数据,适用于每种货币
- USD 数据始终免费 — 无需 API 密钥或账户
研究
最新文章
NZD Press Release Brief: Reserve Bank of New Zealand - Financial system resilient amid heightened global risks
“The global risk environment has worsened over the past six months, as conflict in the Middle East threatens world energy supply”, says R...
2026-05-06 12:00 UTC
Using FXMacroData with Prediction Markets: Kalshi and Polymarket
Step-by-step guide to connecting FXMacroData macro announcements, consensus forecasts, and COT positioning data to prediction market contracts on Kalshi and Polymarket — with working Python code.
2026-05-05 14:30 UTC
AUD Press Release Brief: Reserve Bank of Australia - Statement by the Monetary Policy Board: Monetary Policy Decision
Statement by the Monetary Policy Board: Monetary Policy Decision
2026-05-05 12:00 UTC
常见问题
常见问题
关于 FXMacroData 的常见问题解答。
数据与覆盖范围
数据实时性如何?
公告数据实时交付,在中央银行官方发布后 50 毫秒内。
包含哪些数据源?
FXMacroData 聚合来自 FRED(美联储)、ECB、RBA 和全球其他主要中央银行的数据。
哪些端点是免费的,哪些是付费的?
日历、数据目录、外汇和市场会话是公开的。USD 公告是公开的,而非 USD 公告需要 Professional API 密钥。COT 和商品始终需要 Professional API 密钥。
账单与订阅
免费试用需要信用卡吗?
是的。14 天试用期在注册时需要有效的信用卡。
我可以随时取消吗?
是的,您可以在下一个计费周期之前从您的订阅设置中取消。
免费试用期结束后会发生什么?
除非在试用期结束前取消,否则您的订阅将自动转换为付费计划。您可以在账单设置中管理此项。
量化与回测
数据是否是时间点数据/无未来函数偏差?
是的。每次发布都包含一个 announcement_datetime字段 — 数据实际公开的时间。当您将数据集切片到给定日期时,您只会看到在该时间点之前发布的版本,使其可以直接用于事件驱动的回测。
我可以将其与 pandas 或回测框架一起使用吗?
是的。所有 API 响应都返回干净的 JSON,可以直接转换为 pd.DataFrame。支持的货币之间一致的模式允许 pd.concat() 无需重新格式化。适用于 vectorbt、backtrader 和自定义事件研究管道。