Skip to content

Commit 5918efb

Browse files
huacnleeclaude
andauthored
docs(quote): clarify overnight quote requires LV1 quote card and US stocks only (#407)
## Summary Closes https://github.com/longbridge/openapi/issues/514 - 在所有涉及夜盘的文档位置(getting-started、qa/quote、pull/quote、candlestick、history-candlestick)补充说明: - 夜盘数据默认不包含,需购买「LV1 实时行情 (OpenAPI)」行情卡 - 目前夜盘行情仅支持美股,港股暂不支持 - 三语言(EN / zh-CN / zh-HK)同步更新 ## Test plan - [ ] 预览各文档页面,确认说明文字正确显示 - [ ] 确认 zh-CN / zh-HK 简繁体内容一致 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 651007e commit 5918efb

24 files changed

Lines changed: 161 additions & 110 deletions

docs/en/docs/getting-started.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ Please pay attention to protect your **Access Token** information, anyone who ge
373373
| `LONGBRIDGE_QUOTE_WS_URL` | Quote websocket endpoint url (Default: `wss://openapi-quote.longbridge.com/v2`) |
374374
| `LONGBRIDGE_TRADE_WS_URL` | Trade websocket endpoint url (Default: `wss://openapi-trade.longbridge.com/v2`) |
375375
| `LONGBRIDGE_REGION` | Override API region; SDK auto-selects by network. Set to `cn` or `hk` if incorrect. |
376-
| `LONGBRIDGE_ENABLE_OVERNIGHT` | Enable overnight quote, `true` or `false` (Default: `false`) |
376+
| `LONGBRIDGE_ENABLE_OVERNIGHT` | Enable overnight quote, `true` or `false` (Default: `false`). Requires purchasing the "LV1 Real-time Quote (OpenAPI)" quote card in the Longbridge App. US stocks only. |
377377
| `LONGBRIDGE_PUSH_CANDLESTICK_MODE` | `realtime` or `confirmed` (Default: `realtime`) |
378378
| `LONGBRIDGE_PRINT_QUOTE_PACKAGES` | Print quote packages when connected, `true` or `false` (Default: `true`) |
379379
| `LONGBRIDGE_LOG_PATH` | Set the path of the log files (Default: no logs) |

docs/en/docs/qa/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"collapsible": true,
44
"collapsed": true,
55
"link": null,
6-
"position": 6
6+
"position": 6.5
77
}

docs/en/docs/qa/general.md

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,57 @@ sidebar_position: 0
55

66
## Q1: Do I need to open a live account to call Longbridge Developers?
77

8-
A: We provide a paper account, you can use it to complete the debugging of the OpenAPI quote and trading interfaces.
8+
No. The platform provides a **paper account** — you can develop and debug quote and trading interfaces without opening a real securities account. The **paper account** supports real-time quotes for HK, US, and A-share markets, as well as basic trading functionality for HK and US stocks and ETFs, making it suitable for API integration and feature verification.
9+
10+
That said, the paper account differs from the live environment in areas such as order matching and cash rules. If you want to experience the platform's full capabilities, we recommend opening a live account as well.
911

1012
## Q2: How to open a paper account for debugging?
1113

