Files
longbridge__developers/README.md
Jason Lee e61c421395 feat: add CliCommand block with syntax highlighting and multi-example docs (#390)
## Summary

- New markdown-it plugin (`cli-command.ts`) renders `<CliCommand>` tags
as styled code blocks with proper shiki dual-theme color variables
(`--shiki-light` / `--shiki-dark`) for syntax highlighting: longbridge
binary (purple), subcommands (blue), args and inline comments (gray)
- Header changed from compact bar to h2-style title matching SDK Links
section; Install CLI link floats right with no border, pointing to
`/docs/cli`
- Single-line `<CliCommand>content</CliCommand>` tokens (parsed as
paragraph > inline by markdown-it) now correctly handled via Case 2
token splice
- Expanded all non-trade `<CliCommand>` blocks from single-line to
multi-line format with 2–4 real verified examples per command and
locale-aware comments (en / zh-CN / zh-HK) across quote pull, content,
subscribe, security, and watchlist docs

## Test plan

- [ ] Run `bun run dev` and verify CliCommand blocks render with correct
syntax highlighting in light and dark mode
- [ ] Verify h2 title "CLI" appears with Install CLI link on the right
(no border)
- [ ] Verify Install CLI link points to `/docs/cli`
- [ ] Check a few pages across en / zh-CN / zh-HK locales

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-03-27 14:19:36 +08:00

4.9 KiB

Longbridge Developers

https://open.longbridge.com

Longbridge Developers is the official developer platform for Longbridge — providing programmatic access to real-time market data, trading, account management, and AI integrations across HK, US, and CN markets.


Repository structure

/
├── docs/                        # Site content and VitePress config
│   ├── .vitepress/              # Theme, components, markdown plugins, locale configs
│   ├── en/                      # English content (root locale)
│   ├── zh-CN/                   # Simplified Chinese content
│   └── zh-HK/                   # Traditional Chinese content
├── openapi/                     # Submodule: OpenAPI spec + SDK source (openapi, Python, Rust, etc.)
├── openapi-go/                  # Submodule: Go SDK
├── longbridge-terminal/         # Submodule: CLI binary source (longbridge)
├── skills/longbridge/           # AI Skill — knowledge base for AI agents
├── scripts/                     # Build scripts (llms.txt generation, markdown normalization)
├── openapi.yaml                 # Canonical API specification (source of truth for API Reference)
└── CONTRIBUTING.md              # Contribution guidelines for AI agents and humans

What you can build

  • Automated trading strategies and order management
  • Real-time quote dashboards and data pipelines
  • Portfolio trackers and risk monitoring tools
  • AI agents with live market data and trading capabilities

Access methods

Method Best for
SDK Python, Rust, Node.js, Go, Java, C++ apps
HTTP / WebSocket API Any language, custom integrations
CLI (longbridge) Terminal workflows, scripting, AI tool-calling
MCP AI coding assistants (Cursor, Claude, ChatGPT, etc.)
Skill Give any AI direct knowledge of Longbridge APIs

Quick start

1. Open a Longbridge account

Download the Longbridge App and complete account onboarding.

2. Enable OpenAPI access

Log in to open.longbridge.com, complete developer verification, and obtain your API token.

3. Choose your integration

CLI — fastest way to get started:

brew install --cask longbridge/tap/longbridge-terminal
longbridge login
longbridge quote TSLA.US NVDA.US 700.HK

Python SDK:

pip install longbridge

MCP for AI assistants — add to your MCP client config:

{
  "mcpServers": {
    "longbridge": {
      "url": "https://openapi.longbridge.com/mcp"
    }
  }
}

AI Skill — give your AI full knowledge of Longbridge APIs:

npx skills add longbridge/developers -g -y

Market coverage

Market Instruments
Hong Kong Equities, ETFs, Warrants, CBBCs, Hang Seng Index
United States Stocks, ETFs, OPRA Options, Nasdaq Index
China A-share Stocks, ETFs, Index

Documentation

LLM-friendly docs

All documentation pages are available as Markdown by appending .md to any URL:

https://open.longbridge.com/docs/getting-started.md
https://open.longbridge.com/docs/quote/pull/static.md

A machine-readable index is available at:

https://open.longbridge.com/llms.txt

Pricing

OpenAPI access is free for Longbridge Integrated Account holders. No additional fees for activating or using the API. Standard brokerage transaction fees apply to trades.

Contributing

Local development setup

git clone --recurse-submodules https://github.com/longbridge/developers.git
cd developers
bun install
bun run dev

If you already cloned without --recurse-submodules:

git submodule update --init --recursive
bun run dev

The dev server starts at http://localhost:5173 and connects to the canary API. Use bun run dev:prod to connect to the production API instead.

See CONTRIBUTING.md for full contribution guidelines.