longbridge/skills / skills/longbridge-market-data
longbridge-market-data
VerifiedReal-time quotes, K-line charts, order book, trade ticks, intraday capital flow, market sentiment temperature, trading session schedule, security lists, exchange rates, and IPO calendar for HK/US/A-share/SG via Longbridge. Also covers ADR premium and FX carry frameworks. Triggers: "股价", "行情", "K线", "走势", "盘口", "资金流", "市场温度", "汇率", "IPO", "打新", "隔夜股", "ADR溢价", "外汇套息", "K線", "盤口", "資金流", "市場溫度", "匯率", "ADR溢價", "外匯套息", "现在多少钱", "多少钱", "stock price", "quote", "kline", "chart", "depth", "orderbook", "capital flow", "market sentiment", "exchange rate", "IPO calendar", "security list", "ADR premium", "fx carry", "market open", "trading hours", "开市", "溢价", "NVDA.US", "700.HK", "600519.SH", "股價", "走勢", "開盤", "今天開市"
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.9 KB |
| references/adr-premium.md | markdown | 3.4 KB |
| references/ah-premium.md | markdown | 3.5 KB |
| references/capital.md | markdown | 2.4 KB |
| references/depth.md | markdown | 2.1 KB |
| references/exchange-rate.md | markdown | 856 B |
| references/fx-carry.md | markdown | 3.5 KB |
| references/intraday.md | markdown | 1.4 KB |
| references/ipo.md | markdown | 1.6 KB |
| references/kline.md | markdown | 3.2 KB |
| references/market-status.md | markdown | 807 B |
| references/market-temp.md | markdown | 3.0 KB |
| references/participants.md | markdown | 837 B |
| references/quote.md | markdown | 5.2 KB |
| references/security-list.md | markdown | 1.9 KB |
| references/subscriptions.md | markdown | 913 B |
| references/trade-stats.md | markdown | 884 B |
| references/trades.md | markdown | 1.0 KB |
| references/trading.md | markdown | 1.1 KB |
references/ah-premium.md
View on GitHub# longbridge-ah-premium
A/H premium ratio for dual-listed Mainland-Chinese companies — historical kline or today's intraday curve.
## Symbol format
Always pass the **HK side** (`<CODE>.HK`) of the dual-listed pair. The Longbridge API maps internally to the A-share counterpart. Common pairs:
| Company | HK | A-share |
| --------------------- | --------- | ----------- |
| 工商银行 / ICBC | `1398.HK` | `601398.SH` |
| 建设银行 / CCB | `939.HK` | `601939.SH` |
| 中国平安 / Ping An | `2318.HK` | `601318.SH` |
| 招商银行 / CMB | `3968.HK` | `600036.SH` |
| 中国人寿 / China Life | `2628.HK` | `601628.SH` |
If the user gives an A-share symbol, translate to the HK side. If the stock is not dual-listed (e.g. `700.HK`), the API returns no data — report that, don't retry.
## Subcommands
> Run `longbridge ah-premium --help` (and `longbridge ah-premium intraday --help`) if unsure of current flags.
| CLI command | Returns |
| --------------------------------------------------------------------------- | ------------------------------------ |
| `longbridge ah-premium <SYMBOL> [--kline-type T] [--count N] --format json` | Historical premium ratio kline |
| `longbridge ah-premium intraday <SYMBOL> --format json` | Today's intraday premium time series |
`--kline-type`: `1m` / `5m` / `15m` / `30m` / `60m` / `day` (default) / `week` / `month` / `year`. `--count` defaults to 100.
## Workflow
1. Identify the dual-listed pair; pass the **HK** symbol.
2. Decide mode:
- "近一年 / last year走势" → kline `--kline-type day --count 250`
- "近一月 / past month" → kline `--kline-type day --count 22`
- "今天 / 当日 / intraday" → `intraday` subcommand
3. Run the command, render the time series (table or summary: latest premium %, range, trend).
4. Cite source as **Longbridge Securities** / **数据来源:长桥证券** / **數據來源:長橋證券**.
## CLI examples
```bash
# Default daily kline (100 days)
longbridge ah-premium 939.HK --format json
# Last year of daily premium
longbridge ah-premium 1398.HK --kline-type day --count 250 --format json
# Last 12 weeks
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
```
## Output
Each row carries a timestamp and a premium ratio (typically expressed as `(H_price * fx) / A_price - 1`, in %). Negative = HK trades at a discount to A-share. Surface latest value + recent range.
## Error handling
| Situation | LLM response |
| ------------------------------------- | --------------------------------------------------------------------------------------- |
| Shell `command not found: longbridge` | Fall back to MCP if configured; otherwise tell the user to install longbridge-terminal. |
| Empty array | "No A/H premium data — `<SYMBOL>` is likely not dual-listed in A-shares." |
| stderr `param_error` | Verify the symbol is an HK ticker of a dual-listed pair. |
| Other stderr | Surface verbatim. |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |