Access your Wealthsimple account using their (GraphQL) API.
Project description
Unofficial Wealthsimple API Library for Python
This library allows you to access your own Wealthsimple account using the Wealthsimple (GraphQL) API.
Python 3.10+ required
Features
- Retrieve all accounts (RRSP, TFSA, FHSA, cash, margin, crypto, credit card)
- Get account balances and positions
- Fetch historical performance (net value, deposits, gains)
- Access transaction/activity history
- Search securities and get market data
- Historical price quotes
- Handle 2FA (TOTP) authentication
- Automatic session refresh
- Optional security data caching
Installation
uv add ws-api
# or
pip install ws-api
Basic Example
from ws_api import WealthsimpleAPI
# Login (will prompt for username/password/TOTP)
session = WealthsimpleAPI.login(username="you@example.com", password="yourpassword")
ws = WealthsimpleAPI.from_token(session)
# Get your accounts
accounts = ws.get_accounts()
for account in accounts:
print(f"{account['description']}: {account['number']}")
Full Example
Note: You'll need the keyring package to run the code below. Install with: uv add keyring (or pip install keyring)
See tests/test_full_example.py
Projects Using It
- wealthgrabber - Wealthsimple portfolio analytics
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ws_api-0.33.1.tar.gz.
File metadata
- Download URL: ws_api-0.33.1.tar.gz
- Upload date:
- Size: 51.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0ec0191d12610a54995dec4d1858cbac82129ae40dc61a8a8196aab58b2a090
|
|
| MD5 |
25ff2b96c3948a7f67bd50de49f3c3f7
|
|
| BLAKE2b-256 |
4f2bc43f39d73a3854a3487ca4bf51cd1503931285e176140d370b2e77e54089
|
Provenance
The following attestation bundles were made for ws_api-0.33.1.tar.gz:
Publisher:
publish.yml on gboudreau/ws-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ws_api-0.33.1.tar.gz -
Subject digest:
d0ec0191d12610a54995dec4d1858cbac82129ae40dc61a8a8196aab58b2a090 - Sigstore transparency entry: 1553437073
- Sigstore integration time:
-
Permalink:
gboudreau/ws-api-python@c9e2b0e227e4e9df571371c8bb96f7f48d375201 -
Branch / Tag:
refs/tags/0.33.1 - Owner: https://github.com/gboudreau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c9e2b0e227e4e9df571371c8bb96f7f48d375201 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ws_api-0.33.1-py3-none-any.whl.
File metadata
- Download URL: ws_api-0.33.1-py3-none-any.whl
- Upload date:
- Size: 43.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29b9f510dd181cf601d3805083f306796fc8fa1da0ab393d51128aaa44b14fe9
|
|
| MD5 |
721a3e884d137c644648195f304677ca
|
|
| BLAKE2b-256 |
bba41228713a350061a2950fc981fd7c22f8795bb08f6ee8ac361ca8002c2260
|
Provenance
The following attestation bundles were made for ws_api-0.33.1-py3-none-any.whl:
Publisher:
publish.yml on gboudreau/ws-api-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ws_api-0.33.1-py3-none-any.whl -
Subject digest:
29b9f510dd181cf601d3805083f306796fc8fa1da0ab393d51128aaa44b14fe9 - Sigstore transparency entry: 1553437106
- Sigstore integration time:
-
Permalink:
gboudreau/ws-api-python@c9e2b0e227e4e9df571371c8bb96f7f48d375201 -
Branch / Tag:
refs/tags/0.33.1 - Owner: https://github.com/gboudreau
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c9e2b0e227e4e9df571371c8bb96f7f48d375201 -
Trigger Event:
release
-
Statement type: