Developer Selection Guide开发者选型指南

Choose a Free Currency Rate API
That Fits the Job
选择真正适合任务的
免费货币汇率 API

Match update cadence, request limits, base currencies, data rights, and response semantics to your app before writing integration code.

先把更新频率、调用额度、基准币、数据许可和响应语义与应用需求对齐,再开始编写接入代码。

Decision workflow for matching a free currency rate API to an app, checking its free plan, and validating the JSON response

Free currency rate API: the task-first answer免费货币汇率 API:先按任务选择

A free currency rate API is useful when its published rate matches the decision your product makes. A travel display may only need a daily reference rate. A checkout system needs a documented timestamp, predictable base-currency behavior, decimal-safe conversion, and a license that permits commercial display. A trading screen needs executable market data rather than a generic currency conversion feed.

免费货币汇率 API 是否可用,取决于它发布的汇率是否匹配产品要做的决策。旅行展示可能只需要每日参考汇率;结账系统需要明确时间戳、稳定的基准币规则、十进制换算和允许商业展示的许可;交易界面则需要可成交行情,而不是普通货币换算数据。

Shortlist rule: reject an API as soon as its cadence, rate type, quota, supported currencies, or data rights fail a must-have requirement.

筛选原则:只要更新频率、汇率类型、额度、币种覆盖或数据权利不满足硬性需求,就应立即排除。

Define what “currency rate” means in your product先定义产品里的“货币汇率”

Daily reference rate or intraday market rate?需要每日参考汇率还是日内市场汇率?

The words current and latest do not guarantee a live quote. Read the provider’s update schedule and inspect the response timestamp. Central-bank reference rates are appropriate for many reports and informational converters, but they are not bid or ask prices available for execution.

“当前”和“最新”并不保证实时。应阅读供应商的更新计划并检查响应时间戳。央行参考汇率适合报表和信息型换算器,但它不是可以成交的买价或卖价。

Base currency, quote currency, and direction基准币、报价币与换算方向

For a response where USD is the base and EUR is 0.92, one USD equals 0.92 EUR. Converting the other direction requires division, not multiplication. Confirm whether the free plan permits changing the base currency or requires cross-rate calculations.

如果响应以 USD 为基准币、EUR 的值为 0.92,含义是 1 美元等于 0.92 欧元。反向换算应使用除法而不是乘法。还要确认免费层是否允许更换基准币,或是否需要自行计算交叉汇率。

Worked cross-rate example: suppose one USD equals 0.9200 EUR and 156.40 JPY. Converting EUR to JPY through the common USD base gives 156.40 ÷ 0.9200 = 170.00 JPY per EUR. Therefore, EUR 250 becomes JPY 42,500 before fees and product-level rounding. The reciprocal, JPY to EUR, is 1 ÷ 170.00. Keep the unrounded rate for calculation and round only the final monetary result according to the destination currency and business rule.

交叉汇率示例:假设 1 美元等于 0.9200 欧元,同时等于 156.40 日元。通过共同的美元基准计算欧元兑日元,应使用 156.40 ÷ 0.9200 = 170.00,即 1 欧元等于 170 日元。因此,250 欧元在未计费用、也未执行产品舍入前对应 42,500 日元;日元兑欧元则取 1 ÷ 170.00。计算过程中保留未舍入汇率,只在最终金额上按照目标币种和业务规则舍入。

If the provider also returns a direct EUR/JPY rate, compare it with the derived cross rate rather than forcing equality. Small differences can come from update timing, source markets, or rounding. A large or persistent difference is a reason to reject the value, refresh the component rates, or route the request to a direct-pair source. Never combine component rates with different observation dates without labeling the result as mixed-time data.

如果供应商同时返回直接的 EUR/JPY 汇率,应将它与交叉计算结果比较,而不是强求二者完全相等。轻微差异可能来自更新时间、来源市场或舍入方式;差异较大或持续存在时,应拒绝该值、刷新组成汇率,或改用直接货币对来源。不要把不同观测日期的组成汇率混在一起计算;如确实这样做,必须明确标注为跨时间数据。

ISO currency codes and supported assetsISO 币种代码与资产覆盖

Normalize fiat currencies with ISO 4217 currency codes. Treat cryptocurrencies, commodities, and obsolete currencies as separate coverage questions because they do not automatically follow the same code, source, or update rules.

法定货币应使用 ISO 4217 货币代码 进行标准化。加密资产、商品和废止货币应单独核对,因为它们不一定使用相同代码、来源或更新规则。

Match a free currency API to the actual workload让免费汇率接口匹配真实负载

