LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

longbridge

Terminal client for Longbridge market data and trading

TLDR

Log in to a Longbridge account (opens a browser for OAuth)
$ longbridge auth login
copy
Show a real-time quote for a symbol (CODE.MARKET notation)
$ longbridge quote [NVDA.US]
copy
Show a candlestick (K-line) chart for a symbol
$ longbridge kline [700.HK]
copy
List current positions
$ longbridge positions
copy
Show portfolio profit and loss
$ longbridge portfolio
copy
Fetch the latest news for a symbol
$ longbridge news [AAPL.US]
copy
Output machine-readable JSON for scripting or piping into jq
$ longbridge quote [TSLA.US] --format json
copy

SYNOPSIS

longbridge command [arguments] [--format json]

DESCRIPTION

longbridge is a command-line client for Longbridge Securities that exposes the Longbridge OpenAPI from the terminal. It covers real-time and historical market data, fundamentals, account and portfolio management, and order placement through a single binary, with over a hundred subcommands mapping onto the underlying API endpoints.Securities are addressed with CODE.MARKET notation, for example `TSLA.US` for a US stock, `700.HK` for a Hong Kong listing, or `600519.SH` for a Shanghai A-share. Most commands accept --format json so their output can be scripted, piped into tools such as `jq`, or fed to an AI agent; without it, results are printed as human-readable tables and charts.Authentication uses OAuth 2.0 through the Longbridge SDK. Running `longbridge auth login` opens a browser to authorize the account, after which the SDK stores and refreshes the token, so individual commands do not need manual credentials.

PARAMETERS

--format json

Emit machine-readable JSON instead of formatted terminal output. Useful for scripting and piping into `jq`.

COMMANDS

auth login

Authorize a Longbridge account via OAuth and store the session token.
quote symbol
Print a real-time quote for the given symbol.
kline symbol
Display a candlestick (K-line) chart used for technical analysis.
positions
List the account's current holdings.
portfolio
Show portfolio overview and profit-and-loss metrics.
news symbol
Show recent news for a symbol.
financial-report symbol
Retrieve a company's financial statements.
Additional command groups cover depth and filings, options and warrants, IPOs, watchlists, trading, statements, insider trades, recurring investments, short selling, and stock screening.

CAVEATS

longbridge places real orders and exposes live account data, so trading subcommands move real money and carry the usual market risk. It requires a funded Longbridge account and OpenAPI access, and is only useful in markets and instrument types that Longbridge supports. Quote entitlements depend on the account's market-data subscriptions.

HISTORY

The tool is developed and open-sourced by Longbridge, a financial-technology company, under the Apache License 2.0. It is written in Rust and pairs a scriptable CLI with an interactive terminal UI, positioning itself as an "AI-native" front end to the Longbridge OpenAPI.

SEE ALSO

curl(1), jq(1)

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid