Handle LongBridge quote limits and sub-share orders#27
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0fe062569
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if not normalized_symbols: | ||
| return {} | ||
|
|
||
| quotes = _quote_with_retry(q_ctx, normalized_symbols) |
There was a problem hiding this comment.
Chunk quote calls to LongBridge's 500-symbol request cap
fetch_last_prices sends the entire deduplicated symbol list in one q_ctx.quote(...) call, but LongBridge's quote API accepts at most 500 symbols per request. When fetch_strategy_account_state passes a portfolio with more than 500 distinct holdings, this call will fail and the whole account snapshot path raises instead of returning values; before this change, per-symbol quote calls did not hit that hard cap. Please split normalized_symbols into <=500 batches and merge results.
Useful? React with 👍 / 👎.
Summary
Tests