Quote API Overview β
Description Of Security Code β
The security code uses the ticker.region format, ticker represents the code, and example for each market:
- US Market:
regionisUS, for example:AAPL.US. - HK Market:
regionisHK, for example:700.HK. - CN Market:
regionisSHfor Shanghai Stock Exchange andSZfor Shenzhen Stock Exchange, for example:399001.SZ,600519.SH.
Singapore Market (SG): Real-time quotes for Singapore securities are not currently available via Longbridge Developers (API / CLI / MCP). Please use the Longbridge App or desktop client to check SG market quotes.
Access Method β
- Use private protocol and long connection mode to access, please refer to Binary Communication Protocol for access method.
- Use SDK for access, SDK introduction and download address.
Business Data Serialization β
The market request, response and push data are stored as business data in the body part of the data package of the private protocol. We use the Protobuf protocol to serialize business data. Compared with common text protocols (such as JSON, XML, etc.), the Protobuf protocol has the following advantages:
- Faster serialization time.
- Smaller packet size.
- Strongger version forward and backward compatibility.
Quote Protobuf protocol document download link.
Quote Permission Levels β
All Quote APIs require OpenAPI quote permissions. These are separate from App/PC/Web permissions and must be activated independently.
| Level | What's Included | How to Get |
|---|---|---|
| Basic | LV1 US/CN real-time; HK BMP (~15 min delay, no push) | Included with OpenAPI activation |
| LV1 Real-time (HK) | HK real-time quotes + WebSocket push support | Purchase "LV1 Real-time Quotes (OpenAPI)" via Quote Store |
| LV2 Subscription | Level 2 order book (depth), HK broker queue | Purchase LV2 subscription via Quote Store |
| Overnight (US) | US pre/post-market extended-hours data | Purchase LV1 card + set LONGBRIDGE_ENABLE_OVERNIGHT=true |
Check your current permissions at Developer Center. Purchase quote cards via Longbridge App β My β My Quotes β Quote Store.