Skip to content

Commit e792a63

Browse files
committed
new: subdivision activity description
1 parent a562ff6 commit e792a63

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setuptools.setup(
44
name = 'WS-API',
55
packages = ['ws_api'],
6-
version = '0.17.0',
6+
version = '0.18.0',
77
license = 'GPL-3.0',
88
description = 'Access your Wealthsimple account using their (GraphQL) API.',
99
author = 'Guillaume Boudreau',

ws_api/wealthsimple_api.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,9 @@ def _activity_add_description(self, act):
472472
f"{security} @ {float(act['amount']) / float(act['assetQuantity'])}"
473473
)
474474

475+
elif act['type'] == 'CORPORATE_ACTION' and act['subType'] == 'SUBDIVISION':
476+
act['description'] = f"Subdivision: Received {act['amount']} shares of {act['assetSymbol']}"
477+
475478
elif act['type'] in ['DEPOSIT', 'WITHDRAWAL'] and act['subType'] in ['E_TRANSFER', 'E_TRANSFER_FUNDING']:
476479
direction = 'from' if act['type'] == 'DEPOSIT' else 'to'
477480
act['description'] = (

0 commit comments

Comments
 (0)