v0.9.0-beta.8: IBKR stability, aliceId enforcement, trailing stop fix#88
Merged
luokerenx4 merged 3 commits intomasterfrom Mar 26, 2026
Merged
v0.9.0-beta.8: IBKR stability, aliceId enforcement, trailing stop fix#88luokerenx4 merged 3 commits intomasterfrom
luokerenx4 merged 3 commits intomasterfrom
Conversation
…scription cache reqAccountUpdates was being used in subscribe→collect→unsubscribe round-trips on every getAccount/getPositions call. When TWS was slow (e.g. after tradingPush), timeouts cascaded and the lock's derived Promise rejected without a handler, crashing the process. Now subscribes once on init(), maintains a double-buffered cache that updates on each accountDownloadEnd callback. getAccount/getPositions read from cache synchronously — no network round-trip, no lock, no timeout, no unhandled rejection. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
stagePlaceOrder/stageClosePosition now throw on invalid aliceId instead of silently creating an empty Contract (which caused TWS to reject with "invalid security type"). Updated all test fixtures from old hyphen format (mock-AAPL) to pipe format (mock-paper|AAPL). Tool descriptions now document the expected format explicitly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
trailingAmount and stopPrice were both assigned to order.auxPrice, causing the last write to overwrite the other. IBKR Order has a dedicated trailStopPrice field for trailing stop offsets. Added tests for trailing stop amount, percent, and the case where both stopPrice and trailingAmount are set simultaneously. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reqAccountUpdatesround-trips with persistent subscription. Eliminates timeout cascades and unhandled rejection crashes aftertradingPushaccountId|nativeKeyformat.stagePlaceOrdernow throws on invalid format instead of silently creating empty contractsauxPrice(conflicting withstopPrice), now correctly maps toorder.trailStopPrice58 commits since last merge.
Test plan
🤖 Generated with Claude Code