schwab-py
Unofficial API wrapper for the Schwab HTTP API
Decision gist · record as of 2026-08-14
Yes, if you need programmatic access to Schwab's trading and account APIs and are comfortable with an unofficial wrapper. The low install friction, permissive MIT license, and active repository (despite aging maintenance) make it a reasonable choice for Schwab-based automation. However, be aware that the last release was 410 days ago, paper trading and historical options pricing are not supported, and you must have a Schwab developer account approved before use. Not suitable if you need thinkorswim-specific features or paper trading.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- You must create a Charles Schwab developer account and application, obtain an API key and app secret, and have your app approved by Schwab before use.
- Low install friction with a pure-wheel distribution.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute the package freely in commercial and private projects, provided you include the license notice. The package includes a disclaimer that it is unofficial and unendorsed by Charles Schwab.
last release 2025-06-30 (410 days) · last repo commit 2025-08-04 · 461 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 162,376 downloads/mo, #10,608 on PyPI
Alternatives
Verify before relying
pip install schwab-py
from schwab import auth, client
api_key = 'YOUR_API_KEY'
app_secret = 'YOUR_APP_SECRET'
callback_url = 'https://127.0.0.1:8182/'
token_path = '/path/to/token.json'
c = auth.easy_client(api_key, app_secret, callback_url, token_path)
r = c.get_price_history_every_day('AAPL')
print(r.json())- Whether the aging maintenance status (410 days since last release) indicates active ongoing support or gradual deprecation.
- Real-world reliability and latency characteristics for streaming quotes and order book depth data.
- Whether all Schwab API endpoints are fully wrapped or if some require direct HTTP calls.
What it is and what it does
schwab-py is an unofficial Python wrapper around the Charles Schwab Consumer APIs, designed as a thin layer over the HTTP endpoints. It handles OAuth authentication and token refresh automatically, eliminating the need to roll your own OAuth callback flow. The package returns raw API responses, allowing you to interpret the data as you need rather than imposing opinionated logic.
The wrapper covers login, quotes, fundamentals, historical pricing, options chains, streaming quotes and order book depth, trade execution and management, and account information. It is a direct successor to the now-defunct tda-api library, with a migration guide provided. The package requires Python 3.10 or later and depends on authlib, httpx, websockets, flask, and several utility libraries for its core functionality.
Use it for
- Fetch historical daily price data for equities over multi-year periods for backtesting or analysis.
- Retrieve real-time options chains and streaming quote data for algorithmic trading systems.
- Execute and manage trades programmatically against a Schwab account with automatic OAuth token handling.
- Build a portfolio monitoring dashboard that pulls live account balances and positions from Schwab.
- Migrate existing trading bots from the deprecated tda-api library to the Schwab API.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need programmatic access to Schwab's trading and account APIs and are comfortable with an unofficial wrapper.
The low install friction, permissive MIT license, and active repository (despite aging maintenance) make it a reasonable choice for Schwab-based automation. However, be aware that the last release was 410 days ago, paper trading and historical options pricing are not supported, and you must have a Schwab developer account approved before use. Not suitable if you need thinkorswim-specific features or paper trading.
Install
schwab-py on PyPI
Before you install
Low install friction with a pure-wheel distribution. Maintenance status is aging—last commit was 2025-08-04 and the latest release 2025-06-30 came 410 days before the fact sheet date—but the repository remains active and not archived, with 461 stars.
Requires Python 3.10 or later. You must create a Charles Schwab developer account and application, obtain an API key and app secret, and have your app approved by Schwab before use.
License in practice
MIT license (permissive) means you can use, modify, and distribute the package freely in commercial and private projects, provided you include the license notice. The package includes a disclaimer that it is unofficial and unendorsed by Charles Schwab.
Quickstart
pip install schwab-py
from schwab import auth, client
api_key = 'YOUR_API_KEY'
app_secret = 'YOUR_APP_SECRET'
callback_url = 'https://127.0.0.1:8182/'
token_path = '/path/to/token.json'
c = auth.easy_client(api_key, app_secret, callback_url, token_path)
r = c.get_price_history_every_day('AAPL')
print(r.json())
Verify before relying
- Whether the aging maintenance status (410 days since last release) indicates active ongoing support or gradual deprecation.
- Real-world reliability and latency characteristics for streaming quotes and order book depth data.
- Whether all Schwab API endpoints are fully wrapped or if some require direct HTTP calls.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 10 packagesautopep8authlibcertififlaskhttpxmultiprocesspsutilpython-dateutilurllib3websockets |
| Maintenance | Aging 410 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 162,376 / month, #10,608 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 1 - PlanningIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Office/Business :: Financial :: Investment |
Evidence: schwab_py-1.5.1-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “schwab api wrapper python”
- schwab-pyUnofficial wrapper for the Charles Schwab API that provides…
- lumibotLumibot is a Python framework for building, backtesting, and running…
- twentyc.rpcA client library for consuming 20c's RESTful API, built on top of the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Investment packages
Generates country- and subdivision-specific government holiday calendars on demand, supporting 250 country codes with optional language localization and holiday categories.
Fetches financial and market data from Yahoo Finance's public APIs, including ticker information, historical prices, and live streaming data.
However, do not use it for commercial applications or high-volume data collection without confirming compliance with Yahoo's terms of service.
Provides elementary financial functions (IRR, NPV, PMT, and others) that were deprecated and removed from NumPy, offering a dedicated replacement for financial calculations.
However, given the aging status (no releases since 2019) and unclear compatibility with modern Python and recent numpy versions, verify that it works with your target…
CCXT is a unified API library for connecting to and trading on more than 100 cryptocurrency exchanges and prediction markets, supporting both REST and WebSocket protocols with normalized cross-exchange data access.
Official Python client for accessing live and historical market data from Databento, supporting multiple asset classes, schemas, and data formats with normalized message structures.
Install it if you need programmatic access to Databento's historical or live market data; skip it if you don't have a Databento account or need data from a different…
EdgarTools parses SEC EDGAR filings into typed Python objects and pandas DataFrames, extracting financial statements, insider trades, fund holdings, and other filing types with a consistent API.
The main gotcha is that you must provide an email to the SEC with every request, but that is a documented requirement.
See also longbridge · python-binance · betfairlightweight · massive · tradingview-ta · fyers-apiv3 · yahooquery · ib_async · shortzy · lark-oapi