Quote Releated
Q1: How to calculate the subscription quote, is it one or more subscriptions if I both subscribe depth and broker with the same security?
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.
Q2: What is the specific limit logic for request frequency limit?
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.
Q3: What is the available subscribing securities and corresponding symbol formats?
A: The security code uses the ticker.region
format, ticker
represents the code. Aavailable subscribing securities are as followes.
Market | Symbol | Ticker | Region |
HK Market | Securities (including equities, ETFs, Warrants, CBBCs) | The official code of the security on the exchange | HK |
Hang Seng Index | HSI | HK | |
Hang Seng China Enterprises Index | HSCEI | HK | |
Hang Seng TECH Index | HSTECH | HK | |
US Market | Securities (including stocks, ETFs) | The official code of the security on the exchange | US |
Nasdsaq Index | .IXIC | US | |
Dow Jones Industrial Average | .DJI | US | |
CN Market | Securities (including stocks, ETFs) | The official code of the security on the exchange | SH or SZ |
Index | The official code of the security on the exchange | SH or SZ |
You can also use LongPort App to find the symbol of security
Q4: What is the quote authority of OpenAPI? How to buy quote cards?
A:
- Quote Authority 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. LongPort 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 LongPort.
- How to buy quote cards
LongPort users can choose the market cards they want to buy through the "Quote Store" in the LongPort App.
Q5: Quote Change By Date Time
A:
- US Market: 09:20:00 EDT/EST
- HK Market: 08:50:00 CST
- CN Market: 09:00:00 CST
- SG Market: 08:20:00 CST
Q6: How to enable Overnight quote
A:
- The night market quotation needs to be actively enabled by filling in the key
need_over_night_quote
, valuetrue
in themetadata
field of the authentication interface.
message AuthRequest {
string token = 1;
map<string, string> metadata = 2;
}
message ReconnectRequest {
string session_id = 1;
map<string, string> metadata = 2;
}
- 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.
Q7: Enable Overnight quote in OpenApi SDK
A:
- Create
Config
from environment variables
Set environment variable LONGPORT_ENABLE_OVERNIGHT
to true
- Create
Config
object from constructor
config = Config(app_key="your_app_key", app_secret="your_app_secret", access_token="your_access_token", enable_overnight=True)