12-
A: Please visit [Development Center](https://open.longbridge.com/account/) to enable the paper account and obtain the corresponding App Key & Secret and Access Token.
14+
Please visit [Development Center](https://open.longbridge.com/account/) to enable the paper account and obtain the corresponding App Key & Secret and Access Token.
1315

1416
## Q3: Are the trading permissions for simulation debugging the same as for real accounts?
1517

16-
A: Quote is the same, trading might be different.
18+
Quote is the same, trading might be different.
1719

1820
Paper accounts and live accounts share the same App Key & Secret, but have different Access Tokens. Quote permissions are associated with the App Key & Secret, while trading permissions are associated with the Access Token. Therefore, under paper accounts and live accounts, quote permissions are the same, but trading permissions are associated with the securities account and may differ.
1921

2022
## Q4: Which markets and types of securities are supported for quote and trading in paper account debugging?
2123

22-
A: Market: Supports real-time market data for Hong Kong stocks, US stocks, and A-share markets. For advanced market data such as full US market data and Hong Kong Level2 data, they can be purchased through the online market store and accessed via OpenAPI.
24+
Market: Supports real-time market data for Hong Kong stocks, US stocks, and A-share markets. For advanced market data such as full US market data and Hong Kong Level2 data, they can be purchased through the online market store and accessed via OpenAPI.
2325

2426
Trading: Supports trading of Hong Kong and US stocks, ETFs, and Hong Kong warrant trading. Short selling is supported for US stocks. OTC stocks, pre & post market trading, and options trading are not supported in paper accounts.
2527

2628
## Q5: Interface call frequency limits
2729

28-
A: Please visit [Rate Limit](docs/#rate-limit) for specific descriptions.
30+
Please visit [Rate Limit](docs/#rate-limit) for specific descriptions.
2931

3032
## Q6: How are interface call frequency limits applied in the case of multiple accounts?
3133

32-
A: If a customer holds multiple securities accounts, such as intraday financing or other sub-accounts, the trading interface call frequency limits are calculated and controlled based on different securities accounts, while quote interface calls are not affected by multiple accounts and are uniformly limited.
34+
If a customer holds multiple securities accounts, such as intraday financing or other sub-accounts, the trading interface call frequency limits are calculated and controlled based on different securities accounts, while quote interface calls are not affected by multiple accounts and are uniformly limited.
3335

3436
## Q7: Are there additional charges for trading operations through Longbridge Developers?
3537

36-
A: We do not charge additional fees for accessing market queries, trading, etc., via OpenAPI. For account-related fees such as trading commissions, platform fees, and market permissions, please refer to the information provided by the app and the official website.
38+
We do not charge additional fees for accessing market queries, trading, etc., via OpenAPI. For account-related fees such as trading commissions, platform fees, and market permissions, please refer to the information provided by the app and the official website.
3739

3840
## Q8: How to disable the permission table output in the console after the SDK connects to the server?
3941

40-
A: You can set the environment variable `LONGBRIDGE_PRINT_QUOTE_PACKAGES` to `false` (or legacy `LONGPORT_PRINT_QUOTE_PACKAGES`), or set `enable_print_quote_packages` to `false` when creating the `Config` object in the code to disable the permission table output in the console.
42+
You can set the environment variable `LONGBRIDGE_PRINT_QUOTE_PACKAGES` to `false` (or legacy `LONGPORT_PRINT_QUOTE_PACKAGES`), or set `enable_print_quote_packages` to `false` when creating the `Config` object in the code to disable the permission table output in the console.
43+
44+
## Q9: I don't know how to code. How can I access stock data from the Longbridge Developers platform?
45+
46+
The platform offers two ways to access stock data without writing any code:
47+
48+
**CLI (Command-line Tool)**
49+
50+
Install the [Longbridge Terminal CLI](/docs/cli) and query market data with simple commands — no programming required:
51+
52+
```bash
53+
longbridge quote AAPL.US TSLA.US
54+
longbridge static NVDA.US
55+
```
56+
57+
**MCP (AI Tool Integration)**
58+
59+
If you use AI tools like Claude, Cursor, or ChatGPT, connect the [Longbridge MCP service](/mcp). Once configured, simply ask in plain language and the AI will query market data on your behalf.
60+
61+
Both methods require a Longbridge account.

docs/en/docs/qa/quote.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ sidebar_position: 1
77

88
## Q1: How to calculate the subscription quote, is it one or more subscriptions if I both subscribe depth and broker with the same security?
99

10-
A: The subscription quote is only calculated according to the security dimension, only one subscription will be calculted if you subscribe muilty quote type with one security.
10+
The subscription quote is only calculated according to the security dimension, only one subscription will be calculted if you subscribe muilty quote type with one security.
1111

1212
## Q2: What is the specific limit logic for request frequency limit?
1313

14-
A: Use the token bucket to limit request and control the request rate. No more than 10 calls in 1 second, and no more than 5 concurrent requests.
14+
Use the token bucket to limit request and control the request rate. No more than 10 calls in 1 second, and no more than 5 concurrent requests.
1515

1616
## Q3: What is the available subscribing securities and corresponding symbol formats?
1717

18-
A: The security code uses the `ticker.region` format, `ticker` represents the code. Aavailable subscribing securities are as followes.
18+
The security code uses the `ticker.region` format, `ticker` represents the code — for example, Tesla is `TSLA.US`. Available subscribing securities are as follows.
1919

2020
<table>
2121
<tr>
@@ -74,32 +74,25 @@ A: The security code uses the `ticker.region` format, `ticker` represents the co
7474
</tr>
7575
</table>
7676

77-
You can also use Longbridge App to find the symbol of security
78-
<img src="https://pub.pbkrs.com/files/202206/7CSoiaDR4wGZPNCT/20220629-180013.jpeg" className="max-w-2xl" />
79-
8077
## Q4: What is the quote authority of OpenAPI? How to buy quote cards?
8178

82-
A:
83-
8479
- Quote Authority
8580
In accordance with the rules of the exchange, the authority of OpenAPI are independent, and are not shared with App, PC, or Web permissions. For example, the Hong Kong stock Level 2 authority you have on the App cannot be used on the OpenAPI side. Longbridge also presents basic market rights to OpenAPI users. If you need a higher-level market, you can activate the high-level quote authority by purchasing a market card through on-line Quote Store of brokers or Longbridge.
8681
- How to buy quote cards
8782
Longbridge users can choose the market cards they want to buy through the "Quote Store" in the Longbridge App.
8883

8984
## Q5: Quote Change By Date Time
9085

91-
A:
92-
9386
- US Market: 09:20:00 EDT/EST
9487
- HK Market: 08:50:00 CST
9588
- CN Market: 09:00:00 CST
9689
- SG Market: 08:20:00 CST
9790

9891
## Q6: How to enable Overnight quote
9992

100-
A:
101-
102-
- The night market quotation needs to be actively enabled by filling in the key `need_over_night_quote`, value `true` in the `metadata` field of the authentication interface.
93+
- **Overnight quote data is not available by default.** You need to purchase the **"LV1 Real-time Quote (OpenAPI)"** quote card in the "Quote Store" of the Longbridge mobile app to access overnight data.
94+
- Overnight quotes are currently **only available for US stocks**. Hong Kong stocks do not support overnight quotes.
95+
- After obtaining the overnight quote permission, you still need to actively enable it by filling in the key `need_over_night_quote`, value `true` in the `metadata` field of the authentication interface.
10396

10497
```protobuf
10598
message AuthRequest {
@@ -115,9 +108,7 @@ message ReconnectRequest {
115108

116109
- After turning on the night trading quotations, both the pull and push interfaces will be able to obtain the night trading quotations during the night trading period.
117110

118-
## Q7: Enable Overnight quote in OpenApi SDK
119-
120-
A:
111+
## Q7: Enable Overnight quote in OpenAPI SDK
121112

122113
- Create `Config` from environment variables
123114

docs/en/docs/qa/trade.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,34 +5,39 @@ sidebar_position: 2
55

66
## Q1: What types of orders are supported?
77

8-
A: Both paper and live accounts support regular Limit orders, Market orders, and Conditional orders (such as Buy if touched, Sell if touched, etc.), but do not currently support Attached orders and Grid orders.
8+
Both paper and live accounts support regular Limit orders, Market orders, and Conditional orders (such as Buy if touched, Sell if touched, etc.), but do not currently support Attached orders and Grid orders.
99

1010
## Q2: What are the trading hours for paper accounts?
1111

12-
A: Trading hours for paper accounts for Hong Kong stocks are the same as in the real environment. Trading pre & post market is not supported for U.S. stocks in the paper environment, only regular trading hours are supported.
12+
Trading hours for paper accounts for Hong Kong stocks are the same as in the real environment. Trading pre & post market is not supported for U.S. stocks in the paper environment, only regular trading hours are supported.
1313

1414
## Q3: How can I trade overnight sessions for U.S. stocks?
1515

16-
A: To place orders for overnight trading, you can specify overnight trading by passing the OVERNIGHT value to the `outside_rth` parameter in the order placement API.
16+
To place orders for overnight trading, you can specify overnight trading by passing the OVERNIGHT value to the `outside_rth` parameter in the order placement API.
1717

1818
## Q4: What are the trading rules for paper accounts?
1919

20-
A: Paper accounts currently support trading in Hong Kong and U.S. stocks, ETFs, and Hong Kong warrants. Short selling is supported for U.S. stocks. However, OTC trading, pre & post market trading, and options trading are not supported in paper accounts.
20+
Paper accounts currently support trading in Hong Kong and U.S. stocks, ETFs, and Hong Kong warrants. Short selling is supported for U.S. stocks. However, OTC trading, pre & post market trading, and options trading are not supported in paper accounts.
2121

2222
Trades in the paper environment are matched based on the bid-ask spread from the real market. If the buy order price is higher than or equal to the ask price and the sell order price is lower than or equal to the bid price, a trade can be executed. Market orders are matched by default.
2323

2424
## Q5: How can I reset the funds in my paper account?
2525

26-
A: Manual resetting of demo funds is not supported at the moment. If needed, please contact your customer service or account manager for offline processing.
26+
Manual resetting of demo funds is not supported at the moment. If needed, please contact your customer service or account manager for offline processing.
2727

2828
## Q6: After placing orders through the OpenAPI, how can I view them?
2929

30-
A: After placing orders through the OpenAPI, you can check the real-time status of orders by calling the order inquiry API. Alternatively, you can receive order update information through WebSocket push. You can also view orders and their statuses directly through the App/PC or other terminal products.
30+
After placing orders via the OpenAPI, you can view them through any of the following:
31+
32+
- **Order inquiry API**: Call the API to query real-time order status
33+
- **WebSocket push**: Subscribe to trade push events to receive order updates in real time
34+
- **CLI**: Use the [Longbridge Terminal CLI](/docs/cli) to query from the command line, e.g. `longbridge orders`
35+
- **App / PC**: View orders and their statuses directly in the terminal products
3136

3237
## Q7: How can I know if my account has sufficient funds for trading?
3338

34-
A: You can use the trading API `/v1/trade/estimate/buy_limit` to estimate the available cash & margin buying power, and short selling quantity in your account. Due to the complexity of risk control requirements, it's not recommended to calculate the tradable quantity manually.
39+
You can use the trading API `/v1/trade/estimate/buy_limit` to estimate the available cash & margin buying power, and short selling quantity in your account. Due to the complexity of risk control requirements, it's not recommended to calculate the tradable quantity manually.
3540

3641
## Q8: What does it mean when the order placement API returns "User authentication failed"?
3742

38-
A: This error usually indicates that the user does not have permission for the corresponding trading operation, such as options trading or short selling U.S. stocks. You can complete the permission opening process guided by the order placement in the app. After obtaining the necessary permissions, you can continue trading or performing other operations through OpenAPI.
43+
This error usually indicates that the user does not have permission for the corresponding trading operation, such as options trading or short selling U.S. stocks. You can complete the permission opening process guided by the order placement in the app. After obtaining the necessary permissions, you can continue trading or performing other operations through OpenAPI.

docs/en/docs/quote/pull/candlestick.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ longbridge kline NVDA.US --period day --count 20
3838
| period | int32 | Yes | Candlestick period, for example: `1000`, see [Period](../objects#period---candlestick-period) |
3939
| count | int32 | Yes | Count of cancdlestick, for example: `100`<br /><br />**Check rules:** <br />maximum count is `1000` |
4040
| adjust_type | int32 | Yes | Adjustment type, for example: `0`, see [AdjustType](../objects#adjusttype---candlestick-adjustment-type) |
41-
| trade_session | int32 | No | Trading session, 0: intraday, 100: All (pre, intraday, post, overnight) |
41+
| trade_session | int32 | No | Trading session, 0: intraday, 100: All (pre, intraday, post, overnight)<br/><br/>Note: Overnight data requires purchasing the "LV1 Real-time Quote (OpenAPI)" quote card. US stocks only. |
4242

4343
### Protobuf
4444

docs/en/docs/quote/pull/history-candlestick.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ longbridge kline history NVDA.US --start 2025-01-01 --end 2025-12-31
4242
| ∟ date | string | No | Query date, in `YYYYMMDD` format, for example: 20231016. Default value: latest trading day of the underlying market. |
4343
| ∟ minute | string | No | Query time, in `HHMM` format, for example: 09:35, only valid when querying minute-level data |
4444
| ∟ count | int32 | No | Count of cancdlestick, valid range:`[1,1000]`. Default value: `10` |
45-
| trade_session | int32 | No | Trading session, 0: intraday, 100: All (pre, intraday, post, overnight) |
45+
| trade_session | int32 | No | Trading session, 0: intraday, 100: All (pre, intraday, post, overnight)<br/><br/>Note: Overnight data requires purchasing the "LV1 Real-time Quote (OpenAPI)" quote card. US stocks only. |
4646

4747
### Protobuf
4848

0 commit comments

Comments
 (0)