Skip to content

feat(fundamental): add business-segments, institution-rating-views, industry-rank, industry-peers, financial-report-snapshot#526

Merged
hogan-yuan merged 6 commits into
mainfrom
feat/fundamental-business-segments-industry-rank
May 20, 2026
Merged

feat(fundamental): add business-segments, institution-rating-views, industry-rank, industry-peers, financial-report-snapshot#526
hogan-yuan merged 6 commits into
mainfrom
feat/fundamental-business-segments-industry-rank

Conversation

@hogan-yuan
Copy link
Copy Markdown
Member

Summary

Ports 5 new fundamental data APIs from longbridge-terminal PR #202 into the Rust SDK.

  • business_segments — current-period revenue segment breakdown (GET /v1/quote/fundamentals/business-segments)
  • business_segments_history — historical segment trends by period/category (GET /v1/quote/fundamentals/business-segments/history)
  • institution_rating_views — monthly buy/hold/sell distribution timeline (GET /v1/quote/ratings/institutional)
  • industry_rank — industry ranking list by market and indicator (GET /v1/quote/industry/rank)
  • industry_peers — hierarchical sub-sector tree for a BK counter_id (GET /v1/quote/industries/peers)
  • financial_report_snapshot — AI earnings summary + forecast vs actual beat/miss analysis (GET /v1/quote/financials/earnings-snapshot)

Changes

  • rust/src/fundamental/types.rs — 13 new public structs
  • rust/src/fundamental/context.rs — 6 new async methods on FundamentalContext
  • rust/src/blocking/fundamental.rs — 6 new blocking wrappers on FundamentalContextSync
  • CHANGELOG.md — updated [Unreleased] section

Test plan

  • cargo clippy --all --all-features — passes
  • cargo +nightly fmt --all — applied
  • Verify each endpoint against the terminal CLI (longbridge business-segments AAPL.US, longbridge industry-rank --market US, etc.)

🤖 Generated with Claude Code

…ndustry-rank, industry-peers, financial-report-snapshot APIs

Ported from longbridge-terminal PR #202:
- business_segments / business_segments_history — GET /v1/quote/fundamentals/business-segments[/history]
- institution_rating_views — GET /v1/quote/ratings/institutional
- industry_rank — GET /v1/quote/industry/rank
- industry_peers — GET /v1/quote/industries/peers
- financial_report_snapshot — GET /v1/quote/financials/earnings-snapshot

Includes types, async context methods, and blocking wrappers.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…tryPeerNode

Confirmed via live API testing:
- InstitutionRatingViewItem: date/buy/over/hold/under/sell/total come as strings
- IndustryPeerNode: stock_num comes as an integer (i32)

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@hogan-yuan hogan-yuan marked this pull request as ready for review May 18, 2026 07:39
@hogan-yuan hogan-yuan marked this pull request as draft May 18, 2026 07:47
hogan-yuan and others added 2 commits May 18, 2026 17:42
…ndustry-rank, industry-peers, financial-report-snapshot to all language SDKs

Adds the 6 new fundamental APIs to Python, Node.js, Java, C, and C++:
- business_segments / business_segments_history
- institution_rating_views
- industry_rank
- industry_peers
- financial_report_snapshot

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…mental APIs

SdkNative.java was missing the 6 native method declarations that
FundamentalContext.java calls, causing Java compilation failure.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@hogan-yuan hogan-yuan marked this pull request as ready for review May 18, 2026 11:06
@hogan-yuan hogan-yuan merged commit 141adad into main May 20, 2026
56 checks passed
@hogan-yuan hogan-yuan deleted the feat/fundamental-business-segments-industry-rank branch May 20, 2026 08:19
hogan-yuan added a commit to longbridge/developers that referenced this pull request May 20, 2026
…ndustry-rank, industry-peers, financial-report-snapshot (#999)

## Summary

Adds documentation for 6 new fundamental SDK APIs ported from
[longbridge-terminal PR
#202](longbridge/longbridge-terminal#202).

**18 files created** across `zh-CN`, `zh-HK`, and `en`:

| API | SDK Method | Endpoint |
|-----|-----------|----------|
| Business Segments | `business_segments` | `GET
/v1/quote/fundamentals/business-segments` |
| Business Segments History | `business_segments_history` | `GET
/v1/quote/fundamentals/business-segments/history` |
| Institutional Rating Views | `institution_rating_views` | `GET
/v1/quote/ratings/institutional` |
| Industry Ranking | `industry_rank` | `GET /v1/quote/industry/rank` |
| Industry Peer Hierarchy | `industry_peers` | `GET
/v1/quote/industries/peers` |
| Financial Report Snapshot | `financial_report_snapshot` | `GET
/v1/quote/financials/earnings-snapshot` |

## Related PRs

- SDK (Rust): longbridge/openapi#526
- SDK (Go): longbridge/openapi-go#91

## Test plan

- [ ] Preview renders correctly for all 3 locales
- [ ] `<SDKLinks>` components resolve to correct methods
- [ ] `<CliCommand>` blocks display expected CLI invocations
- [ ] Response JSON examples and schema tables are accurate

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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