Skip to content

Commit f1b453f

Browse files
committed
new: support for MANAGED_BUY & MANAGED_SELL transactions
1 parent 8a85011 commit f1b453f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ws_api/wealthsimple_api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,9 +555,11 @@ def _activity_add_description(self, act):
555555
direction = 'to' if act['subType'] == 'SOURCE' else 'from'
556556
act['description'] = f"Money transfer: {direction} Wealthsimple {account_description}"
557557

558-
elif act['type'] in ['DIY_BUY', 'DIY_SELL']:
558+
elif act['type'] in ['DIY_BUY', 'DIY_SELL', 'MANAGED_BUY', 'MANAGED_SELL']:
559559
verb = act['subType'].replace('_', ' ').capitalize()
560-
action = 'buy' if act['type'] == 'DIY_BUY' else 'sell'
560+
if 'MANAGED' in act['type']:
561+
verb = "Managed transaction"
562+
action = 'buy' if act['type'] == 'DIY_BUY' or act['type'] == 'MANAGED_BUY' else 'sell'
561563
security = self.security_id_to_symbol(act['securityId'])
562564
if act['assetQuantity'] is None:
563565
act['description'] = (

0 commit comments

Comments
 (0)