longbridge-fx
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-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 row.
USD/HKD - "100 港币能换多少美金" → run, compute (or
100 / (USD/HKD), depending on the row's quote convention).100 * (HKD/USD) - "我组合里 HKD / USD / CNY 都有,统一换算成 USD" → run once, normalise each currency leg.
- "人民币兑美元 / CNH vs CNY" → check whether the row is or
CNY/USD; surface the symbol verbatim.CNH/USD
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. Runif unsure of current flags.longbridge exchange-rate --help
bash
longbridge exchange-rate --format jsonThere 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
工作流程
- Run .
longbridge exchange-rate --format json - Find the row matching the user's pair (mind the quote convention: is "1 BASE = N QUOTE").
BASE/QUOTE - If user wants a specific amount, do the arithmetic inline; show both rate and computed amount.
- If the user's pair isn't directly quoted, derive via USD: .
A/B = (A/USD) / (B/USD) - Cite source as Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券, plus the as-of timestamp from the response if provided.
- 运行。
longbridge exchange-rate --format json - 找到与用户查询货币对匹配的行(注意报价规则:表示"1单位BASE货币 = N单位QUOTE货币")。
BASE/QUOTE - 若用户查询特定金额,直接进行计算;同时显示汇率和计算后的金额。
- 若用户查询的货币对未直接报价,通过美元推导:。
A/B = (A/USD) / (B/USD) - 标注数据来源为Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券,若返回结果包含时间戳,需一并标注。
CLI examples
CLI示例
bash
undefinedbash
undefinedFull 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:
| Field | Meaning |
|---|---|
| e.g. |
| numeric exchange rate |
| as-of time |
Render the relevant row(s) only; don't dump the full table unless the user asked for it.
JSON数组,每个支持的货币对对应一行。典型字段如下:
| 字段 | 含义 |
|---|---|
| 例如: |
| 数值型汇率 |
| 数据更新时间戳 |
仅展示相关行;除非用户明确要求,否则不要输出完整表格。
Error handling
错误处理
| Situation | LLM response |
|---|---|
Shell | Fall back to MCP if configured; otherwise tell the user to install longbridge-terminal. |
| Empty array | Unusual — relay verbatim and tell the user to retry shortly. |
| Pair not in response | "Longbridge doesn't quote |
| Other stderr | Surface verbatim. |
| 场景 | LLM响应 |
|---|---|
Shell提示 | 若已配置MCP则切换至MCP;否则告知用户安装longbridge-terminal。 |
| 返回空数组 | 此情况罕见——直接告知用户并建议稍后重试。 |
| 查询的货币对不在结果中 | "Longbridge未直接报价 |
| 其他标准错误输出 | 直接显示错误内容。 |
MCP fallback
MCP fallback
| CLI subcommand | MCP tool |
|---|---|
| |
| CLI子命令 | MCP工具 |
|---|---|
| |
Related skills
相关技能
| User asks | Route to |
|---|---|
| Multi-currency holdings normalised to one base | |
| Account-level performance with currency exposure | |
| Statement export with FX legs | |
| Stock quote in native currency | |
| 用户提问 | 跳转至 |
|---|---|
| 将多币种持仓统一换算为单一基准货币 | 先调用 |
| 包含货币敞口的账户级业绩 | |
| 包含外汇项的对账单导出 | |
| 原生货币计价的股票报价 | |
File layout
文件结构
longbridge-fx/
└── SKILL.md # prompt-only, no scripts/longbridge-fx/
└── SKILL.md # 仅含提示词,无scripts/目录