Skip to content

fix(ibkr): keep dry-run Gateway sessions read-only - #515

Merged
Pigbibi merged 2 commits into
mainfrom
fix/ibkr-dryrun-readonly-connect-20260918
Sep 17, 2026
Merged

Pigbibi merged 2 commits into
mainfrom
fix/ibkr-dryrun-readonly-connect-20260918

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Dry-run composer still used bare connect_ib, which ran the live what-if write probe and logged Error 201 on U159 (~$390 ELV).
  • Dry-run now connects read_only=True and skips the permission probe.
  • Live what-if margin rejections (INITIAL MARGIN / EQUITY WITH LOAN VALUE) count as write-access proof, not missing trading permission.

Test plan

  • unit tests for dry-run read-only connect + margin rejection acceptance
  • deploy U159 and FORCE dry-run: no Error 201; then restore FORCE=false

Made with Cursor

Pigbibi and others added 2 commits September 18, 2026 04:30
Dry-run still called the live connect_ib helper, so what-if permission probes
ran after hours and logged Error 201 on small accounts. Wire dry-run to
read-only connect, and treat margin probe rejections as write-access proof.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Pigbibi
Pigbibi merged commit 4d5af90 into main Sep 17, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/ibkr-dryrun-readonly-connect-20260918 branch September 17, 2026 20:34
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.

1 participant