longbridge-fx

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

longbridge-fx

longbridge-fx

Foreign-exchange rates for all currencies Longbridge supports.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
长桥证券支持的所有货币的外汇汇率查询。
响应语言:匹配用户输入语言——简体中文/繁体中文/英文。

When to use

使用场景

  • "今天美元兑港币多少", "USD to HKD today" → run, look up
    USD/HKD
    row.
  • "100 港币能换多少美金" → run, compute
    100 / (USD/HKD)
    (or
    100 * (HKD/USD)
    , depending on the row's quote convention).
  • "我组合里 HKD / USD / CNY 都有,统一换算成 USD" → run once, normalise each currency leg.
  • "人民币兑美元 / CNH vs CNY" → check whether the row is
    CNY/USD
    or
    CNH/USD
    ; surface the symbol verbatim.
For cross-rates not directly listed, derive from two USD-quoted rows (e.g.
EUR/JPY = (EUR/USD) / (JPY/USD)
).
  • "今天美元兑港币多少", "USD to HKD today" → 执行技能,查询
    USD/HKD
    汇率行。
  • "100 港币能换多少美金" → 执行技能,计算
    100 / (USD/HKD)
    (或
    100 * (HKD/USD)
    ,取决于汇率报价规则)。
  • "我组合里 HKD / USD / CNY 都有,统一换算成 USD" → 执行一次技能,将每种货币统一换算为美元。
  • "人民币兑美元 / CNH vs CNY" → 检查汇率行是
    CNY/USD
    还是
    CNH/USD
    ,直接显示对应符号。
对于未直接列出的交叉汇率,可通过两个以美元报价的汇率推导(例如:
EUR/JPY = (EUR/USD) / (JPY/USD)
)。

Subcommand

子命令

Single CLI command, no arguments beyond format. Run
longbridge exchange-rate --help
if unsure of current flags.
bash
longbridge exchange-rate --format json
There are no per-currency filters — the command returns the full table; pick the row(s) you need from the JSON.
单一CLI命令,除格式参数外无其他参数。若不确定当前可用参数,可运行
longbridge exchange-rate --help
查看。
bash
longbridge exchange-rate --format json
该命令不支持按货币筛选——会返回完整汇率表;请从JSON结果中选取所需行。

Workflow

工作流程

  1. Run
    longbridge exchange-rate --format json
    .
  2. Find the row matching the user's pair (mind the quote convention:
    BASE/QUOTE
    is "1 BASE = N QUOTE").
  3. If user wants a specific amount, do the arithmetic inline; show both rate and computed amount.
  4. If the user's pair isn't directly quoted, derive via USD:
    A/B = (A/USD) / (B/USD)
    .
  5. Cite source as Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券, plus the as-of timestamp from the response if provided.
  1. 运行
    longbridge exchange-rate --format json
  2. 找到与用户查询货币对匹配的行(注意报价规则:
    BASE/QUOTE
    表示"1单位BASE货币 = N单位QUOTE货币")。
  3. 若用户查询特定金额,直接进行计算;同时显示汇率和计算后的金额。
  4. 若用户查询的货币对未直接报价,通过美元推导:
    A/B = (A/USD) / (B/USD)
  5. 标注数据来源为Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券,若返回结果包含时间戳,需一并标注。

CLI examples

CLI示例

bash
undefined
bash
undefined

Full rate table

完整汇率表

longbridge exchange-rate --format json

That's it — there's no symbol argument. Filter on the JSON client-side.
longbridge exchange-rate --format json

仅此而已——没有货币符号参数。请在客户端对JSON结果进行筛选。

Output

输出

JSON array, one row per supported pair. Typical fields:
FieldMeaning
symbol
/
pair
e.g.
USD/HKD
,
CNY/USD
rate
numeric exchange rate
timestamp
as-of time
Render the relevant row(s) only; don't dump the full table unless the user asked for it.
JSON数组,每个支持的货币对对应一行。典型字段如下:
字段含义
symbol
/
pair
例如:
USD/HKD
,
CNY/USD
rate
数值型汇率
timestamp
数据更新时间戳
仅展示相关行;除非用户明确要求,否则不要输出完整表格。

Error handling

错误处理

SituationLLM response
Shell
command not found: longbridge
Fall back to MCP if configured; otherwise tell the user to install longbridge-terminal.
Empty arrayUnusual — relay verbatim and tell the user to retry shortly.
Pair not in response"Longbridge doesn't quote
<X/Y>
directly — derive from
X/USD
and
Y/USD
."
Other stderrSurface verbatim.
场景LLM响应
Shell提示
command not found: longbridge
若已配置MCP则切换至MCP;否则告知用户安装longbridge-terminal。
返回空数组此情况罕见——直接告知用户并建议稍后重试。
查询的货币对不在结果中"Longbridge未直接报价
<X/Y>
——可通过
X/USD
Y/USD
推导。"
其他标准错误输出直接显示错误内容。

MCP fallback

MCP fallback

CLI subcommandMCP tool
exchange-rate
mcp__longbridge__exchange_rate
(or fall back via the equivalent MCP tool)
CLI子命令MCP工具
exchange-rate
mcp__longbridge__exchange_rate
(或使用等效MCP工具作为备选)

Related skills

相关技能

User asksRoute to
Multi-currency holdings normalised to one base
longbridge-positions
then convert with this skill
Account-level performance with currency exposure
longbridge-portfolio
Statement export with FX legs
longbridge-statement
Stock quote in native currency
longbridge-quote
用户提问跳转至
将多币种持仓统一换算为单一基准货币先调用
longbridge-positions
,再使用本技能进行换算
包含货币敞口的账户级业绩
longbridge-portfolio
包含外汇项的对账单导出
longbridge-statement
原生货币计价的股票报价
longbridge-quote

File layout

文件结构

longbridge-fx/
└── SKILL.md          # prompt-only, no scripts/
longbridge-fx/
└── SKILL.md          # 仅含提示词,无scripts/目录