1. Conduid
  2. Developer Tools
  3. longportapp/openapi
MCP server · Developer Tools

longportapp/openapi

Longbridge OpenAPI SDK Base.

Unclaimed Apache-2.0 devtoolspyo3sdkjninapirust
80Excellent

Scored 8 hours ago · breakdown

About longportapp/openapi

longportapp/openapi is an MCP server published by longbridge in the Developer Tools category: longbridge OpenAPI SDK Base.

The repository has 461 stars and 67 forks, with the last commit yesterday. Recent commit activity is the strongest signal that reported issues will get attention.

Install

From source
git clone https://github.com/longbridge/openapi

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about longportapp/openapi

Powered by Claude · Grounded in docs

I know everything about longportapp/openapi. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

Static checks derived from the repository 8 hours ago. Heuristics on the source, not an audit.

  • ✓README presentThe repository ships documentation.
  • ✓License declaredUsable under a stated license.
  • ✓Tests presentA test suite exists in the repository.
  • ✓Dependencies pinnedA lockfile pins dependency versions.
  • !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.

1 check has not been run yet.

Releases

v5.2.2v5.2.2 · 16 Oct 2026Attached-order depth levels**: `SubmitAttachedParams` / `ReplaceAttachedParams` gain `profit_taker_depth_level` / `stop_loss_depth_level` (int32). They set the bid/ask depth level for the take-profit / stop-loss limit order's submitted…
v5.2.1v5.2.1 · 14 Oct 2026Time-condition orders**: `delayed_until` on submit and multi-leg submit holds an order in the new `DelayedNotReported` status and sends it automatically at that time. The time must be later than now and at most 90 days ahead; multi-leg…
v5.2.0v5.2.0 · 30 Sep 2026Breaking:** `TradeContext.fund_positions` — the `FundPosition` identifier field is renamed `symbol` → `counter_id` across all layers; the value is now the full fund `counter_id` (e.g. `UT/FD/HK0000384492`), and the ISIN is its last…
v5.1.0v5.1.0 · 20 Sep 2026`option_chain_info_by_date` now uses the HTTP endpoint `GET /v1/gemini/option/option_chain_list`; returns a flat `OptionChainContract`, adds `OptionExpiryCycleType` / `OptionStandardAttr` enums and a `standard_only` param (#588)…
v5.0.0v5.0.0 · 14 Sep 2026

README

Longbridge OpenAPI SDK

Go project version PyPI version npm version Maven Central

Longbridge 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

This repo contains the following main components:

Name Document Description
Rust Doc Longbridge OpenAPI for Rust (>= 1.89.0)
Python Doc Longbridge OpenAPI for Python 3 (>= 3.8)
Node.js Doc Longbridge OpenAPI for Node.js (>= 10)
Java Doc Longbridge OpenAPI for Java (>= 11)
C Doc Longbridge OpenAPI for C (>= C99)
C++ Doc Longbridge OpenAPI for C++(>= C++17)
Go https://github.com/longbridge/openapi-go
MCP An MCP server implementation for Longbridge OpenAPI

Context Types

Context Description
QuoteContext Real-time quotes, candlesticks, options, warrants, watchlists, push subscriptions
TradeContext Orders, positions, account balance, executions, cash flow
AssetContext Account statement download
ContentContext News, community topics
FundamentalContext Financial reports, analyst ratings, dividends, valuation, company overview, shareholders
MarketContext Market status, broker holdings, A/H premium, trade statistics, anomaly alerts, index constituents
CalendarContext Financial calendar (earnings, dividends, splits, IPOs, macro data, market closures)
PortfolioContext Exchange rates, portfolio P&L analysis
AlertContext Price alert management (add/enable/disable/delete)
DCAContext Dollar-cost averaging plan management
SharelistContext Community sharelist management

Quickstart

Pick a language SDK from the table above and follow its README for install and first request. Full reference docs: https://longbridge.github.io/openapi

SDK Documentation

https://longbridge.github.io/openapi

Troubleshooting

  • Environment variables not taking effect
    • macOS/Linux: export ... only affects the current shell session.
    • Windows: setx ... requires opening a new terminal/session to take effect.
  • Authentication errors (401/403)
    • Verify LONGBRIDGE_APP_KEY, LONGBRIDGE_APP_SECRET, LONGBRIDGE_ACCESS_TOKEN are correct and not expired.
    • Ensure your OpenAPI app has the required permissions.
  • Network / connection errors
    • Check firewall/proxy rules for HTTPS/WSS.
    • If you use a custom endpoint, set LONGBRIDGE_HTTP_URL, LONGBRIDGE_QUOTE_WS_URL, LONGBRIDGE_TRADE_WS_URL.
  • Quote subscription exits immediately
    • Keep the process running (event loop / sleep / blocking receive loop), otherwise you will not see push events.
  • Debugging
    • Enable logs via LONGBRIDGE_LOG_PATH.
    • If quotes connect but look empty, keep LONGBRIDGE_PRINT_QUOTE_PACKAGES=true to confirm opened quote packages.
  • Paper trading
    • If your account is a paper trading (simulation) account and you want to place orders, set LONGBRIDGE_PAPERTRADING=true. When enabled, all API calls target the paper trading environment and the server validates the token — if the token belongs to a real-money account the server returns an error. When false (the default) the server imposes no restrictions.

Minimal Verification

If you're not sure whether your environment / credentials are correct, start with the built-in HTTP client examples.

  • Python:

    python examples/python/http_client.py
    
  • Node.js:

    node examples/nodejs/http_client.js
    
  • Rust:

    cargo run --manifest-path examples/rust/Cargo.toml -p http_client
    
  • Java (from the example module directory):

    cd examples/java/http_client
    mvn -q -DskipTests package
    mvn -q -DskipTests exec:java
    
  • C/C++:

    • Use the sources in examples/c/http_client/main.c and examples/cpp/http_client/main.cpp.
    • Build instructions depend on your toolchain; see the corresponding language SDK README.

Expected results:

  • If credentials are valid and network is reachable, the HTTP call returns JSON.
  • If it returns 401/403, check your LONGBRIDGE_APP_KEY, LONGBRIDGE_APP_SECRET, LONGBRIDGE_ACCESS_TOKEN.
  • If it times out / cannot connect, check proxy/firewall and your endpoint env vars.

Resources

License

Licensed under either of

README fetched from the repository 8 hours ago. The original is authoritative.

Questions

About longportapp/openapi

How do I install longportapp/openapi?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is longportapp/openapi safe to use with an AI agent?

Its trust score is 80 out of 100 (excellent). It passes 4 of the 5 static security checks run so far; the failures are listed above. It has no ConduID identity yet, so agent calls to it are not receipted.

Is longportapp/openapi still maintained?

Yes — the latest release is v5.2.2 (16 Oct 2026), and the last commit was yesterday. The repository has 461 stars and 6 open issues.