We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 23962d7 + f699cbb commit 8485753Copy full SHA for 8485753
1 file changed
ws_api/wealthsimple_api.py
@@ -564,6 +564,13 @@ def _activity_add_description(self, act):
564
received_shares: float = float(act['amount'])
565
act['description'] = f"Subdivision: Received {received_shares} new shares of {act['assetSymbol']}"
566
567
+ if act["currency"] is None:
568
+ security = self.get_security_market_data(act["securityId"])
569
+ if security and isinstance(security, dict):
570
+ fundamentals = security.get("fundamentals")
571
+ if fundamentals and isinstance(fundamentals, dict):
572
+ act["currency"] = fundamentals.get("currency")
573
+
574
elif act['type'] in ['DEPOSIT', 'WITHDRAWAL'] and act['subType'] in ['E_TRANSFER', 'E_TRANSFER_FUNDING']:
575
direction = 'from' if act['type'] == 'DEPOSIT' else 'to'
576
act['description'] = (
0 commit comments