longbridge-depth

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

longbridge-depth

longbridge-depth

Orderbook depth, broker queue (HK-only), and tick-by-tick trades.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.
盘口深度、经纪商队列(仅港股)以及逐笔成交数据。
响应语言:匹配用户输入语言——简体中文/繁体中文/英文。

Subcommands

子命令

SubcommandReturns
depth
5 / 10-level orderbook: per-level price / volume / order_num
brokers
Per-level broker_id queue (HK only). Tell the user the queue is HK-only when they ask about a non-HK symbol.
trades
Latest N trades: time / price / volume / direction / type. Pass
--count 1..1000
.
broker_id
integers can be translated to names via
longbridge-security-list
participants
.
子命令返回内容
depth
5档/10档盘口数据:每一档的价格/成交量/委托单数量
brokers
每一档的broker_id队列(仅港股)。当用户询问非港股标的时,告知用户该队列仅支持港股。
trades
最近N笔成交数据:时间/价格/成交量/方向/类型。可传入参数
--count 1..1000
broker_id
整数可通过
longbridge-security-list
工具的
participants
功能转换为经纪商名称。

When to use

使用场景

  • "看下 700.HK 的盘口", "TSLA 5 档买卖盘"
    depth
  • "茅台经纪商队列" — non-HK symbol → tell user "broker queue is HK-only" and switch to
    depth
  • "NVDA 最近 50 笔成交", "腾讯 tick 数据"
    trades --count 50
  • "700 全部盘口", "microstructure overview" → call
    depth
    ,
    brokers
    (if HK), and
    trades
    and merge the results
  • "看下 700.HK 的盘口", "TSLA 5 档买卖盘"
    depth
  • "茅台经纪商队列" — 非港股标的 → 告知用户*"broker queue仅支持港股"*并切换为
    depth
    命令
  • "NVDA 最近 50 笔成交", "腾讯 tick 数据"
    trades --count 50
  • "700 全部盘口", "microstructure overview" → 调用
    depth
    brokers
    (若为港股)和
    trades
    并合并结果

Workflow

工作流程

  1. Resolve the symbol to
    <CODE>.<MARKET>
    .
  2. Pick the subcommand by user intent (table above). For an "overview" intent, run
    depth
    +
    brokers
    (HK-only) +
    trades
    and merge.
  3. Off-hours warning: outside trading hours,
    depth
    is the closing snapshot and
    trades
    are the last N of the previous session — call this out explicitly when responding.
  4. Call the Longbridge CLI directly (preferred) or fall back to MCP.
  5. Render
    depth
    as a bid / ask table; describe
    trades
    as a direction summary (buy-dominant / sell-dominant) plus the latest few rows. Cite Longbridge Securities.
  1. 将标的代码解析为
    <CODE>.<MARKET>
    格式。
  2. 根据用户意图选择子命令(见上表)。若用户需要“概览”,则执行
    depth
    +
    brokers
    (仅港股) +
    trades
    并合并结果。
  3. 非交易时段提示:非交易时段,
    depth
    返回的是收盘快照,
    trades
    返回的是上一交易日的最后N笔成交——回复时需明确说明这一点。
  4. 优先直接调用Longbridge CLI,若不可用则 fallback 到MCP。
  5. depth
    渲染为买卖盘表格;将
    trades
    描述为方向汇总(买方主导/卖方主导)加上最新几笔成交数据。需注明数据来源为Longbridge Securities。

CLI

CLI示例

bash
longbridge depth   700.HK                  --format json
longbridge brokers 700.HK                  --format json   # HK-only
longbridge trades  700.HK --count 50       --format json
Always pass
--format json
so the output is machine-parseable.
bash
longbridge depth   700.HK                  --format json
longbridge brokers 700.HK                  --format json   # 仅港股支持
longbridge trades  700.HK --count 50       --format json
请始终传入
--format json
参数,以便输出内容可被机器解析。

Output

输出格式

  • depth
    /
    brokers
    :
    {asks: [...], bids: [...]}
    (
    brokers[i]
    includes a
    broker_id
    array)
  • trades
    : array of trade rows (
    time / price / volume / direction / type
    )
  • depth
    /
    brokers
    :
    {asks: [...], bids: [...]}
    brokers[i]
    包含
    broker_id
    数组)
  • trades
    : 成交数据数组,每条包含
    时间/价格/成交量/方向/类型
    字段

Error handling

错误处理

If
longbridge
is missing, fall back to MCP. If stderr surfaces "broker queue not supported" / "non-HK" on a
brokers
call, explain that broker queues are HK-only and switch to
depth
. Other stderr messages (auth / invalid symbol) get relayed verbatim.
longbridge
工具未安装,则 fallback 到MCP。若调用
brokers
命令时stderr返回*"broker queue not supported"* / "non-HK",需向用户说明经纪商队列仅支持港股,并切换为
depth
命令。其他stderr信息(如认证失败/无效标的)需原封不动地转达给用户。

MCP fallback

MCP备选方案

CLI subcommandMCP tool
depth
mcp__longbridge__depth
brokers
mcp__longbridge__brokers
trades
mcp__longbridge__trades
MCP-only extensions:
mcp__longbridge__short_positions
,
mcp__longbridge__option_volume
,
mcp__longbridge__option_volume_daily
.
CLI子命令MCP工具
depth
mcp__longbridge__depth
brokers
mcp__longbridge__brokers
trades
mcp__longbridge__trades
仅MCP支持的扩展功能:
mcp__longbridge__short_positions
mcp__longbridge__option_volume
mcp__longbridge__option_volume_daily

Related skills

相关技能

  • Quote / static / indices →
    longbridge-quote
  • Capital flow / large-order distribution →
    longbridge-capital-flow
  • broker_id → name lookup →
    longbridge-security-list
  • 行情/静态数据/指数 →
    longbridge-quote
  • 资金流向/大额订单分布 →
    longbridge-capital-flow
  • broker_id转名称查询 →
    longbridge-security-list

File layout

文件结构

longbridge-depth/
└── SKILL.md          # prompt-only, no scripts/
longbridge-depth/
└── SKILL.md          # 仅包含提示信息,无scripts/目录