Python script that updates account balances utilizing APIs from various stock brokerages (Interactive Brokers, Questrade and Wealthsimple Trade)
- Clone this repository
- set the following env variables in secrets.py
- IBKR_TFSA_ACCOUNT_ID
- IBKR_CASH_ACCOUNT_ID
- IBKR_RRSP_ACCOUNT_ID
- Download the Interactive Brokers Client Portal Gateway
- Install Java Java Download
- Extract the clientportal.gw.zip into the root of the UpdateBalanceSheet directory
- In the root of the UpdateBalanceSheet directory, create a python virtual environment venv and activate it
python -m venv venv
.\venv\Scripts\activate.ps1
pip install -r requirements.txt
- run the following command from the clientportal.gw inside prompt/terminal of your choice (CMD, PowerShell):
bin\run.bat root\conf.yaml
- Open https://localhost:5000 to login to your Interactive Brokers account Authorization the gateway proxy with your account credentials
- register the app in Questrade Apps
- set the following env variables in secrets.py to match the REDIRECT_URI and CLIENT_ID set when registering the app
- QT_REDIRECT_URI
- QT_APP_CLIENT_ID
- set the following env variables in secrets.py
- if you use a 2fa code you will need to enter that upon fetching the data from the wsimple.api
- WEALTHSIMPLE_USERNAME
- WEALTHSIMPLE_PASSWORD
- WEALTHIMSPLE_RRSP_ACCOUNT_ID
- WEALTHIMSPLE_TFSA_ACCOUNT_ID
- Column A is the Account_Name
- Column B is the Account_Balance