A script used to grab and gather your transaction orders to determine how much you have invested into your Wealthsimple TFSA
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtsource .venv/bin/activate
python wealthsimple_scraper.py- The script will open Chrome and navigate to Wealthsimple login
- Log in to your account manually (cookies are saved for future runs)
- Navigate to your TFSA account's Activity/Transactions page
- Press ENTER in the terminal to start scraping
- Wait for the script to scroll and collect all transactions
- Enter any available cash balance when prompted (or 0 to skip)
- Two CSV files will be generated
- Cookie persistence: After first login, cookies are saved so you don't need to re-login each time
- Expired order detection: Limit buy orders marked as "Expired" are automatically excluded
- Cash balance tracking: Optionally add available cash to get accurate total contributions
- Contribution limit: Shows 2026 TFSA limit ($33,500) and remaining room
Two CSV files are generated:
wealthsimple_tfsa_transactions_TIMESTAMP.csv- All transactionswealthsimple_tfsa_transactions_TIMESTAMP_contributions_only.csv- Only contribution transactions
Summary at the top includes:
- Total in stocks
- Total cash (if entered)
- Total contributions (stock + cash)
- 2026 TFSA contribution limit
- Remaining contribution room
Transactions listed oldest to newest with columns:
- Date, Symbol, Transaction Type, Category, Amount, Contribution Change, Running Total
| Category | Transaction Types | Effect |
|---|---|---|
| ADD | Fractional buy, Recurring buy, Limit buy | Adds to contribution total |
| SUBTRACT | Transfer out | Subtracts from contribution total |
| SKIPPED | Expired limit orders | Not counted |
| EXCLUDED | Dividends, Deposits, Stock Lending, etc. | Tracked but not counted |
- Python 3.7+
- Chrome browser
- selenium>=4.0.0
- selenium-stealth==1.0.6