From longbridge
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".
npx claudepluginhub longbridge/skills --plugin longbridgeThis skill uses the workspace's default tool permissions.
Read-only account snapshot — what the user holds, how much cash, what they can buy/sell, and per-symbol margin ratios.
Guides Next.js Cache Components and Partial Prerendering (PPR): 'use cache' directives, cacheLife(), cacheTag(), revalidateTag() for caching, invalidation, static/dynamic optimization. Auto-activates on cacheComponents: true.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Share bugs, ideas, or general feedback.
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.
Run
longbridge <subcommand> --helpto confirm current flags / defaults if anything below seems off.
| CLI command | Returns |
|---|---|
longbridge portfolio --format json | Combined view: total assets, P/L, intraday P/L, holdings, and cash breakdown. Single call — useful for "account snapshot" questions. |
longbridge positions --format json | Stock holdings array. |
longbridge fund-positions --format json | Fund holdings array. |
longbridge assets [--currency USD|HKD|CNY|SGD] --format json | Net assets, cash, buy power, margins; per-currency breakdown in cash_infos. |
longbridge margin-ratio <SYMBOL> --format json | Initial / maintenance / forced-liquidation factors for a symbol. |
longbridge max-qty <SYMBOL> --side buy|sell [--price <p>] [--order-type LO|MO|ELO|ALO] --format json | Estimated max purchasable / sellable quantity (cash vs margin). |
positionsassets --currency USDfund-positionsmax-qty <SYMBOL> --side buy --price <current> (limit) or --order-type MO (market)margin-ratio 600519.SHportfolio (one call gives total assets + P/L + holdings + cash)portfolio already includes intraday P/L; otherwise positions + chain to longbridge-quote for live last pricelongbridge quote <SYMBOL> --format json for the current last price → pass it as --price.--order-type MO.cash_max_qty (cash only) and margin_max_qty (with financing). Always disclose both numbers and remind the user that financing carries interest cost + forced-liquidation risk.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 json
portfolio: combined object with total assets, P/L, intraday P/L, holdings list, cash breakdown.positions / fund-positions: array of holding rows.assets: per-currency cash_infos array plus net-assets / buy-power / margin fields.margin-ratio: {im_factor, mm_factor, fm_factor}.max-qty: {cash_max_qty, margin_max_qty}.Requires the trade scope on the OAuth token. If the token lacks it, both CLI and MCP fail with unauthorized / not in authorized scope. Tell the user to re-authorise: longbridge auth logout && longbridge auth login (and tick "Trade" in the browser).
If longbridge is missing, fall back to MCP. If stderr contains unauthorized / not in authorized scope, the OAuth token lacks trade scope — guide the user through re-auth (see "OAuth scope" above). Other stderr messages relay verbatim.
| CLI subcommand | MCP tool |
|---|---|
portfolio | merge stock_positions + fund_positions + account_balance (no combined MCP tool) |
positions | mcp__longbridge__stock_positions |
fund-positions | mcp__longbridge__fund_positions |
assets | mcp__longbridge__account_balance |
margin-ratio | mcp__longbridge__margin_ratio |
max-qty | mcp__longbridge__estimate_max_purchase_quantity |
MCP-only extensions: mcp__longbridge__profit_analysis / profit_analysis_detail (P/L analysis), mcp__longbridge__exchange_rate (currency conversion). For "how is my P&L this month?" route to longbridge-portfolio.
longbridge-orderslongbridge-watchlistlongbridge-portfoliolongbridge-positions/
└── SKILL.md # prompt-only, no scripts/