Skip to main content

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

Upgrading

If you are updating from 0.35 or less, to 0.36 or more, the requests dependency has been replaced with curl_cffi.
If you installed using uv or pip (and you update using either), they will take care of that for you.

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

Metadata

Release files for ws-api 0.36.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ws-api 0.36.0
File Size Uploaded
ws_api-0.36.0.tar.gz 54.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ws-api 0.36.0
File Interpreter ABI Platform
ws_api-0.36.0-py3-none-any.whl Python 3 none any Details

Total release size: 99.4 kB

Release files / ws_api-0.36.0.tar.gz

Download URL ws_api-0.36.0.tar.gz
Size 54.1 kB
Tags Source
SHA-256 checksum
How to use checksums
35b661e0d244ef0d337e141b41c12a357e553581fc6099dbbc8f42a0f1b24fd5
BLAKE2b-256 checksum
How to use checksums
e229ef8032d54c8fdd9e7a8f4e669afdc0770bca97a9819d9349f925a0500b41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release files / ws_api-0.36.0-py3-none-any.whl

Download URL ws_api-0.36.0-py3-none-any.whl
Size 45.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
22e7f231085f6ca6c94ba95b9a5b173f5089604781e080c39eb2a1b5ba7ab762
BLAKE2b-256 checksum
How to use checksums
ff20800829d5c6c4102822c5c557b4b82e2d4355d69b098897652d990f2ac09d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.39.3

2 release files

0.39.0

2 release files

0.38.0

2 release files

0.37.1

2 release files

0.37.0

2 release files

0.36.1

2 release files

This release

0.36.0 This release

2 release files

0.34.1

2 release files

0.34.0

2 release files

0.33.2

2 release files

0.33.1

2 release files

0.33.0

2 release files

0.32.3

2 release files

0.32.2

2 release files

0.32.1

2 release files

0.32.0

2 release files

0.31.0

2 release files

0.30.1

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.25.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.19.0

2 release files

0.18.1

2 release files

0.16.0

2 release files

0.14.1

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page