Free FX Data API
Selection and Integration Guide免费外汇数据 API
选择与接入指南
Find a free FX data API, compare the limits and data semantics that matter, test a JSON request, and validate the result before your app depends on it.
查找免费的外汇数据 API,比较真正影响使用的数据口径与限制,测试 JSON 请求,并在应用依赖该接口前完成校验。
Free FX data API: what to look for first免费外汇数据 API:先检查哪些条件
A useful free FX API exposes a documented HTTPS endpoint, identifies the base and quote currencies, returns a source timestamp, and explains its source, update frequency, quota, authentication, license, and error behavior. “Free” can mean a public endpoint, a limited plan, or a trial, so verify the current documentation before building a dependency.
可用的免费外汇接口应提供有文档的 HTTPS 端点,明确基准币与目标币,返回来源时间,并说明数据来源、更新频率、额度、认证、许可和错误结构。“免费”可能指公共端点、限额套餐或试用,因此建立依赖前必须核对最新文档。
| Need需求 | Verify检查 | Common mismatch常见错配 |
|---|---|---|
| Current conversion当前换算 | Latest timestamp and base rules最新时间与基准币规则 | Daily reference rate presented as live把日频参考价当成实时价 |
| App or dashboard应用或看板 | Quota, CORS, caching, status page额度、CORS、缓存与状态页 | Trial mistaken for a permanent free tier把试用当成长期免费层 |
| Trading use交易用途 | Bid/ask, latency, venue, license买卖价、延迟、场所与许可 | Midpoint used as an executable quote把中间价当成可成交报价 |
Define the FX dataset, not just one exchange-rate endpoint先定义完整 FX 数据集,而不是只找一个汇率端点
Spot rates are only one layer of foreign-exchange data即期汇率只是外汇数据的一层
This page is for research and data teams comparing broad FX coverage. Depending on the project, “FX data” may include spot reference rates, historical closes, intraday bars, bid/ask quotes, central-bank fixings, forward points, outright forwards, swaps, implied yields, volatility measures, and macro series. List the required instruments and tenors before evaluating a provider; otherwise a good conversion API can be mistaken for a complete research dataset.
本页面向比较广义外汇覆盖的研究人员和数据团队。根据项目不同,“FX 数据”可能包括即期参考汇率、历史收盘、盘中 K 线、买卖报价、央行定盘、远期点、远期汇率、掉期、隐含收益率、波动率指标和宏观序列。评估供应商前应先列出所需工具与期限,否则很容易把一个好用的换算 API 误认为完整研究数据集。
Model instrument, tenor, fixing, and observation separately分别建模工具、期限、定盘与观测
A normalized record should identify the currency pair, instrument type, tenor or maturity, quote convention, source, fixing name where relevant, observation time, publication time, timezone, rate side, and unit. “EURUSD 1M” can mean a forward point, outright forward, volatility tenor, or aggregation interval. Do not overload one symbol field with all of these meanings.
标准化记录应明确币种对、工具类型、期限或到期日、报价惯例、来源、相关定盘名称、观测时间、发布时间、时区、报价方向和单位。“EURUSD 1M”可能指一个月远期点、远期汇率、波动率期限,也可能只是聚合周期,不能把这些含义都塞进一个 symbol 字段。
Worked forward-points example: tenor and units change the meaning远期点案例:期限与单位会改变报价含义
Assume a synchronized snapshot has EUR/USD spot at 1.08500 and a one-month mid forward adjustment of +18.5 pips. Under a four-decimal pip convention, the adjustment is 18.5 × 0.0001 = 0.00185, so the one-month outright forward is 1.08500 + 0.00185 = 1.08685. A provider may instead transmit the points as the integer 185 and document that each unit represents 0.00001. Adding the raw value 185 to spot is obviously wrong; treating 185 as 185 pips gives 1.10350 and is still wrong by a factor of ten.
Store instrument_type=forward_points, tenor, spot date, maturity or value date, day-count and holiday-calendar context, side, point scale, spot source, observation time, and whether the outright was supplied or derived. Bid and ask outrights must be built from compatible sides rather than one midpoint. A “1M” tenor is not always a fixed number of calendar days: broken dates, month-end rules, holidays, and settlement conventions can change the value date. Historical research should therefore join by the actual maturity and dataset vintage, not by a label alone.
远期点案例:期限与单位会改变报价含义
假设同一时点的 EUR/USD 即期中间价为 1.08500,一个月远期调整为 +18.5 个 pip。按照四位小数的 pip 规则,调整值为 18.5 × 0.0001 = 0.00185,因此一个月远期汇率为 1.08500 + 0.00185 = 1.08685。但供应商也可能把远期点传成整数 185,并在文档中规定每个单位代表 0.00001。把原始数值 185 直接加到即期价显然错误;把它误读成 185 个 pip,得到 1.10350,同样会产生十倍误差。
记录中应明确保存 instrument_type=forward_points、期限、即期交割日、到期或起息日、日计数与节假日日历背景、买卖方向、点值缩放、即期来源、观测时间,以及远期汇率是供应商直接返回还是本地推导。远期买价和卖价必须由兼容的同侧报价构造,不能只使用一个中间价。“1M”也不一定等于固定日数:非标准到期日、月末规则、节假日和结算惯例都可能改变实际起息日。因此,历史研究应按真实到期日和数据版本关联,不能只靠期限标签。
Coverage quality includes history, revisions, and missing regimes覆盖质量还包括历史深度、修订规则与缺失制度
Research datasets need stable backfills and documented revision behavior. Check the earliest date by instrument, holiday calendars, timezone changes, currency redenominations, discontinued benchmarks, synthetic crosses, and whether historical values can be revised after publication. A broad pair count is less valuable than a smaller universe with consistent lineage and no unexplained gaps.
研究数据集需要稳定回补和明确修订规则。应检查各类工具的最早日期、节假日日历、时区变化、货币重估、停用基准、合成交叉盘,以及历史数值发布后是否会修订。数量很多但来源不清的币种对,不如覆盖较小却口径一致、没有无解释缺口的数据集可靠。
Compare free FX datasets by research coverage and lineage按研究覆盖与数据来源链比较免费 FX 数据
| Criterion维度 | Question问题 | Evidence to keep保留证据 |
|---|---|---|
| Instrument breadth工具广度 | Spot only, or also fixings, forwards, swaps, and volatility?只有即期,还是包含定盘、远期、掉期和波动率? | Instrument catalogue and sample records工具目录与样例记录 |
| History历史深度 | What is the first complete date for each series?每条序列从何时开始完整? | Coverage matrix and gap report覆盖矩阵与缺口报告 |
| Lineage数据来源链 | Is each observation official, contributed, aggregated, or derived?每条观测是官方、贡献、聚合还是推导数据? | Source, methodology, direct/derived flag来源、方法与直接/推导标记 |
| Revision policy修订政策 | Can old values change and are revisions discoverable?历史值是否会变化,能否识别修订? | Vintage date, change log, reproducible snapshot数据版本日、变更日志与可复现快照 |
| Delivery交付方式 | Can research ranges be fetched efficiently in bulk?能否高效批量获取研究区间? | Pagination, row limits, export format, compression分页、行数限制、导出格式与压缩 |
Use the free layer to audit coverage, not to assume production economics用免费层审计覆盖,不要据此推断生产成本
A free plan is valuable for checking symbols, units, timestamps, gap behavior, and sample history. It rarely proves that a full multi-year, multi-instrument backfill is economical. Estimate rows, calls, export size, and refresh frequency for the real universe; then verify bulk-download rights, storage permissions, and redistribution terms before treating the API as a data-platform dependency.
免费套餐很适合检查代码、单位、时间戳、缺口行为和样例历史,但通常不能证明多年、多工具回补在经济上可行。应按真实标的范围估算行数、调用量、导出体积和刷新频率,再确认批量下载权、存储权限和再分发条款,之后才能把它作为数据平台依赖。
Choose the right FX data source and rate type选择正确的外汇数据源与汇率类型
API features are only useful when the underlying rate matches the job. Before comparing request limits or SDKs, identify whether the provider returns an official reference series, an aggregated midpoint, a delayed market snapshot, or venue-specific bid and ask prices. Two valid APIs can disagree because they observe different markets, fixing times, contributors, and calculation rules.
只有底层汇率口径符合任务,API 功能才有意义。比较请求额度或 SDK 前,应先确认供应商返回的是官方参考序列、聚合中间价、延迟市场快照,还是特定交易场所的买卖价。两个都有效的接口可能因为市场、定盘时间、报价来源和计算规则不同而出现差异。
| Source type来源类型 | What it represents代表什么 | Suitable uses适合场景 | Watch for注意事项 |
|---|---|---|---|
| Central-bank reference央行参考汇率 | A scheduled official fixing or reference value按计划发布的官方定盘或参考值 | Reporting, statistics, reconciliation报表、统计、对账 | Business-day schedule and limited intraday freshness工作日发布,盘中时效有限 |
| Aggregated midpoint聚合中间价 | A calculated value from one or more contributors由一个或多个报价来源计算的数值 | Displays, estimates, general conversion展示、估算、通用换算 | Methodology, source disclosure, and delay计算方法、来源披露与延迟 |
| Market bid and ask市场买价与卖价 | Observable quotes at a stated venue or feed指定场所或数据源的可观察报价 | Trading analysis and valuation交易分析与估值 | Latency, entitlement, spread, and redistribution延迟、授权、点差与再分发 |
| Derived cross rate推导交叉汇率 | A pair calculated through an intermediate currency通过中间币种计算得到的币种对 | Broad pair coverage扩展币种对覆盖 | Rounding, path choice, and source consistency舍入、计算路径与来源一致性 |
Midpoint, bid, ask, open, high, low, and close中间价、买价、卖价与 OHLC
A single rate field is ambiguous unless the documentation defines it. A trading-oriented feed may provide bid, ask, midpoint, and OHLC values for an interval, while a conversion API may expose one reference value. Store the rate type with every observation so downstream code does not treat a midpoint as an executable price.
如果文档没有定义,单独一个 rate 字段存在歧义。交易类数据源可能提供买价、卖价、中间价以及某个周期的 OHLC,而换算接口可能只返回一个参考值。应为每条观测保存汇率类型,避免下游代码把中间价当成可成交价格。
Base currency restrictions and cross-rate calculations基准币限制与交叉汇率计算
Some free plans allow only one base currency. Converting through that base can expand coverage, but it introduces two observations, extra rounding, and a dependency on consistent timestamps. Record whether a pair was supplied directly or derived, the calculation path, and the precision used.
部分免费套餐只允许一个基准币。通过该基准币换算可以扩大覆盖,但会引入两条观测、额外舍入,并依赖时间戳一致性。应记录币种对是直接返回还是推导得到、计算路径以及采用的精度。
Worked cross-rate example. Suppose one snapshot reports EUR/USD = 1.0800 and USD/JPY = 150.20. The derived EUR/JPY rate is 1.0800 × 150.20 = 162.216. If the feed displays three decimals, the published value becomes 162.216; if it displays two, it becomes 162.22. That result is defensible only when both source observations use compatible rate types and timestamps. Combining yesterday’s EUR/USD reference rate with a live USD/JPY midpoint creates a number that is mathematically correct but financially inconsistent.
交叉汇率计算示例。 假设同一份快照中 EUR/USD = 1.0800、USD/JPY = 150.20,则推导出的 EUR/JPY 为 1.0800 × 150.20 = 162.216。若接口保留三位小数,结果为 162.216;若只保留两位,则显示为 162.22。只有两条来源数据采用兼容的汇率类型和观测时间,这个结果才可靠。把昨天的 EUR/USD 官方参考价与实时 USD/JPY 中间价相乘,数学上虽然成立,金融口径却并不一致。
Test a free FX data API JSON response测试免费外汇数据 API 的 JSON 响应
Provider-neutral latest-rates request与供应商无关的最新汇率请求
GET /latest?base=USD&symbols=EUR,JPY
Accept: application/json
{
"base": "USD",
"timestamp": "SOURCE_TIMESTAMP",
"rates": {
"EUR": "RATE_VALUE",
"JPY": "RATE_VALUE"
}
}The endpoint and values are placeholders, not claims about a provider or current market rates. Replace them with the selected API documentation, then verify direction, timestamp, numeric type, missing symbols, and error behavior.
端点与数值均为占位示例,不代表任何供应商或当前市场汇率。请按选定接口文档替换,并校验方向、时间戳、数值类型、缺失币种和错误行为。
Fields a production response should make unambiguous生产响应中应明确的字段
| Field字段 | Validation校验要求 |
|---|---|
base / quote | Valid currency identifiers with an explicit pair direction有效币种标识,并明确币种对方向 |
rate / rates | Positive decimal values with a documented rate type and precision正数十进制值,并说明汇率类型和精度 |
timestamp | Source observation time, timezone, and freshness—not only server response time来源观测时间、时区与时效,而不只是服务器响应时间 |
source | Provider or methodology identifier sufficient for provenance足以追溯来源的供应商或方法标识 |
success / error | Machine-readable error code, message, and retry classification机器可读的错误码、错误信息及可重试性分类 |
Integration checklist for a free currency API免费汇率接口接入清单
- Validate base and quote codes before sending the request.
- Set an explicit timeout and handle 4xx, 5xx, and rate-limit responses separately.
- Store the source timestamp, retrieval time, provider, and raw response checksum.
- Use decimal arithmetic and make cache or database writes idempotent.
- Alert on stale timestamps, schema changes, missing pairs, and quota exhaustion.
- 发送请求前校验基准币与目标币代码。
- 设置明确超时,分别处理 4xx、5xx 与限频响应。
- 保存来源时间、抓取时间、供应商与原始响应校验值。
- 使用十进制运算,并让缓存或数据库写入具备幂等性。
- 对陈旧时间戳、结构变化、缺失币种对与额度耗尽告警。
Validate FX data before production use外汇数据用于生产前的校验
Reference rates are not executable prices参考汇率不是可成交价格
A midpoint or official reference rate does not include a bank spread, card fee, slippage, or a venue-specific bid and ask. Label the data accurately and do not present it as an execution guarantee.
中间价或官方参考价不包含银行点差、银行卡费用、滑点或特定交易场所的买卖价。应准确标注数据口径,不能将其描述为成交保证。
Freshness, continuity, and outlier checks时效、连续性与异常值检查
Reject non-positive or malformed rates, detect stale source timestamps, compare reciprocal pairs within a defined tolerance, and classify missing observations. A second source can trigger review, but should not silently manufacture a replacement value.
拒绝非正数或异常结构,检测陈旧来源时间,在设定容差内比较倒数币种对,并分类缺失观测。第二来源可触发复核,但不应静默创造替代值。
Quota-aware caching and refresh design感知额度的缓存与刷新设计
Match cache duration to the provider’s actual update schedule. Calling a daily reference endpoint every minute wastes quota without improving freshness. Keep a short-lived stale-on-error window for non-critical displays, but expose the observation timestamp so users and downstream services can distinguish cached data from a fresh response.
缓存时间应与供应商的实际更新计划匹配。每分钟调用一次日频参考接口只会浪费额度,不会提升时效。非关键展示可在接口出错时短暂沿用旧数据,但必须展示观测时间,让用户和下游服务能够区分缓存数据与最新响应。
Retries, circuit breakers, and provider fallback重试、熔断与供应商回退
Retry only transient failures with exponential backoff and jitter. Do not retry invalid currencies, authentication failures, or exhausted monthly quotas as if they were network timeouts. A fallback provider must be normalized to the same pair direction, timestamp rules, and rate type before its values can replace the primary source.
只对暂时性故障使用带随机抖动的指数退避。无效币种、认证失败或月度额度耗尽不能当作网络超时反复重试。备用供应商的数据必须先统一币种对方向、时间戳规则和汇率类型,才能替代主数据源。
Licensing, attribution, and redistribution许可、署名与再分发
Free access to an endpoint does not automatically grant the right to cache indefinitely, publish a bulk download, resell the data, or remove attribution. Keep the terms version and review date with the integration record, and re-check them before changing how the data is displayed or distributed.
免费访问端点并不自动授予无限期缓存、公开批量下载、转售数据或移除署名的权利。应在接入记录中保存条款版本和复核日期,并在改变数据展示或分发方式前重新检查。
How QVeris helps you find a free FX data APIQVeris 如何帮助查找免费外汇数据 API
QVeris helps developers and agents discover and inspect callable capabilities. Open the QVeris tool details to inspect relevant capabilities, inspect their inputs and outputs, then follow the QVeris documentation to connect them. QVeris can reduce discovery and schema-inspection work; it does not change a provider’s rates, license, quota, or service level.
QVeris 帮助开发者与 Agent 发现并检查可调用能力。可打开 QVeris 工具详情,查看相关能力,检查输入输出,再按 QVeris 文档完成接入。QVeris 能减少发现与结构检查工作,但不会改变供应商的汇率、许可、额度或服务水平。
Free FX API questions免费外汇 API 常见问题
Yes. Public endpoints and free plans exist, but freshness, coverage, source, attribution, and quotas differ.
Yes, for reference rates and some market data. Verify whether the response is daily, delayed, intraday, midpoint, or bid/ask.
There is no universal best option. Match the provider to required pairs, freshness, source, quota, rights, and reliability.
Some endpoints are keyless, but they may require attribution, enforce limits, or restrict redistribution.
Do not treat a search converter as an official supported API. Choose a documented endpoint with explicit terms.
Not necessarily. “Latest” may be daily, hourly, delayed, or intraday; inspect the source timestamp and methodology.
有,但公共端点和免费套餐在时效、覆盖、来源、署名和额度上不同。
有,既有参考汇率接口,也有部分市场数据接口。使用前应确认返回的是日频、延迟、盘中、中间价还是买卖价。
没有适合所有场景的最佳选择。应根据所需币种对、时效、来源、额度、使用权利和可靠性选择供应商。
部分接口无需密钥,但仍可能要求署名、实施限频或限制数据再分发。
不要把搜索结果中的换算器当成官方支持的 API。应选择文档完整、使用条款明确的接口。
不一定。“最新”可能代表日频、小时、延迟或盘中数据,应检查来源时间戳和计算方法。
