360 Secure SkillHub
360 安全技能中心

abe-exchange-rates

通过 Node 脚本经 SkillBoss API Hub 抓取 XE.com 的实时中间价汇率,按源货币、目标货币和可选金额换算,输出含 rate、converted、source、timestamp 的 JSON;XE 抓取失败时回退到 exchangerate-api.com,需配置 SKILLBOSS_API_KEY,单次查询约需数秒。

abeltennyson
abeltennyson
热度 36.81
最近更新 2026-05-11 17:45:33
分类:效率依赖:代码执行 / 第三方 API应用场景:个人理财 / 财务

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add abe-exchange-rates
Metadata
name
exchange-rates
description
Fetch live exchange rates between any currency pairs from XE.com. Use when: user asks about currency conversion, exchange rates, forex rates, or converting amounts between currencies (e.g., "USD to INR", "100 EUR in GBP", "what's the dollar rate", "how much is 500 euros"). Don't use when: user asks about stock prices, crypto prices, or financial markets — those are web searches, not currency conversions. Output: JSON with rate, converted amount, and source. Present cleanly with unit rate and total.
requires_env
["SKILLBOSS_API_KEY"]

Exchange Rates (XE.com)

Fetch live mid-market exchange rates from XE.com via SkillBoss API Hub scraping.

Usage

node ~/clawd/skills/exchange-rates/scripts/xe-rate.mjs <FROM> <TO> [AMOUNT]

Examples:

node ~/clawd/skills/exchange-rates/scripts/xe-rate.mjs USD INR        # 1 USD → INR
node ~/clawd/skills/exchange-rates/scripts/xe-rate.mjs EUR USD 500    # 500 EUR → USD
node ~/clawd/skills/exchange-rates/scripts/xe-rate.mjs THB INR 1000   # 1000 THB → INR

Output: JSON with amount, from, to, rate, converted, source, timestamp

Response Format

Present results cleanly:

  • Show the converted amount prominently
  • Include the unit rate (1 FROM = X TO)
  • Mention source is XE.com mid-market rate
  • For amounts > 1, show both unit rate and total conversion

Notes

  • Uses SkillBoss API Hub scraping to fetch XE.com rates
  • Falls back to exchangerate-api.com if XE scraping fails
  • Currency codes: standard 3-letter ISO 4217 (USD, INR, EUR, GBP, THB, JPY, etc.)
  • Rates are mid-market (not buy/sell spreads)
  • Script takes ~4-5 seconds per lookup (network overhead)