exchange-rate

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Exchange Rate

汇率查询与转换

Real-time currency exchange rate and conversion using QVeris tools.
基于QVeris工具实现的实时货币汇率查询与金额转换功能。

What This Skill Does

本Skill的功能

Exchange Rate provides:
  1. Rate lookup – Current exchange rate between two currencies (e.g. USD/EUR, CNY/JPY).
  2. Amount conversion – Convert an amount from one currency to another at current rates.
Supported via QVeris: forex and common fiat pairs; optional historical date for rate/conversion when the tool supports it.
Exchange Rate提供以下功能:
  1. 汇率查询——两种货币之间的当前汇率(例如美元/欧元、人民币/日元)。
  2. 金额转换——按照当前汇率将某一金额从一种货币转换为另一种货币。
通过QVeris支持外汇及常见法定货币对;当工具支持时,可选择历史日期进行汇率查询或金额转换。

Key Advantages

核心优势

  • Uses only QVeris API: search for tools by capability, then execute; no hardcoded provider list.
  • Fallback across providers (e.g. Alpha Vantage, Twelve Data) when one fails or is unavailable.
  • Same credential as other skills:
    QVERIS_API_KEY
    only.
  • Read-only, no side effects; suitable for travel, trade, and reporting.
  • 仅使用QVeris API:按能力搜索工具,再执行操作;无硬编码提供商列表。
  • 多提供商故障转移:当某一提供商(如Alpha Vantage、Twelve Data)故障或不可用时,自动切换至其他提供商。
  • 与其他Skill共享凭证:仅需
    QVERIS_API_KEY
  • 只读操作,无副作用;适用于旅行、贸易及报告场景。

Core Workflow

核心工作流程

  1. Parse user intent: rate (from_currency, to_currency) or convert (from_currency, to_currency, amount).
  2. Search QVeris for tools: e.g. "currency exchange rate real-time", "currency conversion".
  3. Rank results by success_rate, latency, and parameter fit (rate vs conversion).
  4. Build request parameters: for rate use
    from_currency
    /
    to_currency
    or
    symbol
    (e.g.
    EUR/USD
    ); for conversion add
    amount
    .
  5. Execute chosen tool with 5s timeout; on failure try next candidate.
  6. Return formatted rate and/or converted amount (markdown or JSON).
  1. 解析用户意图:rate(汇率查询)(源货币、目标货币)或convert(金额转换)(源货币、目标货币、金额)。
  2. 在QVeris中搜索工具:例如“currency exchange rate real-time”、“currency conversion”。
  3. 按成功率、延迟及参数匹配度(汇率查询vs金额转换)对结果排序。
  4. 构建请求参数:汇率查询使用
    from_currency
    /
    to_currency
    symbol
    (例如
    EUR/USD
    );金额转换需额外添加
    amount
    参数。
  5. 执行选定工具,超时时间为5秒;若失败则尝试下一个候选工具。
  6. 返回格式化的汇率和/或转换后的金额(Markdown或JSON格式)。

Command Surface

命令接口

Primary script:
scripts/exchange_rate.mjs
  • Get rate only:
    • node scripts/exchange_rate.mjs rate --from USD --to EUR
    • node scripts/exchange_rate.mjs rate --from CNY --to USD
  • Convert amount:
    • node scripts/exchange_rate.mjs convert --from USD --to JPY --amount 1000
    • node scripts/exchange_rate.mjs convert --from EUR --to GBP --amount 500
Optional:
--date YYYY-MM-DD
for historical rate/conversion when the tool supports it;
--format json
for machine-readable output.
主脚本:
scripts/exchange_rate.mjs
  • 仅查询汇率:
    • node scripts/exchange_rate.mjs rate --from USD --to EUR
    • node scripts/exchange_rate.mjs rate --from CNY --to USD
  • 金额转换:
    • node scripts/exchange_rate.mjs convert --from USD --to JPY --amount 1000
    • node scripts/exchange_rate.mjs convert --from EUR --to GBP --amount 500
可选参数:当工具支持时,使用
--date YYYY-MM-DD
查询历史汇率或进行历史金额转换;使用
--format json
获取机器可读格式的输出。

Safety and Disclosure

安全与披露

  • Uses only
    QVERIS_API_KEY
    ; no other secrets.
  • Calls only QVeris over HTTPS; no package install or arbitrary commands.
  • Output is for reference only; not financial or contractual advice.
  • 仅使用
    QVERIS_API_KEY
    ;无其他保密信息。
  • 仅通过HTTPS调用QVeris;无需安装包或执行任意命令。
  • 输出内容仅供参考;不构成财务或合同建议。