feat(cli): Add search, IPO, financial-statement, asset, and ATM commands#185
Draft
hogan-yuan wants to merge 9 commits intolongbridge:mainfrom
Draft
feat(cli): Add search, IPO, financial-statement, asset, and ATM commands#185hogan-yuan wants to merge 9 commits intolongbridge:mainfrom
hogan-yuan wants to merge 9 commits intolongbridge:mainfrom
Conversation
目标:基于 `docs/api-reference.md` 中的接口,为 `longbridge-terminal` CLI 开发对应的子命令, commit 和 pr 都使用英文 --- ## 🤖 Generated with Endless Co-authored-by: 老袁 Yuan Zhanghong <zhanghong.yuan@longbridge-inc.com>
`crate::openapi::quote().member_id()` returns `Result<i64, longbridge::Error>`, but the helper declared `Result<i64>` (i.e. `anyhow::Result`). Add `.map_err(anyhow::Error::from)` to convert the error type explicitly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
目标:基于 `docs/api-reference.md` 中的接口,为 `longbridge-terminal` CLI 开发对应的子命令, commit 和 pr 都使用英文 --- ## 🤖 Generated with Endless Co-authored-by: 老袁 Yuan Zhanghong <zhanghong.yuan@longbridge-inc.com>
- Fix all new command API paths to use OpenAPI paths (/v1/...) - Remove delete-marked features: pnl-calendar, ipo submit/withdraw - Move search under news/topic subcommands (news search, topic search) - Fix val_str null handling to return "-" consistently - Add fmt_ts() for RFC 3339 timestamp formatting of created_at fields - Fix Pretty mode for single-object commands to use print_json_value - Add empty-array guard in institution-rating --history Pretty output Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
news search <keyword>,topic search <keyword>src/cli/ipo.rs): newiposubcommand group —subscriptions,wait-listing,listed,calendar,info,profile,timeline,order,orders,order-detail,history,eligibility,profit-loss,profit-loss-items,holdingssrc/cli/fundamental.rs):financial-statement,financial-report --latest,valuation-rank,analyst-estimates,institution-rating --history / --industry-ranksrc/cli/asset.rs):short-margin,holding-period,trade-info,order-statssrc/cli/atm.rs):withdrawal-cards,withdrawals,deposits/v1/...)ipo submit,ipo withdraw) andpnl-calendar(marked Delete in API docs)created_at) now formatted as RFC 3339 timestampsTest plan
Use
LONGBRIDGE_ENV=stagingfor all commands below.Search
longbridge news search "TSLA" --limit 5— returns news list with id, title, timelongbridge topic search "Trump" --limit 5— returns topic list with id, author, excerptIPO
longbridge ipo subscriptions— lists active subscriptionslongbridge ipo wait-listing— lists grey market stockslongbridge ipo listed— lists recently listed IPOslongbridge ipo calendar— shows full IPO calendarlongbridge ipo detail 6871.HK— shows IPO detaillongbridge ipo orders— lists active IPO orderslongbridge ipo orders detail <order_id>— shows order detail (use ID from orders)longbridge ipo profit-loss --period all— shows P&L summaryFinancial
longbridge financial-statement AAPL.US --kind IS --report qf— income statementlongbridge financial-report AAPL.US --latest— latest report summarylongbridge valuation-rank AAPL.US --start 2025-01-01 --end 2025-03-31— valuation ranklongbridge analyst-estimates AAPL.US— analyst consensuslongbridge institution-rating AAPL.US --history— rating historylongbridge institution-rating AAPL.US --industry-rank— industry rankAsset
longbridge short-margin— short margin deposit detailslongbridge holding-period 700.HK— holding period breakdownlongbridge trade-info 700.HK— trade info (key-value in pretty mode)longbridge order-stats— order statisticsATM
longbridge bank-cards— bank cards listlongbridge withdrawals— withdrawal history with formatted dateslongbridge deposits— deposit history with formatted dates🤖 Generated with Claude Code