fix(fundamental): send comparison_symbols as a query array (gateway now accepts it) - #581
Merged
Merged
Conversation
…ow accepts it) The gateway now supports the comparison_symbols parameter on GET /v1/quote/compare/valuation, expecting a standard HTTP array (repeated keys: comparison_symbols=A&comparison_symbols=B), not a JSON array string. Drop the temporary stopgap that converted the peer symbols to counter-ids and sent the legacy comparison_counter_ids parameter; pass the user symbols straight through as Option<Vec<String>>, which the qs serializer emits as repeated keys. Removes the symbol_to_counter_id shim added for the stopgap. Verified live on staging (2/3/4 peers return the stock plus all peers). Note: the gateway fix is on staging first; production still answers this new format with code 13 until its rollout lands.
Merged
hogan-yuan
added a commit
that referenced
this pull request
Sep 14, 2026
Release **v5.0.0**. Bumps the workspace version `4.5.0` → `5.0.0` and closes out the `[Unreleased]` CHANGELOG section as `[5.0.0] - 2026-09-14`. Major bump: this release carries breaking API changes across every language binding. Base includes everything on `main` through #581 (the `comparison_symbols` switch, verified live against production) and #591 (`history_executions` paging). ### Breaking changes (7) - Removed `GridContext.submit_strategy_questionnaire` (`POST /v1/record/questionnaire`) and `SubmitStrategyQuestionnaireOptions` across all bindings. - `WarrantStatus` gains an `Unknown` variant (first variant) — shifts the ordinal of existing variants in C/C++/Java/Node.js/Python. - `WarrantInfo.expiry_date` is now optional (empty server dates no longer fail the whole `warrant_list`). - `FundamentalContext.industry_rank` takes typed `IndustryRankIndicator` / `IndustryRankSortType` (+ `Market`) instead of three free-form strings. - `FundamentalContext.us_financial_statement` takes a typed `FinancialStatementKind` instead of a free-form `kind` string. - Write methods on `AlertContext` (`add`/`update`/`delete`) and `SharelistContext` (`delete`/`add_securities`/`remove_securities`/`sort_securities`) now return `()` / `void` / `Promise<void>`. - `FundamentalContext.ratings` (`GET /v1/quote/ratings`) is temporarily unavailable (server-side 暂不开放) — commented out across all bindings; `StockRatings` types retained. Added (7), Changed (14), and Fixed (12) are detailed in `CHANGELOG.md`. ### Changelog housekeeping Consolidated the interleaved duplicate `[Unreleased]` section headers (`Breaking changes` ×2, `Fixed` ×3) into one section each, ordered Breaking → Added → Changed → Fixed, and removed 4 duplicate Fixed entries (the C/C++ null-pointer, C++ `AssetContext`, and C `lb_statement_item_t` items each appeared twice). No entry content was dropped other than the duplicates. Added one new entry for #581 under Changed. ### To publish after merge 1. Fast-forward the `release` branch to the merge commit: `git push origin <merge-sha>:release` (triggers the Release workflow → crates.io / PyPI / npm / Maven Central / S3).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
PR #562 switched
valuation_comparison's request parameter fromcomparison_counter_idstocomparison_symbols, but the gateway did not supportit at the time, so a temporary stopgap was added (the SDK locally converted the
symbol back to a counter-id and kept sending the legacy
comparison_counter_ids).Now
The gateway now accepts
comparison_symbols, but only in the standard HTTParray format (repeated key
comparison_symbols=A&comparison_symbols=B, or[]), not a JSON array string. Measured:comparison_symbols=["9988.HK","3690.HK"](JSON string)comparison_symbols=9988.HK&comparison_symbols=3690.HK(repeated key)comparison_symbols[]=...(bracket)Changes
symbol_to_counter_idshim + localcomparison_counter_idsconversion).comparison_symbols: Option<Vec<String>>, serialized by qs into repeated keys — which is exactly what the gateway expects.Option<Vec<String>>of user symbols).Verification
cargo clippy --all --all-features0 errors,cargo +nightly fmtclean.openapi.longbridge.com, re-tested 2026-09-14): 700.HK + 2/3/4 comparison symbols all ✅ 200, returning the subject plus every comparison peer, symbols all in user-symbol form (not counter-ids), with PE/PB/market-cap fields populated. The code 13 previously returned by production no longer reproduces.✅ Release order (blocker resolved)
The gateway fix was only on the test env; production still returned code 13 for the new format. This PR had to wait until the gateway production deployment shipped before merge/release.The gateway's new-format fix is now live in production and has been re-verified (see Verification above). The previous merge/release blocker is satisfied, so this PR can be merged/released normally.