longbridge-positions
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselongbridge-positions
longbridge-positions
Read-only account snapshot — what the user holds, how much cash, what they can buy/sell, and per-symbol margin ratios.
Response language: match the user's input language — Simplified Chinese / Traditional Chinese / English.Privacy: the data here is the user's private account state. Only return detailed numbers in direct conversation; if you suspect screen-sharing or third-party observation, confirm before showing exact figures.
只读账户快照——用户持仓情况、现金金额、可买卖数量,以及各标的的保证金率。
响应语言:匹配用户输入语言——简体中文/繁体中文/英文。隐私说明:此处数据为用户私人账户状态。仅在直接对话中返回详细数字;若怀疑存在屏幕共享或第三方观察,需先确认再显示具体数值。
Subcommands
子命令
Runto confirm current flags / defaults if anything below seems off.longbridge <subcommand> --help
| CLI command | Returns |
|---|---|
| Combined view: total assets, P/L, intraday P/L, holdings, and cash breakdown. Single call — useful for "account snapshot" questions. |
| Stock holdings array. |
| Fund holdings array. |
| Net assets, cash, buy power, margins; per-currency breakdown in |
| Initial / maintenance / forced-liquidation factors for a symbol. |
| Estimated max purchasable / sellable quantity (cash vs margin). |
若以下内容有疑问,运行确认当前参数/默认值。longbridge <subcommand> --help
| CLI 命令 | 返回内容 |
|---|---|
| 综合视图:总资产、盈亏、日内盈亏、持仓情况及现金明细。单次调用——适用于“账户快照”类问题。 |
| 股票持仓数组。 |
| 基金持仓数组。 |
| 净资产、现金、购买力、保证金; |
| 某一标的的初始/维持/强制平仓保证金系数。 |
| 预估最大可买/可卖数量(现金 vs 保证金)。 |
When to use
使用场景
- "我的持仓", "我有什么股票", "我的持倉" →
positions - "账户余额", "我有多少美金 / 港币", "current USD balance" →
assets --currency USD - "我的基金持仓" →
fund-positions - "NVDA 我能买多少股", "how many TSLA can I buy" → (limit) or
max-qty <SYMBOL> --side buy --price <current>(market)--order-type MO - "茅台保证金率" →
margin-ratio 600519.SH - "看一下我的账户全貌", "account snapshot" → (one call gives total assets + P/L + holdings + cash)
portfolio - "我的浮盈" → already includes intraday P/L; otherwise
portfolio+ chain topositionsfor live last pricelongbridge-quote
- "我的持仓", "我有什么股票", "我的持倉" →
positions - "账户余额", "我有多少美金 / 港币", "current USD balance" →
assets --currency USD - "我的基金持仓" →
fund-positions - "NVDA 我能买多少股", "how many TSLA can I buy" → (限价单)或
max-qty <SYMBOL> --side buy --price <current>(市价单)--order-type MO - "茅台保证金率" →
margin-ratio 600519.SH - "看一下我的账户全貌", "account snapshot" → (单次调用即可获取总资产+盈亏+持仓+现金信息)
portfolio - "我的浮盈" → 已包含日内盈亏;否则可通过
portfolio结合positions获取实时最新价格计算longbridge-quote
max-qty workflow
max-qty 工作流程
- Limit order (default LO): first call for the current last price → pass it as
longbridge quote <SYMBOL> --format json.--price - Market order: skip price; pass .
--order-type MO - The response includes (cash only) and
cash_max_qty(with financing). Always disclose both numbers and remind the user that financing carries interest cost + forced-liquidation risk.margin_max_qty
- 限价单(默认LO):先调用获取当前最新价格 → 将其作为
longbridge quote <SYMBOL> --format json参数传入。--price - 市价单:无需价格参数;传入。
--order-type MO - 响应结果包含(仅现金)和
cash_max_qty(融资)。需始终告知用户这两个数值,并提醒用户融资会产生利息成本及强制平仓风险。margin_max_qty
CLI
CLI
bash
longbridge portfolio --format json
longbridge positions --format json
longbridge fund-positions --format json
longbridge assets --currency USD --format json
longbridge margin-ratio TSLA.US --format json
longbridge max-qty TSLA.US --side buy --price 250 --format jsonbash
longbridge portfolio --format json
longbridge positions --format json
longbridge fund-positions --format json
longbridge assets --currency USD --format json
longbridge margin-ratio TSLA.US --format json
longbridge max-qty TSLA.US --side buy --price 250 --format jsonOutput
输出内容
- : combined object with total assets, P/L, intraday P/L, holdings list, cash breakdown.
portfolio - /
positions: array of holding rows.fund-positions - : per-currency
assetsarray plus net-assets / buy-power / margin fields.cash_infos - :
margin-ratio.{im_factor, mm_factor, fm_factor} - :
max-qty.{cash_max_qty, margin_max_qty}
- :包含总资产、盈亏、日内盈亏、持仓列表、现金明细的综合对象。
portfolio - /
positions:持仓记录数组。fund-positions - :分币种的
assets数组,以及净资产/购买力/保证金字段。cash_infos - :
margin-ratio。{im_factor, mm_factor, fm_factor} - :
max-qty。{cash_max_qty, margin_max_qty}
OAuth scope
OAuth 权限范围
Requires the trade scope on the OAuth token. If the token lacks it, both CLI and MCP fail with / . Tell the user to re-authorise: (and tick "Trade" in the browser).
unauthorizednot in authorized scopelongbridge auth logout && longbridge auth loginOAuth token需要包含交易权限。若token缺少该权限,CLI和MCP都会返回 / 错误。告知用户重新授权:(并在浏览器中勾选“Trade”选项)。
unauthorizednot in authorized scopelongbridge auth logout && longbridge auth loginError handling
错误处理
If is missing, fall back to MCP. If stderr contains / , the OAuth token lacks trade scope — guide the user through re-auth (see "OAuth scope" above). Other stderr messages relay verbatim.
longbridgeunauthorizednot in authorized scope若未安装, fallback到MCP。若 stderr包含 / ,说明OAuth token缺少交易权限——引导用户按上述“OAuth权限范围”步骤重新授权。其他stderr信息直接原样反馈。
longbridgeunauthorizednot in authorized scopeMCP fallback
MCP 备选方案
| CLI subcommand | MCP tool |
|---|---|
| merge |
| |
| |
| |
| |
| |
MCP-only extensions: / (P/L analysis), (currency conversion). For "how is my P&L this month?" route to .
mcp__longbridge__profit_analysisprofit_analysis_detailmcp__longbridge__exchange_ratelongbridge-portfolio| CLI子命令 | MCP工具 |
|---|---|
| 合并 |
| |
| |
| |
| |
| |
仅MCP支持的扩展功能: / (盈亏分析)、(货币兑换)。对于*"我本月盈亏如何?"*这类问题,路由到。
mcp__longbridge__profit_analysisprofit_analysis_detailmcp__longbridge__exchange_ratelongbridge-portfolioRelated skills
相关技能
- Orders / executions / cash flow →
longbridge-orders - Watchlist (read) →
longbridge-watchlist - Account-level P&L analysis →
longbridge-portfolio
- 订单/成交/现金流 →
longbridge-orders - 观察列表(只读) →
longbridge-watchlist - 账户级盈亏分析 →
longbridge-portfolio
File layout
文件结构
longbridge-positions/
└── SKILL.md # prompt-only, no scripts/longbridge-positions/
└── SKILL.md # 仅含提示词,无scripts/目录