ofxclient: Cannot download Chase OFX

When trying to download from Chase with the following config:

[f0a14074d33cdf83b4a099bc322dbe2fe19680ca1719425b33de5022] account_type = CHECKING description = Checking institution.broker_id = institution.client_args.app_id = QWIN institution.client_args.app_version = 2200 institution.client_args.id = 4fa6f700154f49543b869492f99c883f institution.client_args.ofx_version = 103 institution.description = Chase institution.id = 10898 institution.local_id = e51fb78f88580a1c2e3bb65bd59495384383e58abda8796c9bf06dcf institution.org = B1 institution.password = <password> institution.url = https://ofx.chase.com institution.username = <username> local_id = f0a14074d33cdf83b4a099bc322dbe2fe19680ca1719425b33de5022 number = XXXXXXXXX routing_number = XXXXXXXXX

After sending the request(It prints out in verbose mode), I receive this:

Traceback (most recent call last):
File "/usr/local/bin/ofxclient", line 11, in <module>
  sys.exit(run())
File "/usr/local/lib/python3.5/site-packages/ofxclient/cli.py", line 52, in run
  main_menu()
File "/usr/local/lib/python3.5/site-packages/ofxclient/cli.py", line 87, in main_menu
  view_account_menu(account)
File "/usr/local/lib/python3.5/site-packages/ofxclient/cli.py", line 160, in view_account_menu
  out = account.download(days=DOWNLOAD_DAYS)
File "/usr/local/lib/python3.5/site-packages/ofxclient/account.py", line 102, in download
  response = self.institution.client().post(query)
File "/usr/local/lib/python3.5/site-packages/ofxclient/client.py", line 110, in post
  response = res.read().decode('ascii')
 UnicodeDecodeError: 'ascii' codec can't decode byte 0x92 in position 337: ordinal not in range(128)```

About this issue

  • Original URL
  • State: open
  • Created 8 years ago
  • Comments: 22 (7 by maintainers)

Most upvoted comments

I was able to set up ofxclient and download checking and credit card OFX data from Chase today. Documenting here in case it is helpful for anyone else.

I did not need to do anything special with UIDs as was described above. Perhaps these workarounds have now been merged into the project, or perhaps Chase is now more lenient.

Here are the exact steps I followed:

  1. Install latest ofxclient
mkvirtualenv -p python3 ofx
pip install git+https://github.com/captin411/ofxclient.git@master
  1. Log in to chase.com, go to settings, go to “Desktop apps”, and enable access for apps like Quicken or QuickBooks

  2. Run ofxclient --ofx-version 103

  3. Add account, bank name “Chase (credit card)”. Use this even for checking/savings accounts. The other choices for Chase use oasis.cfree.com, which I have never heard of. Possibly an old endpoint, or possibly a scam, who knows?

  4. Enter your chase.com username and password. You’ll see the message

authentication failed: Please verify your identity within the next 7 days. Using your desktop computer, go to your banks website and visit the Secure Message Center for instructions.
  1. Do that. Log in to chase.com, look for a message in the Secure Message Center, and follow the instructions to approve access.

  2. Repeat steps 3 - 5. This time, it should succeed, and you will be able to download OFX files for each of your accounts.

  3. For subsequent downloads, you can simply run ofxclient. The OFX version setting is stored in your ofxclient.ini.

You can also run ofxclient --download-days 365 to get more than 30 days. (It does appear Chase limits how far back you can request data, but I haven’t discerned the pattern.)

It appears the default behavior is to change the CLIENTUID for each invocation of the username/password prompt, even within the same ofxclient session. The solution is to set the CLIENTUID once before the loop so it stays the same within the session.

cli.py

from ofxclient.client import ofx_uid

...

def login_check_menu(bank_info):
    ...
    cid = ofx_uid()

    while 1:
        ...
        institution = Institution(
            ...
            client_args={'ofx_version': args.ofx_version, 'id': cid}
        )

    ...

Once I did this (and after setting the ofx version to 103), my Chase account successfully validated.

I’ve successfully passed this step by modifying the ofx_version as suggested to ‘103’. Then do the request which you will get

authentication failed: Please verify your identity within the next 7 days. Using your desktop computer, go to your banks website and visit the Secure Message Center for instructions.

While still in the “add bank”, go to bank to verify the code, then go back to adding screen and type the username/password again. Make sure to not quit your ‘ofxclient’ during this session.

Here’s a working screen for Chase

bank name eg. "express" (enter to exit)> chase
(0) Chase (credit card)
(1) JPMorgan Chase Bank
(2) JPMorgan Chase Bank (Texas)
choice> 0
------
Notice
------
You are about to test to make sure your username and password
are correct.  This means you will be sending it to the URL below.
If the URL does not appear to belong to your bank then you should
exit this program by hitting CTRL-C.
  bank name: Chase (credit card)
  bank url:  https://ofx.chase.com
------
username> <username redact>
password>
authentication failed: Please verify your identity within the next 7 days. Using your desktop computer, go to your banks website and visit the Secure Message Center for instructions.
username> <username redact>
password>

Main
Edit /Users/bao/ofxclient.ini to
change descriptions or ofx options
+----------------------------------
(0) Bank <redact>
(1) Bank <redact>
(2) Bank <redact>
(3) Chase (credit card) : CREDIT CARD
(A) Add an account
(D) Download all combined
(Q) Quit