Skip to content

Commit 7507e57

Browse files
committed
new: support for INTEREST_CHARGE, MARGIN_INTEREST & MANAGEMENT_FEE transactions
1 parent f1b453f commit 7507e57

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

ws_api/wealthsimple_api.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,15 @@ def _activity_add_description(self, act):
710710
merchant = act['spendMerchant']
711711
act['description'] = f"Purchase: {merchant}"
712712

713+
elif act['type'] == 'INTEREST_CHARGE':
714+
if act['subType'] == 'MARGIN_INTEREST':
715+
act['description'] = "Interest Charge: margin interest"
716+
else:
717+
act['description'] = "Interest Charge"
718+
719+
elif act['type'] == 'FEE' and act['subType'] == 'MANAGEMENT_FEE':
720+
act['description'] = "Management fee"
721+
713722
# TODO: Add other types as needed
714723

715724
def security_id_to_symbol(self, security_id: str) -> str:

0 commit comments

Comments
 (0)