csingley / ibflex

Python parser for Interactive Brokers Flex XML statements
MIT License
87 stars 43 forks source link

Updated OptionEAE class and types #39

Closed pavitrakumar78 closed 3 years ago

pavitrakumar78 commented 3 years ago

Added some extra attributes and type to handle newer OptionEAE format.

Here's an example that was not handled properly (resulted in error) before these modifications:

<OptionEAE accountId="XXXXX" acctAlias="" model="" currency="EUR" fxRateToBase="1" assetCategory="STK" symbol="VOW3d" description="VOLKSWAGEN AG-PREF" conid="14237" securityID="DE0007664039" securityIDType="ISIN" cusip="" isin="DE0007664039" listingExchange="IBIS" underlyingConid="" underlyingSymbol="" underlyingSecurityID="" underlyingListingExchange="" issuer="" multiplier="1" strike="" expiry="" putCall="" principalAdjustFactor="" date="20200430" transactionType="Buy" quantity="100" tradePrice="130.0000" markPrice="216.7000" proceeds="-99,000.00" commisionsAndTax="0.00" costBasis="46,000.00" realizedPnl="0.00" fxPnl="0.00" mtmPnl="-2,660.00" tradeID="123456" serialNumber="" deliveryType="" commodityType="" fineness="0.0" weight="0.0 ()" />
csingley commented 3 years ago

Cool! Would you do me a favor and update tests/test_types.py for these changes? Specifically OptionEAETestCase. TIA.

pavitrakumar78 commented 3 years ago

Cool! Would you do me a favor and update tests/test_types.py for these changes? Specifically OptionEAETestCase. TIA.

Done. Let me know if I need to do anything else.

csingley commented 3 years ago

All good! mypy is now complaining about type-checking requests, but I'll take care of that. Thanks!