About longbridge
A Longbridge skill for using its financial data and trading platform through the CLI, SDKs, and MCP. It guides agents to query market, account, and news data with the CLI first, using MCP as a fallback.
Key features
- 01CLI-first data query guidance
- 02Market and account data lookup
- 03Investment analysis workflow
- 04Python, Rust, and Go SDK guidance
- 05MCP setup reference
Use cases
- 01Look up quotes and historical prices
- 02Review positions, assets, and orders
- 03Analyze markets using prices and news
- 04Choose an SDK for data workflows
MCP support
The skill points to Longbridge hosted MCP, a self-hosted server, and setup and authentication guidance. It recommends MCP only when the CLI cannot provide the required data or is unavailable.
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ longbridge/ developers --skill longbridgeAfter installing, type/longbridgein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/llm.mdmcp.mdsetup.mdreferences/cli/overview.mdquant.mdreferences/go-sdk/content.mdoverview.mdquote-context.mdtrade-context.mdtypes.mdreferences/python-sdk/content-context.mdoverview.mdquote-context.mdtrade-context.mdtypes.mdreferences/rust-sdk/content.mdoverview.mdquote-context.mdtrade-context.mdtypes.mdDetails
From the project READMELongbridge Developers Platform
Full-stack financial data and trading platform: ChatGPT Apps, hosted MCP, CLI, Python/Rust/Go SDK, and LLM integration.
Official docs: https://open.longbridge.com llms.txt: https://open.longbridge.com/llms.txt
For setup and authentication details, see references/setup.md.
Data Query Priority
Always use the CLI for data queries. Use MCP only if the CLI cannot fulfill the request.
CLI covers (use these first):
- Market data: quotes, K-line history, intraday, extended hours
- News, filings, topics, market sentiment
- Account: positions, portfolio, assets, orders, statements
- Institutional: investors (SEC 13F), insider trades
Fall back to MCP only when:
longbridge --helpconfirms no command exists for the required data- The user's environment has no CLI installed or accessible
Investment Analysis Workflow
When the user asks about stock performance, portfolio advice, or market analysis:
- Get live data via CLI — quotes, positions, K-line history, intraday. CLI first; MCP only if CLI can't cover it.
- Get news/catalysts via CLI — prefer Longbridge first; fall back to WebSearch only if insufficient
- Combine — price action + volume + catalyst → analysis + suggestion
# Market data
longbridge quote SYMBOL.US
longbridge positions # stock positions
longbridge portfolio # P/L, asset distribution, holdings, cash (always pull when user asks about "my portfolio")
longbridge kline history SYMBOL.US --start YYYY-MM-DD --end YYYY-MM-DD --period day
longbridge intraday SYMBOL.US
# News & content (prefer these over WebSearch)
longbridge news SYMBOL.US # latest news articles
longbridge news detail <id> # full article content
longbridge filing SYMBOL.US # regulatory filings list (8-K, 10-Q, 10-K, etc.)
longbridge topic SYMBOL.US # community discussion
longbridge market-temp # market sentiment index (0–100)
# Account
longbridge assets # full asset overview: cash, buying power, margin, risk level
longbridge statement --help # check subcommands for statement export options
# Institutional investors (SEC 13F)
longbridge investors # top active fund managers by AUM
longbridge investors <CIK> # holdings for a specific investor by CIK
longbridge insider-trades SYMBOL.US # SEC Form 4 insider transaction history
For commands with complex flags, always run longbridge <command> --help for current options.
Only fall back to WebSearch when Longbridge news is insufficient (e.g., breaking news not yet indexed, macro events unrelated to a specific symbol).
Choose the Right Tool
AI agents fetching data: CLI first, MCP only as fallback when CLI lacks the capability.
User wants to... → Use
─────────────────────────────────────────────────────────────────
Quick quote / one-off data lookup CLI ← AI default
Interactive terminal workflows CLI
Script market data, save to file CLI + jq (or Python SDK)
Loops, conditions, transformations Python SDK (sync)
Async pipelines, concurrent fetches Python SDK (async)
Production service, high throughput Rust SDK / Go SDK
Real-time WebSocket subscription loop SDK (Python / Rust / Go)
Concurrent fetches in Go services Go SDK
Programmatic order strategy SDK
Data not available via CLI MCP (fallback)
Talk to ChatGPT about stocks (no code) ChatGPT Apps → @longbridge
Talk to other AI tools about stocks MCP (hosted or self-hosted)
Use Cursor/Claude for trading analysis MCP
Add Longbridge API docs to IDE/RAG LLMs.txt / Markdown API
Symbol Format
<CODE>.<MARKET> — applies to all tools.
| Market | Suffix | Examples |
|---|---|---|
| Hong Kong | HK | 700.HK, 9988.HK, 2318.HK |
| United States | US | TSLA.US, AAPL.US, NVDA.US |
| China Shanghai | SH | 600519.SH, 000001.SH |
| China Shenzhen | SZ | 000568.SZ, 300750.SZ |
| Singapore | SG | D05.SG, U11.SG |
| Crypto | HAS | BTCUSD.HAS, ETHUSD.HAS |
Reference Files
CLI (Terminal)
- Overview — install, auth, output formats, patterns: references/cli/overview.md
Always use longbridge --help to list available commands, and longbridge <command> --help for specific options and flags. Do not rely on hardcoded documentation — the CLI's built-in help is always up-to-date.
Python SDK
- Overview — install, Config, auth, HttpClient: references/python-sdk/overview.md
- QuoteContext — all quote methods + subscriptions: references/python-sdk/quote-context.md
- TradeContext — orders, account, executions: references/python-sdk/trade-context.md
- Types & Enums — Period, OrderType, SubType, push types: references/python-sdk/types.md
Rust SDK
- Overview — Cargo.toml, Config, auth, error handling: references/rust-sdk/overview.md
- QuoteContext — all methods, SubFlags, PushEvent: references/rust-sdk/quote-context.md
- TradeContext — orders, SubmitOrderOptions builder, account: references/rust-sdk/trade-context.md
- Content — news, filings, topics (ContentContext + Python fallback): references/rust-sdk/content.md
- Types & Enums — all Rust enums and structs: references/rust-sdk/types.md
Go SDK
- Overview — install, Config, OAuth, contexts, push callbacks: references/go-sdk/overview.md
- QuoteContext — quote methods, Subscribe + On* handlers: references/go-sdk/quote-context.md
- TradeContext — SubmitOrder struct, orders, account: references/go-sdk/trade-context.md
- Content — news, filings, topics (ContentContext + QuoteContext.Filings): references/go-sdk/content.md
- Types & Enums — SubType, Period, OrderType, etc.: references/go-sdk/types.md
AI Integration
- MCP — ChatGPT Apps, hosted service, self-hosted server, setup & auth: references/mcp.md
- LLMs & Markdown — llms.txt,
open.longbridge.comdoc Markdown,longbridge.comlive news/quote pages (.mdsuffix + Accept header), Cursor/IDE integration: references/llm.md
Load specific reference files on demand — do not load all at once.