TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/jbms/finance-dl/llms.txt
Use this file to discover all available pages before exploring further.
finance_dl.schwab scraper automates downloading transaction history, daily positions, and optional cost-basis lot details from Charles Schwab brokerage and banking accounts. It uses Selenium and ChromeDriver to authenticate with the Schwab web interface and then calls internal Schwab export APIs to pull structured CSV data for each account found in your profile.
Configuration Parameters
A dict containing your Schwab login credentials.
Path to the local directory where downloaded CSV files will be written. The directory will be created if it does not exist. A subdirectory is created for each account number found in your Schwab profile.
The earliest date from which to retrieve transaction history. If no existing files are present for an account in the output directory, data is fetched starting from this date. On subsequent runs, the scraper advances automatically from the last downloaded date.
When set to
True, the scraper navigates to the Positions page after downloading transactions and downloads full cost-basis lot detail CSV files for every position in each brokerage account. Lot files are saved in a lots/YYYY-MM-DD/ subdirectory inside the positions directory. Has no effect on checking accounts.Path to a persistent Chrome browser profile directory. Reusing a profile avoids re-entering two-factor authentication codes on each run. The path must be dedicated to this single configuration and must not be your normal browser profile. If omitted, a fresh temporary profile is used every time.
Output Format
The scraper creates a subdirectory per account number insideoutput_directory. Within each account directory:
Transaction CSV files are named using the date range they cover:
| File pattern | Contents |
|---|---|
YYYY-MM-DD_YYYY-MM-DD.csv | Transaction history from start date to end date |
positions/YYYY-MM-DD.csv | Full positions snapshot as of that date |
positions/lots/YYYY-MM-DD/<SYMBOL>.csv | Per-symbol cost-basis lot detail (only when lot_details=True) |
Configuration Example
Setting
headless=False is strongly recommended for Schwab. The Schwab login page loads inside an iframe and may trigger additional security checks that are easier to handle in a visible browser window.lot_details=True: