Remove default Firstrade order notional cap#17
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here max_order_notional_usd is forwarded directly even when it was already normalized to None for non-positive values (order_notional_cap at lines 243-246). If an existing deployment has FIRSTRADE_MAX_ORDER_NOTIONAL_USD=0, the planner now treats it as uncapped and generates orders, but this raw 0 is passed downstream and validate_stock_order rejects it (max_notional_usd must be positive), causing the whole strategy cycle to fail instead of executing. Pass the normalized cap (order_notional_cap) or otherwise coerce non-positive values to None before building the order request.
ℹ️ 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".
Summary
Tests