Skip to content

feat!: sync longbridge/openapi 4.4.0–4.5.0 and remove symbol↔counter_id conversions (#562) - #7

Open
hogan-yuan wants to merge 3 commits into
longportapp:mainfrom
hogan-yuan:feat/sync-longbridge-and-remove-counter-id
Open

feat!: sync longbridge/openapi 4.4.0–4.5.0 and remove symbol↔counter_id conversions (#562)#7
hogan-yuan wants to merge 3 commits into
longportapp:mainfrom
hogan-yuan:feat/sync-longbridge-and-remove-counter-id

Conversation

@hogan-yuan

Copy link
Copy Markdown

Two-commit sync bringing this repo to content parity with longbridge/openapi (brand-renamed longbridgelongport, URLs → longportapp.com; CN URLs, package coords and workspace version untouched).

Commit 1 — sync 4.4.0 → 4.5.0

  • US market APIs (14 interfaces, us_ token) + x-dc-region routing
  • AI Agent module (AgentContext: workspaces / agents / public_agents, blocking + SSE conversations, typed events, references, interrupts) — ⚠️ new surface on the LongPort brand; please confirm this is intended to ship here
  • Paper trading via Config; attached orders (TP/SL); client_request_id; all_executions (disabled pending API); OutsideRTH.OptionPreMarket; OrderTag.GTCGtc; charge_detail optional; musl target removed
  • The 4.3.6/4.3.7 fixes already released here (shared reqwest client, reconnect-loop shutdown, JNI hardening) are part of the same range — no re-application, no conflicts

Commit 2 — counter_id → symbol removal (longbridge/openapi#562)

  • Request params counter_id/counter_ids/underlying_counter_idsymbol/symbols carrying the user-facing symbol as-is; comparison_symbols; us_query_orders body symbols
  • Responses read symbol directly (US assets: stock full_symbol, crypto symbol); utils/counter.rs + embedded ETF/IX/WT directories removed
  • DELETE params moved to query string, no body; alert/sharelist write methods return ()/void
  • Typed AlertValueMap, CorpActionLive.status, RankCategoriesResponse, next_params, executed_timestamp; industry_rank/industry_peers expose symbol
  • All ~700 optional response fields tolerate explicit JSON null; agent streamed events tolerate null outputs/lists
  • Java: AlertContext.update wired up; six FundamentalContext JNI bindings implemented

Verification

  • cargo check --workspace --all-features and cargo clippy --workspace --all-features pass after each commit (remaining warnings are identical to upstream main, e.g. the intentionally disabled all_executions); cargo +nightly fmt --all clean
  • Gateway behavior for every #562-affected endpoint was live-verified against AP staging / US UAT during the upstream integration-test rounds
  • Version left at 4.3.7 — release bump is the maintainers' call (contentwise this is 4.5.0 + #562)

🤖 Generated with Claude Code

Brings over everything the upstream repo shipped in 4.4.0 through 4.5.0
(brand-renamed longbridge -> longport):

- US market APIs (14 interfaces, us_ token + x-dc-region routing)
- AI Agent module (AgentContext: workspaces/agents/public_agents,
  blocking + SSE-streamed conversations, typed events, references,
  interrupts/interactions)
- Paper trading mode, attached orders (TP/SL), client_request_id,
  all_executions (disabled pending API), OutsideRTH.OptionPreMarket
- OrderTag GTC -> Gtc; charge_detail now optional; musl target removed
- HTTP error responses preserve status/trace-id/headers/body

The 4.3.6/4.3.7 stability fixes previously released here (shared
reqwest::Client, reconnect-loop shutdown, Java JNI hardening) are part
of the same upstream range and remain unchanged.
…api #562)

- Request params counter_id/counter_ids/underlying_counter_id -> symbol/symbols,
  sending the user-facing symbol as-is; comparison_counter_ids ->
  comparison_symbols; us_query_orders body counter_ids -> symbols
- Responses read the server's symbol field directly; US assets stock entries
  read full_symbol, crypto entries read symbol; removed utils/counter.rs and
  the embedded US-ETF/IX/WT directories
- DELETE requests send parameters via query string with no body (alert ids,
  sharelist symbols); alert/sharelist write methods now return ()/void
- AlertItem.value_map typed (AlertValueMap); CorpActionLive.status normalized
  to string; RankCategoriesResponse typed; next_params/executed_timestamp
  typed; industry_rank/industry_peers expose symbol
- Every optional response field now tolerates an explicit JSON null (~700
  fields); AI Agent streamed events tolerate null outputs/lists
- Java: AlertContext.update wired up; six FundamentalContext JNI bindings
  implemented
- fundamental ratings endpoint (GET /v1/quote/ratings) not yet open upstream
The longport-local Makefile.toml adds a create-cmake-build-dir dependency to
every cmake task (this repo's CI runs 'cargo make cmake' on a fresh checkout
where cmake.build does not exist). The 4.4.0-4.5.0 sync clobbered it with the
upstream Makefile.toml; restore the local version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant