longbridge-positions
Original:🇺🇸 English
Translated
Account holdings — stock positions, fund positions, multi-currency assets / cash, margin ratio (initial / maintenance / forced liquidation), and estimated max buy/sell quantity for a symbol. Requires longbridge login. Triggers: "我的持仓", "我有什么股票", "账户余额", "我有多少美金", "基金持仓", "我能买多少股", "保证金率", "杠杆要求", "账户全貌", "我的持倉", "賬戶餘額", "我有多少美金", "基金持倉", "保證金率", "賬戶全貌", "my holdings", "stock positions", "account balance", "how much can I buy", "margin ratio", "max buy qty", "portfolio snapshot".
12installs
Sourcelongbridge/skills
Added on
NPX Install
npx skill4agent add longbridge/skills longbridge-positionsTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →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). |
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
max-qty workflow
- 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
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 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}
OAuth scope
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 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 scopeMCP fallback
| 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-portfolioRelated skills
- Orders / executions / cash flow →
longbridge-orders - Watchlist (read) →
longbridge-watchlist - Account-level P&L analysis →
longbridge-portfolio
File layout
longbridge-positions/
└── SKILL.md # prompt-only, no scripts/