Open your .env file and add:
# Chase Trading Account Credentials
CHASE_USERNAME=your_chase_username
CHASE_PASSWORD=your_chase_password- Never commit
.envfile to git - Keep credentials secure
- Use your Chase.com login credentials
python test_chase_integration.pyWhat will happen:
- ✅ Script will authenticate with Chase
- 🌐 A browser window will open (Chromium)
- 📱 You may need to complete MFA (text/email code)
- 📊 Script will fetch your portfolio holdings
- 💰 Script will fetch real-time quotes
- 💾 Results will be saved to JSON files
- A Chromium browser window will open
- You'll see the Chase login page
- The browser must stay open during the session
- DO NOT close the browser manually
If Chase prompts for MFA:
- Check your phone for text message
- Check your email for code
- Enter the code in the browser
- Script will continue automatically
You'll see detailed output like:
================================================================================
CHASE INTEGRATION TEST
================================================================================
✓ Username: your_username
✓ Password: **********
--------------------------------------------------------------------------------
STEP 1: Authenticating with Chase...
--------------------------------------------------------------------------------
⚠️ A browser window will open for authentication
⚠️ You may need to complete MFA (text/email code)
⚠️ The browser must stay open during the session
✅ Authentication successful!
--------------------------------------------------------------------------------
STEP 2: Fetching Portfolio Holdings...
--------------------------------------------------------------------------------
✓ Found 1 account(s)
================================================================================
ACCOUNT 1: Individual Brokerage
================================================================================
Account ID: 123456789
Type: BROKERAGE
Holdings (3 positions):
----------------------------------------------------------------------------
📊 NVDA - NVIDIA CORP
Type: EQUITY
Quantity: 201
Market Value: $35,175.00
📊 AAPL - APPLE INC
Type: EQUITY
Quantity: 50
Market Value: $8,750.00
📊 NVDA250117C00175000 - NVIDIA CALL OPTION
Type: OPTION
Quantity: 2
Market Value: $550.00
================================================================================
TOTAL HOLDINGS: 3 positions across 1 account(s)
================================================================================
--------------------------------------------------------------------------------
STEP 3: Fetching Real-Time Quotes...
--------------------------------------------------------------------------------
Fetching quote for NVDA...
✓ NVDA:
Last: $175.00
Bid: $174.95
Ask: $175.05
Volume: 45,234,567
...
================================================================================
TEST COMPLETE!
================================================================================
✅ Successfully authenticated with Chase
✅ Fetched 3 positions
✅ Fetched 3 quotes
📁 Results saved to:
- chase_holdings_20251012_105324.json
- chase_quotes_20251012_105324.json
🎯 Next Steps:
1. Review the saved JSON files
2. Check if options positions are included
3. Verify pricing data accuracy
4. Integrate with recommendation engine
================================================================================
Contains your portfolio positions:
[
{
"account_id": "123456789",
"account_name": "Individual Brokerage",
"symbol": "NVDA",
"name": "NVIDIA CORP",
"quantity": 201,
"asset_type": "EQUITY",
"market_value": 35175.00,
"raw_data": { ... }
},
{
"account_id": "123456789",
"account_name": "Individual Brokerage",
"symbol": "NVDA250117C00175000",
"name": "NVIDIA CALL OPTION",
"quantity": 2,
"asset_type": "OPTION",
"market_value": 550.00,
"raw_data": { ... }
}
]Contains real-time pricing:
{
"NVDA": {
"lastPrice": 175.00,
"bid": 174.95,
"ask": 175.05,
"volume": 45234567,
"change": 2.50,
"changePercent": 1.45
}
}- Authentication: Can we log in to Chase?
- Portfolio Access: Can we fetch your positions?
- Options Support: Are options included in holdings?
- Pricing Data: Can we get real-time quotes?
- Data Quality: Is the data accurate and complete?
Solution:
# Reinstall Playwright browsers
python -m playwright install chromiumPossible causes:
- Wrong username/password
- MFA not completed
- Chase blocking automated access
- Browser closed too early
Solution:
- Double-check credentials in
.env - Complete MFA when prompted
- Keep browser open
- Try again in a few minutes
Possible causes:
- Account has no positions
- Wrong account type
- API doesn't support this account
Solution:
- Check your Chase account online
- Verify you have positions
- Check account type (must be brokerage)
Expected: chaseinvest-api doesn't fully support options yet (it's in their TODO)
Workaround:
- We'll see what data is available
- May need to use yfinance for options pricing
- Can still sync stock positions from Chase
Solution:
- Script limits to 5 quotes at a time
- Wait a few minutes between runs
- Don't run too frequently
✅ Test is successful if:
- Authentication works (browser opens, login succeeds)
- Holdings are fetched (at least your stock positions)
- Quotes are retrieved (real-time pricing)
- JSON files are created with valid data
- Authentication works but options not included
- Holdings fetched but some quotes fail
- Data is incomplete but usable
❌ Test fails if:
- Cannot authenticate
- No holdings retrieved
- Browser crashes
- Errors prevent completion
- Open the JSON files
- Check if your positions match Chase.com
- Verify pricing is accurate
- Note any missing data (especially options)
Let me know:
- ✅ Did authentication work?
- ✅ Were all positions fetched?
- ✅ Are options included?
- ✅ Is pricing accurate?
- ❌ Any errors or issues?
Based on results, we'll:
- If successful: Build the Chase integration service
- If partial: Work around limitations (e.g., use yfinance for options)
- If failed: Troubleshoot or consider alternative approaches
- Credentials: Stored only in
.envfile (not committed to git) - Session: Browser session is temporary (closes after script)
- Data: Saved locally, never sent to third parties
- API: Unofficial API, use at your own risk
- chaseinvest-api GitHub: https://github.com/MaxxRK/chaseinvest-api
- Documentation: Check the repo for latest updates
- Issues: Report problems on GitHub
Ready to test? Run the script and let me know what happens! 🚀