Enable fractional LongBridge orders#44
Conversation
93d2534 to
2ffba54
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ffba54dfc
ℹ️ 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".
| explicit_step = _optional_float_env(step_env) | ||
| if explicit_step is not None: | ||
| return explicit_step |
There was a problem hiding this comment.
Reject non-positive order quantity step from environment
_quantity_step_env returns the explicit LONGBRIDGE_ORDER_QUANTITY_STEP value without validation, so values like 0 or negative numbers are accepted and flow into execution sizing. In fractional/whole-share sizing paths this step is passed to floor_to_quantity_step(...), which can produce invalid quantities or raise at runtime (for example when a misconfigured deployment sets 0). Validate that the resolved step is finite and strictly greater than zero (and fail fast with a clear config error).
Useful? React with 👍 / 👎.
Summary
Dependencies
Tests