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.5.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 schwab-advisor 0.5.0
File Size Uploaded Provenance Actions
schwab_advisor-0.5.0.tar.gz 71.3 kB With provenance Details for schwab_advisor-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 145.2 kB

Release files / schwab_advisor-0.5.0.tar.gz

Download URL schwab_advisor-0.5.0.tar.gz
Size 71.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a03ea39282c3fc7e5f20af832fbe8ff30514e4a00b42d0863d7e9b3590fe4a20
BLAKE2b-256 checksum
How to use checksums
df2b7091bb9458ca9fff5c621b7f0a6f30c869e3ffe078034a1e4994c2beb1ef
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 Sep 14, 2026.

Transparency log

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

Download URL schwab_advisor-0.5.0-py3-none-any.whl
Size 73.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe9c0abe6f70f6038bf60a314f411f3a7ae61122b52c6ae3c5fc38c0f72b40b2
BLAKE2b-256 checksum
How to use checksums
b8c66962a03a7449660496c2061dbe4f6364c37b305c59627bd00fe96dbf8657
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 Sep 14, 2026.

Transparency log

Security for schwab-advisor 0.5.0

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.5.0.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 Sep 14, 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