Workload任务Minimum data need最低数据要求Free-plan check免费层检查Failure to avoid需要避免的问题
Price display价格展示Documented daily or hourly rate有说明的日频或小时汇率Attribution and cache policy署名与缓存规则Showing stale rates as live把旧数据标成实时
Checkout estimate结账估算Timestamp, direction, rounding时间戳、方向与舍入Quota at peak traffic峰值流量下的额度Promising a settlement price误称为最终结算价
Spreadsheet refresh表格刷新Batch symbols and stable JSON批量币种与稳定 JSONRequests per refresh cycle每轮刷新请求数One request per cell每个单元格单独请求
Trading product交易产品Bid/ask or executable feed买卖价或可成交行情Usually beyond generic free rates通常超出普通免费汇率范围Using reference rates for orders用参考价执行订单

Calculate quota from user behavior根据用户行为计算额度

Estimate monthly calls as active users × refreshes per session × sessions per month, then add scheduled jobs and retries. Batch symbol requests and shared caching often matter more than the headline monthly quota.

月调用量可按活跃用户数 × 每次会话刷新次数 × 每月会话数估算,再加入定时任务和重试。能否批量查询币种、能否共享缓存,往往比宣传的月额度更重要。

Require an unambiguous currency rates JSON contract要求清晰无歧义的汇率 JSON 契约

A usable response should identify the base, quote values, effective time, publication time or freshness signal, and error state. Do not infer units from endpoint names.

可用响应应明确基准币、报价值、生效时间、发布时间或时效信号,以及错误状态。不要只根据端点名称猜测单位和含义。

Time field时间字段What it should mean应表达的含义Why it matters为什么重要
Observation date观测日期The market or reference period represented by the rate该汇率所代表的市场或参考时段A Monday response may still contain Friday's value周一收到的响应仍可能承载上周五的数值
Published at发布时间When the source released this observation来源正式发布该观测值的时间Shows whether a scheduled daily fixing arrived late可判断每日定盘值是否延迟发布
Retrieved at获取时间When your system received or cached the payload系统接收或缓存响应的时间Supports cache age and incident diagnosis, but does not prove freshness用于判断缓存年龄和排查故障,但不能单独证明数据新鲜
Revised at修订时间When an already published observation changed已发布观测值被修改的时间Prevents silent changes in reports and reconciliations避免报表和对账结果在无提示下发生变化

Model weekends and currency holidays as explicit calendar states. “No new publication expected,” “publication delayed,” and “provider failed to update” are different conditions. Define a maximum acceptable observation age per workflow, retain the last accepted value with its original date, and do not overwrite that date with the retrieval time.

应把周末和币种节假日建模为明确的日历状态。“本来就不会发布新值”“当天发布延迟”和“供应商更新失败”是三种不同情况。每类任务都应设定可接受的最大观测时效;沿用上一个有效值时保留原始日期,不能用本次获取时间覆盖它。

{
  "base": "USD",
  "as_of": "PROVIDER_TIMESTAMP",
  "rates": { "EUR": 0.92, "JPY": 156.4 }
}

Use decimal arithmetic for money货币计算使用十进制

For a USD-base response, convert USD to EUR with amount × rates.EUR. Store the provider timestamp with the converted value, define a rounding rule per currency, and avoid binary floating-point for accounting amounts.

对于以 USD 为基准币的响应,美元转欧元使用金额 × rates.EUR。保存换算值时应同时保存供应商时间戳,按币种定义舍入规则,并避免使用二进制浮点数处理会计金额。

Run a 10-minute free currency rate API acceptance test执行十分钟免费汇率 API 验收测试

1. Request one familiar pair

Query a pair such as USD/EUR and confirm the documented direction, timestamp, HTTP status, content type, and JSON schema.

2. Change the base and reverse the pair

Check whether changing the base is supported on the free plan. Compare the reverse value with the mathematical reciprocal within a sensible tolerance.

3. Trigger one expected error

Send an invalid currency code and record the status code, error body, retry guidance, and whether the response remains machine-readable.

4. Inspect quota and license language

Verify request accounting, attribution, caching, redistribution, commercial use, and what happens after the free allowance is exhausted.

5. Test timestamp and stale-data behavior

Repeat the request before and after the expected publication window. Confirm whether the observation date changes, whether weekends are carried forward, and how the response signals an unchanged or stale rate.

6. Reproduce one business conversion

Calculate a known amount with Decimal arithmetic, the documented direction, and the product's rounding rule. Store the source amount, rate, observation date, converted amount, and decision to use or reject a fallback.

1. 查询一个熟悉的币种对

查询 USD/EUR 等币种对,确认文档中的报价方向、时间戳、HTTP 状态、内容类型与 JSON 结构。

2. 更换基准币并反转币种对

确认免费层是否支持更换基准币,并检查反向汇率是否在合理误差内接近原汇率的倒数。

3. 主动触发一个预期错误

提交无效币种代码,记录状态码、错误正文、重试提示,以及响应是否仍可被程序解析。

4. 阅读额度和许可条款

核对请求计数、署名、缓存、再分发、商业使用,以及免费额度耗尽后的行为。

5. 测试时间戳和陈旧数据行为

在预计发布时间前后分别请求,确认观测日期是否更新、周末是否沿用上一值,以及接口怎样表示未更新或已经陈旧的汇率。

