Add a bunch of fields that appear in my flex queries on new types#96
Open
vroonhof wants to merge 19 commits intocsingley:masterfrom
Open
Add a bunch of fields that appear in my flex queries on new types#96vroonhof wants to merge 19 commits intocsingley:masterfrom
vroonhof wants to merge 19 commits intocsingley:masterfrom
Conversation
IBKR seems to be in migrarion from AssetSummary to SymbolSummary Currency conversion rates sometimes appear for 'RUS' (though always
Most of these are empty but present on my reports, it just seems to inherit from Trade
Add missing fields for current IBKR Flex Query format - Add positionActionID to Trade, Lot, SymbolSummary, AssetSummary, Order - Add 32 missing fields to SymbolSummary (closePrice, cost, mtmPnl, etc.) - Add RUS to CURRENCY_CODES (used by IBKR for Russian-related data) - Remove hardcoded URL override that broke API calls 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Pullfromibflex2
Co-authored-by: vroonhof <38109466+vroonhof@users.noreply.github.com>
Fix initialInvestment type and add liteSurchargeAccruals field
Interactive Brokers frequently adds new fields to their XML exports, causing parsing failures for attributes/elements not defined in Types.py. This commit adds an opt-in tolerance mechanism: - enable_unknown_attribute_tolerance(): silently ignore unknown XML attributes and element types during parsing - disable_unknown_attribute_tolerance(): restore strict behavior (default) When tolerance is enabled: - Unknown XML attributes on data elements are filtered out before parsing - Unknown element types return None and are filtered from containers - Unknown contained elements in FlexStatement/FlexQueryResponse are skipped - All known attributes continue to be parsed normally The functions are exported from the top-level ibflex package. On the original upstream ibflex package, these functions do not exist, so calling them raises AttributeError - providing a clear version guard. Includes 14 new tests covering: - Default off behavior - Enable/disable toggling - Package-level accessibility (version guard) - Unknown attributes with and without tolerance - Unknown element types - Full round-trip parsing with unknown fields - Container filtering Co-authored-by: vroonhof <vroonhof@users.noreply.github.com>
Co-authored-by: vroonhof <38109466+vroonhof@users.noreply.github.com>
…other data elements The assertion fires in both strict and tolerant modes. When tolerance is on, unknown contained elements are filtered out after the assertion. Co-authored-by: vroonhof <vroonhof@users.noreply.github.com>
…nce-49a3 IB export attribute tolerance
Updated README to clarify enhancements and features of the vendored ibflex library.
…date Mark package as vendored with version suffix and documentation
Added `liteSurchargeAccrualsLong`, `liteSurchargeAccrualsShort`, `cgtWithholdingAccruals`, `cgtWithholdingAccrualsLong`, and `cgtWithholdingAccrualsShort` to `EquitySummaryByReportDateInBase` dataclass in `ibflex/Types.py` to fix parsing errors reported in issue #132. Added a regression test `tests/test_equity_summary_fields.py` to verify the fix. Co-authored-by: vroonhof <38109466+vroonhof@users.noreply.github.com>
…664759381441106 Fix missing fields in EquitySummaryByReportDateInBase
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.
IBKR seems to be in migration from AssetSummary to SymbolSummary
note: sort order of attributes on different types seems to have diverged. may be a worth a new sort, not doing this here to keep diff minial.
Currency conversion rates sometimes appear for 'RUS' (though always with -1 rates)