Skip to main content

schwab-advisor

Typed Python client for the Schwab Advisor Services API — the institutional API set for RIAs custodying at Schwab, not the retail Trader API.

pip install schwab-advisor

Quickstart

Credentials come from the environment (or pass them to SchwabAuth directly):

Variable Meaning
SCHWAB_CLIENT_ID OAuth client id
SCHWAB_CLIENT_SECRET OAuth client secret
SCHWAB_REDIRECT_URI Redirect URI (default https://127.0.0.1)
SCHWAB_TOKEN_FILE Token store (default ~/.schwab_tokens.json)
SCHWAB_ENVIRONMENT sandbox (default) or production
from schwab_advisor import SchwabAdvisorClient

with SchwabAdvisorClient() as client:
    profiles = client.get_account_profiles(page_limit=25, show_account="Show")
    for p in profiles.profiles:
        print(p.formatted_account, p.account_title)

    balances = client.get_balance_detail(profiles.profiles[0].formatted_account)
    positions = client.get_positions_list([p.formatted_account for p in profiles.profiles[:5]])

Every response is a typed dataclass with a raw_data escape hatch, so a field the models do not yet cover is still reachable.

Coverage

Wrappers for the Advisor Services products, grouped by segment:

  • Accounts — account profiles, Account Inquiry (master accounts, accounts, account owners), Client Inquiry, Profiles and account holders, Preferences & Authorizations, Address Changes, Account Synchronization
  • Portfolio — Balances, Positions, Transactions, Cost Basis (realized/unrealized gain-loss, lots, preferences)
  • Move Money — Standing Authorizations, ACH and wire transfers, Move Money Activity, tax-withholding elections
  • Documents & status — Reports (statements, confirmations, tax documents, PDF retrieval), Document Preferences, Alerts, Status, Service Requests, Feature Enrollment
  • Trading — order submission, cancel/replace, order status, blotter and allocation upload

Access is granted per API product and per route on your Schwab app, so what you can actually call depends on your entitlements, not on this library. A 401 carrying InvalidAPICallAsNoApiProductMatchFound in the www-authenticate header means the route is not attached to your app — not that your token is bad.

Development

poetry install
poetry run python -m pytest

The suite is offline and hermetic — every HTTP call is mocked, so it runs without credentials.

Two suites diff the models against Schwab's OpenAPI specifications to catch under-parsing. Those specs are Schwab's to distribute, so they are not vendored here; the suites skip unless you point at a directory containing them:

SCHWAB_SPECS_DIR=/path/to/specs poetry run python -m pytest

Status

Validated end to end against the Schwab sandbox across four rounds of Schwab's own technical-validation scenarios. Model completeness is enforced by a schema-coverage guard; raw_data is retained on every model so drift never blocks a caller.

License

Apache-2.0 — see LICENSE.

Metadata

Release files for schwab-advisor 0.4.2

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

Source distribution (sdist)

Source distribution for schwab-advisor 0.4.2
File Size Uploaded Provenance Actions
schwab_advisor-0.4.2.tar.gz 66.7 kB With provenance Details for schwab_advisor-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for schwab-advisor 0.4.2
File Interpreter ABI Platform Actions
schwab_advisor-0.4.2-py3-none-any.whl Python 3 none any Details for schwab_advisor-0.4.2-py3-none-any.whl

Total release size: 135.9 kB

Release files / schwab_advisor-0.4.2.tar.gz

Download URL schwab_advisor-0.4.2.tar.gz
Size 66.7 kB
Tags Source
SHA-256 checksum
How to use checksums
59ec7a79bd5c0879c42644127422c621b78a032af4ed28f573418c0c667ef7e6
BLAKE2b-256 checksum
How to use checksums
ec5b1fd81217cf4c779363be65da8d8a103de8263d4348f8899726986215f2fc
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 7, 2026.

Transparency log

Release files / schwab_advisor-0.4.2-py3-none-any.whl

Download URL schwab_advisor-0.4.2-py3-none-any.whl
Size 69.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbf6ccba54c371fcd8d5a2be65b437a2d1c5573d30dd1886536842f9b0c97301
BLAKE2b-256 checksum
How to use checksums
b053d83e554fe6fe55d9477cdd0d49e2b9a280ca655a659d833232e802daf063
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 7, 2026.

Transparency log

Security for schwab-advisor 0.4.2

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for schwab_advisor-0.4.2.tar.gz

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 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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