Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ibflex/Types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,7 @@ class Trade(FlexElement):
cusip: Optional[str] = None
isin: Optional[str] = None
rtn: Optional[str] = None
initialInvestment: Optional[str] = None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider using snake_case for consistency.

The rest of the attributes in the class use snake_case. It would be more consistent to name this attribute initial_investment.

Suggested change
initialInvestment: Optional[str] = None
initial_investment: Optional[str] = None

issuerCountryCode: Optional[str] = None
listingExchange: Optional[str] = None
multiplier: Optional[decimal.Decimal] = None
Expand Down Expand Up @@ -2198,7 +2199,8 @@ class CashTransaction(FlexElement):
fineness: Optional[decimal.Decimal] = None
weight: Optional[str] = None
figi: Optional[str] = None

issuerCountryCode: Optional[str] = None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Duplicate attribute in CashTransaction class.

The issuerCountryCode attribute is already defined in the CashTransaction class. This could lead to confusion or unintended behavior.

availableForTradingDate: Optional[datetime.date] = None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider using snake_case for consistency.

The rest of the attributes in the class use snake_case. It would be more consistent to name this attribute available_for_trading_date.

Suggested change
availableForTradingDate: Optional[datetime.date] = None
available_for_trading_date: Optional[datetime.date] = None


@dataclass(frozen=True)
class DebitCardActivity(FlexElement):
Expand Down
1 change: 1 addition & 0 deletions ibflex/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Code(str, enum.Enum):
"""
ASSIGNMENT = "A"
AUTOEXERCISE = "AEx" # Automatic exercise for dividend-related recommendation
AUTOFX = "AFx" # FX Auto Conversion
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Consider using consistent casing for enum values.

The other enum values use uppercase letters only. Consider changing AFx to AFX for consistency.

Suggested change
AUTOFX = "AFx" # FX Auto Conversion
AUTOFX = "AFX" # FX Auto Conversion

ADJUSTMENT = "Adj" # Adjustment
ALLOCATION = "Al" # Allocation
AWAY = "Aw" # Away Trade
Expand Down