llms.txt Content
# LongPort OpenAPI Documentation
LongPort OpenAPI provides programmatic quote trading interfaces for investors with research and development capabilities and assists them to build trading or quote strategy analysis tools based on their own investment strategies. The functions fall into the following categories:
- **Trading** - Create, amend, cancel orders, query today's/past orders and transaction details, etc.
- **Quotes** - Real-time quotes, acquisition of historical quotes, etc.
- **Portfolio** - Real-time query of the account assets, positions, funds
- **Real-time subscription** - Provides real-time quotes and push notifications for order status changes
## Interface Type
LongPort provides diversified access methods such as HTTP / WebSockets interfaces for accessing the underlying services and SDK (Python / C++, etc.) encapsulated in the upper layer, allowing flexible choices.
## How to Enable OpenAPI
1. Log in to the [LongPort App](https://longportapp.com/download) to complete the account opening process;
2. Log in to the [longportapp.com](https://longportapp.com) and enter the developer platform, complete the developer verification (OpenAPI permission application), and obtain a token.
## Quote Coverage
<table>
<thead>
<tr>
<th>Market</th>
<th>Symbol</th>
</tr>
</thead>
<tr>
<td width="160" rowspan="2">HK Market</td>
<td>Securities (including equities, ETFs, Warrants, CBBCs)</td>
</tr>
<tr>
<td>Hang Seng Index</td>
</tr>
<tr>
<td rowspan="3">US Market</td>
<td>Securities (including stocks, ETFs)</td>
</tr>
<tr>
<td>Nasdsaq Index</td>
</tr>
<tr>
<td>OPRA Options</td>
</tr>
<tr>
<td rowspan="2">CN Market</td>
<td>Securities (including stocks, ETFs)</td>
</tr>
<tr>
<td>Index</td>
</tr>
</table>
## Trading
Supported trading functions include:
| Market | Stock and ETF | Warrant & CBBC |