Skip to Content

Longbridge CLI

Longbridge CLI (longbridge) is an AI-native command-line tool with 120+ commands covering every Longbridge OpenAPI endpoint — real-time market data, fundamentals, account management, and trading. Designed for scripting, AI-agent tool-calling, and daily workflows from the terminal.

GitHub: longbridge/longbridge-terminal

Longbridge CLI showcase

Quick Start

See Installation for platform-specific install instructions and authentication setup. After installing, try any command:

bash
# Check real-time price
longbridge quote TSLA.US NVDA.US

# View your portfolio
longbridge portfolio

# Get JSON output for scripting or AI agents
longbridge quote AAPL.US --format json

JSON Output

Every command supports --format json for machine-readable output. Use it for scripting, piping into jq, or feeding data to AI agents:

bash
longbridge positions --format json
longbridge quote TSLA.US NVDA.US --format json

Symbol Format

Symbols use CODE.MARKET format:

ExampleMarket
TSLA.USUS stocks
700.HKHong Kong
600519.SHChina A-share (Shanghai)
000568.SZChina A-share (Shenzhen)
D05.SGSingapore
BTCUSD.HASCrypto (Longbridge-specific)