longbridge-ah-premium
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-ah-premium
longbridge-ah-premium
A/H premium ratio for dual-listed Mainland-Chinese companies — historical kline or today's intraday curve.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
查询两地上市中资公司的A/H溢价率——历史K线或当日盘中曲线。
响应语言:匹配用户输入语言——简体中文 / 繁体中文 / 英文。
When to use
使用场景
Trigger when the user asks about the price gap between an HK listing and its A-share twin:
- "工行 A/H 溢价", "工行 AH 比价" →
1398.HK - "建行 AH 折价" →
939.HK - "中国平安港股比 A 股贵多少" →
2318.HK - "AH premium for ICBC over the last year" →
1398.HK --kline-type day --count 250 - "今天 939 的 AH 溢价走势" →
intraday 939.HK
For single-symbol quote, use . For comparison of unrelated tickers, use .
longbridge-quotelongbridge-peer-comparison当用户询问港股与其对应A股之间的价格差距时触发:
- "工行 A/H 溢价"、"工行 AH 比价" →
1398.HK - "建行 AH 折价" →
939.HK - "中国平安港股比 A 股贵多少" →
2318.HK - "AH premium for ICBC over the last year" →
1398.HK --kline-type day --count 250 - "今天 939 的 AH 溢价走势" →
intraday 939.HK
若查询单个标的报价,请使用。若对比不相关标的,请使用。
longbridge-quotelongbridge-peer-comparisonSymbol format
代码格式
Always pass the HK side () of the dual-listed pair. The Longbridge API maps internally to the A-share counterpart. Common pairs:
<CODE>.HK| Company | HK | A-share |
|---|---|---|
| 工商银行 / ICBC | | |
| 建设银行 / CCB | | |
| 中国平安 / Ping An | | |
| 招商银行 / CMB | | |
| 中国人寿 / China Life | | |
If the user gives an A-share symbol, translate to the HK side. If the stock is not dual-listed (e.g. ), the API returns no data — report that, don't retry.
700.HK请始终传入两地上市配对标的的港股代码()。长桥API会自动映射至对应的A股标的。常见配对标的:
<CODE>.HK| 公司 | 港股代码 | A股代码 |
|---|---|---|
| 工商银行(ICBC) | | |
| 建设银行(CCB) | | |
| 中国平安(Ping An) | | |
| 招商银行(CMB) | | |
| 中国人寿(China Life) | | |
若用户提供A股代码,请转换为对应的港股代码。若标的并非两地上市(例如),API将返回无数据——请告知用户此情况,无需重试。
700.HKSubcommands
子命令
Run(andlongbridge ah-premium --help) if unsure of current flags.longbridge ah-premium intraday --help
| CLI command | Returns |
|---|---|
| Historical premium ratio kline |
| Today's intraday premium time series |
--kline-type1m5m15m30m60mdayweekmonthyear--count若不确定当前参数,请运行(以及longbridge ah-premium --help)。longbridge ah-premium intraday --help
| CLI命令 | 返回内容 |
|---|---|
| 历史溢价率K线数据 |
| 当日盘中溢价时间序列数据 |
--kline-type1m5m15m30m60mdayweekmonthyear--countWorkflow
工作流程
- Identify the dual-listed pair; pass the HK symbol.
- Decide mode:
- "近一年 / last year走势" → kline
--kline-type day --count 250 - "近一月 / past month" → kline
--kline-type day --count 22 - "今天 / 当日 / intraday" → subcommand
intraday
- "近一年 / last year走势" → kline
- Run the command, render the time series (table or summary: latest premium %, range, trend).
- Cite source as Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券.
- 识别两地上市配对标的;传入港股代码。
- 确定模式:
- "近一年 / last year走势" → K线模式
--kline-type day --count 250 - "近一月 / past month" → K线模式
--kline-type day --count 22 - "今天 / 当日 / intraday" → 子命令
intraday
- "近一年 / last year走势" → K线模式
- 运行命令,渲染时间序列数据(表格或摘要:最新溢价百分比、波动范围、趋势)。
- 标注数据来源为Longbridge Securities / 数据来源:长桥证券 / 數據來源:長橋證券。
CLI examples
CLI示例
bash
undefinedbash
undefinedDefault daily kline (100 days)
默认日K线(100天)
longbridge ah-premium 939.HK --format json
longbridge ah-premium 939.HK --format json
Last year of daily premium
近一年日度溢价数据
longbridge ah-premium 1398.HK --kline-type day --count 250 --format json
longbridge ah-premium 1398.HK --kline-type day --count 250 --format json
Last 12 weeks
近12周溢价数据
longbridge ah-premium 2318.HK --kline-type week --count 12 --format json
longbridge ah-premium 2318.HK --kline-type week --count 12 --format json
Today's intraday premium curve
当日盘中溢价曲线
longbridge ah-premium intraday 939.HK --format json
undefinedlongbridge ah-premium intraday 939.HK --format json
undefinedOutput
输出格式
Each row carries a timestamp and a premium ratio (typically expressed as , in %). Negative = HK trades at a discount to A-share. Surface latest value + recent range.
(H_price * fx) / A_price - 1每一行包含时间戳和溢价率(通常计算公式为,以百分比表示)。负值表示港股较A股折价。需展示最新数值及近期波动范围。
(港股价格 * 汇率) / A股价格 - 1Error handling
错误处理
| Situation | LLM response |
|---|---|
Shell | Fall back to MCP if configured; otherwise tell the user to install longbridge-terminal. |
| Empty array | "No A/H premium data — |
stderr | Verify the symbol is an HK ticker of a dual-listed pair. |
| Other stderr | Surface verbatim. |
| 场景 | 大语言模型响应 |
|---|---|
Shell提示 | 若已配置MCP则 fallback至MCP;否则告知用户安装longbridge-terminal。 |
| 返回空数组 | "无A/H溢价数据—— |
标准错误输出 | 验证标的是否为两地上市配对的港股代码。 |
| 其他标准错误输出 | 直接展示原始错误信息。 |
MCP fallback
MCP fallback
| CLI subcommand | MCP tool |
|---|---|
| |
| |
| CLI子命令 | MCP工具 |
|---|---|
| |
| |
Related skills
相关技能
| User asks | Route to |
|---|---|
| Single-symbol price / change | |
| HK or A-share candlestick history | |
| Cross-symbol comparison (>2 tickers) | |
| Why the premium changed (news / catalysts) | |
| 用户提问 | 路由至 |
|---|---|
| 单个标的价格 / 涨跌幅 | |
| 港股或A股K线历史数据 | |
| 跨标的对比(>2个标的) | |
| 溢价变动原因(新闻 / 催化剂) | |
File layout
文件结构
longbridge-ah-premium/
└── SKILL.md # prompt-only, no scripts/longbridge-ah-premium/
└── SKILL.md # 仅含提示词,无scripts/目录