Skip to content

feat: add derivative what-if previews - #53

Merged
felipecsl merged 2 commits into
mainfrom
agent/spread-preview-48
Jul 29, 2026
Merged

feat: add derivative what-if previews#53
felipecsl merged 2 commits into
mainfrom
agent/spread-preview-48

Conversation

@felipecsl

Copy link
Copy Markdown
Member

Context

Issue #48 adds the explicit non-submitting broker gate needed to validate spread acceptance, margin, fees, and warnings without reaching placement.

What changed

  • adds spread preview for one exact atomic vertical and broker doctor --trading
  • requires exact account selection and masks account values in output
  • keeps user-facing credit/debit positive while the adapter handles IBKR signed encoding
  • creates a material-term preview digest with a five-minute expiry
  • binds previews to account/environment, exact contracts and ratios, quantity, limit, TIF, session, timestamp, and normalized What-If result
  • rejects expiry and account/environment mismatch and treats What-If as authoritative over advisory permissions
  • consumes @huskly/ibkr-client@^0.10.0

Safety

Preview output explicitly states no order was submitted. The application capability exposes no placement, warning acknowledgment, cancellation, or raw broker request path.

Validation

  • yarn run check
  • yarn build
  • 10 test files passed

Closes #48

@felipecsl
felipecsl merged commit 93e602e into main Jul 29, 2026
1 check passed
@felipecsl
felipecsl deleted the agent/spread-preview-48 branch July 29, 2026 20:11
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.

Add IBKR spread What-If previews and trading diagnostics

1 participant