6. 复现一次真实业务换算

使用 Decimal、文档规定的报价方向和产品舍入规则计算一笔已知金额,并保存原金额、汇率、观测日期、换算结果,以及是否采用降级值的决定。

Know when a free exchange rates API is production-ready判断免费汇率接口能否用于生产

Cache by published cadence, not guesswork按照公布频率缓存,不要凭感觉刷新

Refreshing a daily feed every minute wastes quota without creating newer data. Cache until the expected publication window, retain the last validated response for controlled fallback, and surface the actual as-of time to users.

每分钟刷新日频数据只会浪费额度,并不会产生更新数据。应缓存到预计发布时间窗口,保留最近一次已验证响应用于受控回退,并向用户展示真实的数据时间。

Separate reference conversion from settlement区分参考换算与最终结算

A reference currency conversion API can estimate display prices. Payment processors, banks, card networks, brokers, and liquidity venues may apply different rates, spreads, fees, and timestamps at settlement.

参考货币转换 API 可以估算展示价格,但支付机构、银行、卡组织、经纪商或流动性场所可能在结算时使用不同汇率、点差、费用和时间点。

Bid, ask, and mid are not interchangeable. If EUR/USD is quoted at 1.0840 bid and 1.0850 ask, the displayed mid is 1.0845 and the quoted spread is 0.0010, or 10 pips for this pair. A user buying EUR with USD is exposed to the ask side before any separate fee; a user selling EUR receives the bid side. Multiplying every conversion by the mid produces an informational estimate, not an executable or guaranteed result.

买价、卖价和中间价不能混用。如果 EUR/USD 的买价为 1.0840、卖价为 1.0850,中间价是 1.0845,报价点差为 0.0010,也就是该货币对的 10 个点。用户用美元买入欧元时,先承受卖价一侧的成本,再叠加可能存在的单独费用;卖出欧元时则按买价计算。统一使用中间价只能得到参考估值,不能代表可成交或保证结算的结果。

Make the product label match the data: use “estimated conversion” for a reference or mid rate, disclose the as-of time, and reserve “you will receive” for a locked quote whose expiry and fees are known. If a fresh observation is unavailable, choose one documented action—show the dated cached estimate, stop the calculation, or use an approved fallback—and expose that state instead of silently presenting an old value as current.

产品文案也应与数据性质一致:参考汇率或中间价应标为“换算估值”并展示数据时间;只有在报价已锁定、有效期和费用明确时,才适合使用“预计到账”这类确定表达。无法取得新观测值时,应执行预先规定的一种动作——展示带日期的缓存估值、停止计算,或切换到经过批准的备用来源——不能把旧值悄悄包装成当前汇率。

Plan the exit from the free tier提前设计免费层退出方案

Keep provider-specific fields behind an internal adapter. Monitor quota headers and freshness, document a degraded mode, and decide whether exceeding limits should use cached data, stop conversion, or switch to an approved backup source.

使用内部适配器隔离供应商字段,监控额度响应头和数据时效,记录降级模式,并提前决定超限后使用缓存、停止换算还是切换到已批准的备用来源。

How QVeris helps evaluate currency rate capabilitiesQVeris 如何帮助评估汇率能力

QVeris can help developers discover currency-related capabilities and inspect available tool descriptions before integration. The provider remains the authority for price, quota, licensing, coverage, and freshness, so validate those terms at the source.

QVeris 可以帮助开发者发现与汇率相关的能力,并在接入前检查工具描述。价格、额度、许可、覆盖范围和时效仍以供应商为准,因此必须回到来源页面验证。

Free currency rate API questions免费货币汇率 API 常见问题

Is there a free API for currency rates?

Yes, but “free” may mean an open endpoint, a capped ongoing tier, or a temporary trial. Confirm expiry, quota, attribution, and commercial-use rules.

Are free currency rate APIs real time?

Not necessarily. Many publish daily reference rates. Check the documented cadence and timestamp instead of assuming the latest endpoint is live.

Can I use a currency rate API without a key?

Some endpoints allow it. Keyless access still may have rate limits, attribution requirements, CORS restrictions, or fair-use rules.

How do I test rate direction?

Use a familiar pair, read the base and quote fields, reverse the pair, and compare the reverse result with the reciprocal within a reasonable tolerance.

有免费的汇率 API 吗?

有,但“免费”可能是开放端点、长期限额套餐或临时试用。应确认到期时间、额度、署名和商业使用规则。

免费汇率 API 是实时的吗?

不一定。很多接口发布每日参考汇率,应检查文档中的更新频率和时间戳,不能把 latest 直接理解为实时。

可以使用无需密钥的汇率 API 吗?

部分端点可以。无需密钥仍可能存在限流、署名、CORS 或合理使用要求。

如何测试汇率方向?

选择熟悉的币种对,读取 base 与 quote 字段,再反转币种对,并检查反向结果是否在合理误差内接近倒数。

External references外部参考链接