Can't download TD Ameritrade transactions

Steve Kelem steve at kelem.net
Thu Mar 10 01:27:21 EST 2016


   When trying to get the transactions for my TD Ameritrade account, the
   OFX window complains about a Bad Request and an (unknown) error parsing
   the server response.
   Is there a way to see what is being sent to the TD Ameritrade server
   and what the response is from the server? I've shown complete details
   of what I'm doing below, but the info needed to debug this problem
   doesn't appear in the log windows or the ofx log. Is there a way to
   enable more detailed logging to debug this?
   I've tried the FID 5024 that AqBanking provides for TD Ameritrade, and
   the FID 7768 (that Quicken uses successfully). Neither works.
   Process:
     * Select Menu item Tools/Online Banking Setup
     * AqBanking Initial Assistant window opens. Click on Forward.
     * Click on Start AqBanking Wizard.
     * In the AqBanking Setup Users tab, select the user, then click on
       Edit User.
     * OFX DirectConnect User Setup window opens.

     * Fill out User Name, User Id=TD Ameritrade UserId. Client
       UID=account # without any dashes.

     Select the Bank Settings tab.
     * Bank Name=TD Ameritrade
     * Broker Id= (empty)
     * FID=7768
     * ORG=ameritrade.com
     * Server URL=[1]https://ofxs.ameritrade.com/cgi-bin/apps/OFX

     Click on Retrieve Account List. I get:
     * 21:22:29 Sending request...
       21:22:29 Using old SSL preparation code.
       21:22:29 TLS: SSL-Ciphers negotiated: TLS1.2:RSA-AES-256-GCM:AEAD
       21:22:29 Waiting for response...
       21:22:30 Parsing response...
       21:22:30 Parsing response
       21:22:30 Status for signon request: Success (Code 0, severity
       "INFO")
       The server successfully processed the request.
       21:22:30 Status for account info request: Success (Code 0, severity
       "INFO")
       The server successfully processed the request.
       21:22:30 Operation finished, you can now close this window.

     Close the AqBanking Setup window.

     In the AqBanking Initial Assistant window (whose banner says Start
   Online Banking Wizard), click on Forward.

     Match Online accounts with GnuCash accounts.

     Click on Forward.

     "Online Banking Setup Finished" is displayed. Click on Apply.
   Eventually (Mine takes 1.5 minutes!) GnuCash becomes usable again.

     Open a tab for the account associated with the online account just
   set up.

     Select Menu item Actions/Online Actions/Get Transactions.

     The Get Transactions Online window opens.

     I select "Earliest possible date" (because I've never been able to
   download anything) to Now.

     The Online Banking Connection Window then shows the progress, while a
   new window hidden by this window asks for the password. After entering
   the same password as before, the Log Messages show:
AqBanking v5.6.1.0beta
Sending jobs to the bank(s)
Locking user <user>
Saving communication log to /tmp/ofx.log
Sending request...
Connecting to server...
Resolving hostname "ofxs.ameritrade.com" ...
IP address is "216.105.251.212"
Connecting to "ofxs.ameritrade.com"
Connected to "ofxs.ameritrade.com"
Using old SSL preparation code.
TLS: SSL-Ciphers negotiated: TLS1.2:RSA-AES-256-GCM:AEAD
Connected.
Sending message...
Message sent.
Waiting for response...
Receiving response...
HTTP-Status: 400 (Bad Request)
Error parsing server response
Unlocking user <user>
Postprocessing jobs
Job Get Transactions: finished
Resetting provider queues

     A new status window pops up to report: "The Online Banking import
   returned no transactions for the selected time period."
The ofx.log file (sanitized) shows:
Sending:
-------------------------------------
OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20160309015923.000
<OFX><SIGNONMSGSRQV1><SONRQ><DTCLIENT>20160309015923.000<USERID>******
<USERPASS>******
<LANGUAGE>ENG<FI><ORG>ameritrade.com<FID>7768</FI><APPID>QWIN<APPVER>2200</SONRQ
></SIGNONMSGSRQV1><INVSTMTMSGSRQV1><INVSTMTTRNRQ><TRNUID>20160309015923.000<CLTC
OOKIE>1<INVSTMTRQ><INVACCTFROM><ACCTID>*******</INVACCTFROM><INCTRAN><DTEND>2016
0309<INCLUDE>Y</INCTRAN><INCOO>Y<INCPOS><DTASOF>20160309015923.000<INCLUDE>Y</IN
CPOS><INCBAL>Y</INVSTMTRQ></INVSTMTTRNRQ></INVSTMTMSGSRQV1></OFX>

   Thanks for any help you can give.
   Steve

References

   1. https://ofxs.ameritrade.com/cgi-bin/apps/OFX


More information about the gnucash-user mailing list