GitPedia
longbridge

longbridge/openapi

LongPort OpenAPI SDK Base.

12 Releases
Latest: 2d ago
v4.3.3Latest
hogan-yuanhogan-yuan·2d ago·June 26, 2026
GitHub

Added

  • Rust: `market::TradeStatus` — typed enum for `/v1/quote/market-status` trade status codes, with display names, labels, normalization helpers, and code `2001`
  • All languages: `market::MarketTimeItem.trade_status` and `delay_trade_status` now use `market::TradeStatus` instead of raw integers

🐛 Fixed

  • All languages: corrected market trade status documentation and aligned `market::TradeStatus` with the status definition table, including code `2001` and the `123`/`1009`/`1010` display names
  • All languages: `macroeconomic` detail endpoint now populates `info.periodicity` and `info.importance` (`frequence`/`importance` fields added to `V2MacroIndicatorDetail`)
v4.3.2
github-actions[bot]github-actions[bot]·2w ago·June 13, 2026
GitHub

Added

  • All languages: `macroeconomic_indicators` gains `keyword` parameter for fuzzy name filtering via `GET /v2/quote/macrodata`
  • All languages: `macroeconomic` switches to `GET /v2/quote/macrodata/{id}`, results sorted newest-first (`sort=desc`) by default

📋 Changed

  • `MacroeconomicIndicator.name` / `.describe`: `MultiLanguageText` → `string`
  • `Macroeconomic.unit` / `.unit_prefix`: `MultiLanguageText` → `string`
v4.3.1
github-actions[bot]github-actions[bot]·2w ago·June 11, 2026
GitHub
v4.3.0
hogan-yuanhogan-yuan·3w ago·June 4, 2026
GitHub

Added

  • All languages: `FundamentalContext` gains `etf_asset_allocation(symbol)`
  • Rust: new public `longbridge::counter` module — `symbol_to_counter_id`, `index_symbol_to_counter_id`, `counter_id_to_symbol`, and `is_etf`
  • Rust: `QuoteContext` gains `symbol_to_counter_ids(symbols)` and `resolve_counter_ids(symbols)`

📋 Changed

  • `symbol_to_counter_id` now also consults the embedded index and warrant directories

🐛 Fixed

  • Refreshed the embedded US ETF list (4574 → 7250 entries) and added index (648) + warrant (17693) directories
v4.2.2
hogan-yuanhogan-yuan·3w ago·June 2, 2026
GitHub

🐛 Fixed

  • All languages: `CalendarEventsResponse` now exposes `next_date` cursor — callers can pass it as `start` (with the same `end`) to fetch the next page of `/v1/quote/finance_calendar` results
  • All languages: `CalendarEventInfo.symbol` now returns standard symbol format (e.g. `CRM.US`) instead of raw `counter_id` format (e.g. `ST/US/CRM`)
v4.2.1
github-actions[bot]github-actions[bot]·1mo ago·May 23, 2026
GitHub
v4.2.0
hogan-yuanhogan-yuan·1mo ago·May 22, 2026
GitHub

