finance-dl reads all of its scraping instructions from a plain Python configuration module — aDocumentation 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.
.py file you write once and reuse on every run. This page explains the required structure of that module, the naming convention for configuration entries, the common dict keys every scraper understands, and the variable patterns that keep paths tidy across many accounts.
The Configuration Module
Create a file namedfinance_dl_config.py (or any valid Python module name) in a directory of your choice. Because sys.path always includes the current working directory, you can run finance-dl from the same folder as the file without any extra path configuration:
sys.path before invoking the CLI.
CONFIG_ Functions
Every configuration entry is a top-level function whose name starts withCONFIG_. The portion after the prefix is the configuration name you pass to --config. Each function must return a plain Python dict describing what to scrape and where to save the output.
python -m finance_dl.cli --config-module finance_dl_config --config amazon resolves to CONFIG_amazon() and passes the returned dict to the selected scraper module.
Header: profile_dir and data_dir Variables
Define two convenience variables near the top of your config file. They keep every output_directory and profile_dir value consistent and easy to update in one place:
profile_dir— a base directory for Chrome user-data directories. Each scraper that needs a persistent session gets its own subdirectory (e.g.,os.path.join(profile_dir, 'mint')).data_dir— the root of your financial data tree. Append an institution-specific subdirectory for eachoutput_directory.
Common Dict Keys
The following keys are recognised by finance-dl itself and passed through to every scraper.Python module name of the scraper to use (e.g.,
'finance_dl.ofx', 'finance_dl.amazon'). This key is consumed by the CLI before the dict is forwarded to the module; the scraper never sees it.Local filesystem path where downloaded files will be saved. The directory is created automatically if it does not exist. Use
os.path.join(data_dir, '<institution>') to keep paths relative to your data_dir variable.A dict containing authentication material for the scraper. Most scrapers expect
username and password keys. Some use different keys — for example, finance_dl.waveapps expects token and finance_dl.gemini expects api_key/api_secret. Refer to the individual scraper’s documentation for the exact keys required.Path to a persistent Chrome user-data directory. When set, Chrome loads and saves cookies, local storage, and cached credentials across runs. This is especially useful for scrapers that use multi-factor authentication, as you only need to complete the MFA challenge once.
Whether to run Chrome in headless (windowless) mode. Defaults to
True for all Selenium-based scrapers. Set to False for scrapers that require manual interaction (such as finance_dl.anthem) or when you want to watch the browser while debugging.Example: OFX-Based Scraper
OFX scrapers communicate directly with your institution’s server using the OFX protocol — no browser is involved. Instead of acredentials dict, they take an ofx_params dict:
id, org, and url values for your institution, search the OFX Home directory.
Example: Selenium-Based Scraper
Selenium-based scrapers drive a real Chrome browser to log in and download data. Most accept the standardcredentials, output_directory, profile_dir, and headless keys:
Example: Scraper with Non-Standard Credentials
Some scrapers use API tokens instead of a username/password pair:Example: Forcing a Visible Browser
A small number of scrapers — such asfinance_dl.anthem and finance_dl.stockplanconnect — require a visible browser window to complete their login flow reliably. Set headless=False in those entries: