Repository navigation
feat(asset): expose bind_fail_reason on BankCard and the decision times on StockTransferIn - #642
Merged
Merged
Conversation
…es on StockTransferIn GET /v2/account/bank-cards returns bind_fail_reason and GET /v1/account/stock-transfers/in returns agree_at, refuse_at and cancel_at (StockTransferOut already had them), but the SDK dropped them. Add them to every SDK; the C members are appended so existing offsets are unchanged.
…elds # Conflicts: # CHANGELOG.md
Merged
hogan-yuan
added a commit
that referenced
this pull request
Dec 4, 2026
Bumps all crates to 5.7.0 and moves `## [Unreleased]` to `## [5.7.0] - 2026-12-04`. Also adds the missing changelog entry for #643. Minor bump: new fields (#642), the HK signals refusal and new path validation in the HTTP client (#645), and a deprecation (#646). Nothing removed. ``` #646 chore: deprecate industry_valuation_dist #645 feat(signal): refuse signals for Longbridge Hong Kong accounts #642 feat(asset): expose bind_fail_reason on BankCard and the decision times on StockTransferIn #644 fix(asset): list every stock transfer state when no state filter is given #643 fix(httpclient): leave X-Api-Key out when an OAuth client has no client ID ``` After merge: push `main` to `release` to publish (crates.io, PyPI, npm, Maven, C++), then tag `v5.7.0` and publish the GitHub release. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
hogan-yuan
added a commit
to longbridge/longbridge-mcp
that referenced
this pull request
Dec 4, 2026
…221) Moves the account tools onto the Rust SDK 5.6's typed `AssetContext` instead of raw gateway calls. Tool output is unchanged except for `coupons` (below) — each other tool has a golden test comparing the old and new paths on the same upstream response. - **Via the SDK:** `edda_authorizations`, `edda_status`, `stock_transfers_out`, `withdrawals` (incl. the bank-name lookup), `deposits`, `reward_records`, `coupons`, `coupon_orders`. - **Still raw**, until longbridge/openapi#642 ships the fields they output: `bank_cards` (`bind_fail_reason`), `stock_transfers_in` (`agree_at` / `refuse_at` / `cancel_at`, which `days_in_process` also uses). - **`coupons`:** cannot match the raw path byte for byte, because that path passed upstream's mixed wire formats through. Its golden test pins the reviewed SDK output instead. Differences: int64 strings come out as numbers and decimals as text; enum names as the server's codes (so commission `targets` now names every type); `"0"` placeholder times are omitted; the undocumented `fund_interest` (null in every reply seen) is no longer listed; a term the server omits comes back as the SDK's default. - **Edge-case differences:** an undocumented state code in `deposits.states` / `stock_transfers_out.state` is now rejected instead of sent upstream; `0` placeholder times are omitted; `account_balance` keeps its output by not exposing 5.6's new `redemption_cash`. Tests: `cargo test --all-features` (627 passed), clippy clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.
GET /v2/account/bank-cardsreturnsbind_fail_reasonandGET /v1/account/stock-transfers/inreturnsagree_at,refuse_atandcancel_at, but the SDK dropped them (StockTransferOutalready had the three times). Found while moving the Longbridge MCP server's account tools ontoAssetContext(longbridge/longbridge-mcp#221):bank_cardsandstock_transfers_inhad to stay on raw gateway calls because of these gaps.BankCard.bind_fail_reason(empty unless binding failed) andStockTransferIn.agree_at/refuse_at/cancel_at. The times decode like the other transfer times: placeholders (0, 1970, negative values) areNone.lb_bank_card_t.bind_fail_reasonandlb_stock_transfer_in_t.agree_at/refuse_at/cancel_at, appended as the last members so existing offsets are unchanged.longbridge.hregenerated by cbindgen (only these members change).getBindFailReason(),getAgreeAt()…), Node.js (bindFailReason,agreeAt…) and Python (stub updated): the same fields.Coupon.fund_interestis still not modelled: the server does not document it and every sample seen so far isnull.Test plan
cargo test -p longbridge --lib(bank card and transfer-in decode tests cover the new fields)cargo clippy --workspace --all-targets: no new warningsasset_context.cppsyntax check,javacon the changed classes🤖 Generated with Claude Code