Added

  • 19 new APIs: `FundamentalContext` +9, `QuoteContext` +1 (`short_trades`), `MarketContext` +3, new `ScreenerContext` +5 — see PR [#526](https://github.com/longbridge/openapi/pull/526), [#527](https://github.com/longbridge/openapi/pull/527)
  • Rust: `OAuthBuilder` gains `TokenStorage` trait for custom token persistence

📋 Changed

  • `short_positions` unified for HK+US; typed structs with RFC 3339 timestamps
  • `top_movers`, `rank_list`, `valuation_comparison`: typed structs, `counter_id` → symbol, RFC 3339 timestamps

💥 Breaking changes

  • `stock_events` → `top_movers`; `StockEventsResponse` → `TopMoversResponse`
  • `hk_short_positions` removed; use `short_positions(symbol, count)`
  • `ShortPositionsResponse`, `ShortTradesResponse`, `TopMoversResponse`, `RankListResponse`, `ValuationComparisonResponse` changed from raw JSON to typed structs
v4.1.0
hogan-yuanhogan-yuan·1mo ago·May 20, 2026
GitHub

📋 Changes

  • 7 new context types, 66 methods — `FundamentalContext` (20 methods: financial reports, analyst ratings, dividends, EPS forecasts, consensus estimates, valuation), `MarketContext` (9 methods: market status, broker holdings, A/H premium, trade stats), `CalendarContext` (7 methods: earnings / dividends / splits / IPO calendar), `PortfolioContext` (5 methods: exchange rates, P&L analysis), `AlertContext` (4 methods: price alerts), `DCAContext` (12 methods: DCA plans lifecycle), `SharelistContext` (9 methods: community sharelists)
  • QuoteContext — 4 new methods: `short_positions`, `option_volume`, `option_volume_daily`, `update_pinned`
  • ContentContext — new `topic_detail` and topic reply methods
  • Rust SDK — `Config::header()` to inject custom HTTP/WebSocket headers
  • Parameters now use typed enums instead of raw integers; monetary fields use `Decimal` type
v4.0.2
huacnleehuacnlee·3mo ago·March 19, 2026
GitHub

📋 What's Changed

  • Add news topics and filings by @wuxsoft in https://github.com/longbridge/openapi/pull/477

New Contributors

  • @wuxsoft made their first contribution in https://github.com/longbridge/openapi/pull/477
  • Full Changelog: https://github.com/longbridge/openapi/compare/v4.0.1...v4.0.2
longport-mcp v0.2.1longport-mcp-0.2.1
sunli829sunli829·1y ago·May 13, 2025
GitHub

📋 What's Changed

  • Add `readonly` option to prevent submitting orders to the exchange.
  • Add support market temperature api.

📦 Installation

  • For macOS and Linux (Debain), you can run this script to install:
  • ```bash
  • curl -sSL https://raw.githubusercontent.com/longportapp/openapi/refs/heads/main/mcp/install | bash
  • ```
  • Full Changelog: https://github.com/longportapp/openapi/compare/longport-mcp-0.2.0...longport-mcp-0.2.1
longport-mcp v0.2.0longport-mcp-0.2.0
huacnleehuacnlee·1y ago·April 23, 2025
GitHub

📋 What's Changed

  • Fixed compatibility with the latest MCP protocol.
  • Add support Streamable-HTTP transport.

📦 Installation

  • For macOS and Linux (Debain), you can run this script to install:
  • ```bash
  • curl -sSL https://raw.githubusercontent.com/longportapp/openapi/refs/heads/main/mcp/install | bash
  • ```
  • Full Changelog: https://github.com/longportapp/openapi/compare/longport-mcp-0.1.0...longport-mcp-0.2.0
longport-mcp v0.1.0longport-mcp-0.1.0
sunli829sunli829·1y ago·March 19, 2025
GitHub

Features

  • 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

📦 macOS or Linux

  • Run script to install:
  • ```bash
  • curl -sSL https://raw.githubusercontent.com/longportapp/openapi/refs/heads/main/mcp/install | bash
  • ```

📦 Windows

  • Download the latest binary from the [Releases](https://github.com/longportapp/openapi/releases/tag/longport-mcp-0.1.0) page.

📦 Running on Cursor

  • To configure LongPort MCP in Cursor:
  • Open Cursor Settings
  • Go to Features > MCP Servers
  • Click `+ Add New MCP Server`
  • Enter the following:
  • Name: `longport-mcp` (or your preferred name)
  • Type: `command`
  • Command: `env LONGPORT_APP_KEY=your-app-key LONGPORT_APP_SECRET=your-app-secret LONGPORT_ACCESS_TOKEN=your-access-token longport-mcp`
  • + 1 more

📦 Running on Cherry Studio

  • To configure LongPort MCP in Cherry Studio:
  • Go to Settings > MCP Servers
  • Click `+ Add Server`
  • Enter the following:
  • Name: `longport-mcp` (or your preferred name)
  • Type: `STDIO`
  • Command: `env LONGPORT_APP_KEY=your-app-key LONGPORT_APP_SECRET=your-app-secret LONGPORT_ACCESS_TOKEN=your-access-token longport-mcp`
  • If you are using Windows, replace command with `cmd /c "set LONGPORT_APP_KEY=your-app-key && set LONGPORT_APP_SECRET=your-app-secret && set LONGPORT_ACCESS_TOKEN=your-access-token && longport-mcp"`

📦 Running as a SSE server

  • ```bash
  • env LONGPORT_APP_KEY=your-app-key LONGPORT_APP_SECRET=your-app-secret LONGPORT_ACCESS_TOKEN=your-access-token longport-mcp --sse
  • ```
  • Default bind address is `127.0.0.1:8000`, you can change it by using the `--bind` flag:
  • ```bash
  • longport-mcp --sse --bind 127.0.0.1:3000
  • ```