LongPort OpenAPI

finance

209 lines. LongPort OpenAPI came to play.

LongPort OpenAPI revolutionizes trading with its robust programmatic quote trading interfaces tailored for investors. Offering tools for order management, real-time quotes, and portfolio tracking, it empowers users to craft bespoke trading strategies seamlessly.

Not sure yours is this good? Check it →

209 lines -80%
22 sections +29%
1 file

LongPort OpenAPI's llms.txt Insights

Overachiever

22 sections. Most sites can barely manage 3. This one went all in.

War and Peace vibes

209 lines. They really wanted AI to understand them.

What's inside LongPort OpenAPI's llms.txt

LongPort OpenAPI's llms.txt contains 10 sections:

  • LongPort OpenAPI Documentation
  • Interface Type
  • How to Enable OpenAPI
  • Quote Coverage
  • Trading
  • Rate Limit {#rate-limit}
  • Pricing {#pricing}
  • Other
  • SDK
  • Docs

How does LongPort OpenAPI's llms.txt compare?

LongPort OpenAPIDirectory AvgTop Performer
Lines2091029163,447
Sections22173207

Cool table. Now the real question — where do you land? Find out →

LongPort OpenAPI's llms.txt preview

First 100 of 209 lines

# 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 | Options |
| --------- | ------------- | -------------- | ------- |
| HK Market | ✓             | ✓              |         |
| US Market | ✓             | ✓              | ✓       |

## Rate Limit {#rate-limit}

| Category  | Limitation                                                                                                                                                                                                                            |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Quote API | <ul><li>One account can only create one long link and subscribe to a maximum of 500 symbols at the same time</li><li>No more than 10 calls in a 1-second interval and the number of concurrent requests should not exceed 5</li></ul> |
| Trade API | <ul><li>No more than 30 calls in a 30-second interval, and the interval between two calls should not be less than 0.02 seconds</li></ul>                                                                                              |

:::success

The [OpenAPI SDK](https://open.longportapp.com/sdk) has done effective frequency control internally:

- Quote: The methods under `QuoteContext` will be actively controlled by the SDK according to the server's rate limit. When the request is too fast, the SDK will automatically delay the request. Therefore, you do not need to implement the frequency control details separately.
- Trade: The methods under `TradeContext` are not limited by the SDK. Due to the special nature of the trading order placement scenario, this is left to the user to handle.

:::

## Pricing {#pricing}

LongPort does not charge any additional fees for activating or using interface services. You only need to open a LongPort Integrated A/C and get OpenAPI service permissions to use it for free. For actual transaction fees, please contact the brokerage firm where you have opened your securities account.

## Other

The OpenAPI services are provided by LongPort and the applicable affiliates (subject to the agreement).
openapi-trade.longportapp.com

## SDK 

- [Introduction](https://open.longportapp.com/docs.md)

## Docs

- [Error Codes](https://open.longportapp.com/docs/error-codes.md)
- [Refresh Token](https://open.longportapp.com/docs/refresh-token-api.md)
- [Getting Started](https://open.longportapp.com/docs/getting-started.md)
- [Get Socket OTP (One time password)](https://open.longportapp.com/docs/socket-token-api.md)
- [llm](https://open.longportapp.com/docs/llm.md)
- [Overview](https://open.longportapp.com/docs/how-to-access-api.md)

What is llms.txt?

llms.txt is an open standard that helps AI language models understand your website. By placing a structured markdown file at /llms.txt, websites provide AI search engines like ChatGPT, Claude, and Perplexity with a clear map of their content, services, and documentation. Companies like LongPort OpenAPI use it to ensure AI accurately represents their brand when answering user queries. Read the spec.

See who else in finance got the memo →

LongPort OpenAPI showed up. Where's yours?

1000+ companies didn't overthink it. 60 seconds. Go.

Check your site →

More llms.txt examples

View all →