Topic: Charles Schwab&Co., INC
From the GNUcash site, this gets my brokerage accounts:
FID: 5104
ORG: ISC
Broker ID: Schwab.com
URL: https://ofx.schwab.com/cgi_dev/ofx_server
You are not logged in. Please login or register.
OFX Home Forum → Institution Comments → Charles Schwab&Co., INC
From the GNUcash site, this gets my brokerage accounts:
FID: 5104
ORG: ISC
Broker ID: Schwab.com
URL: https://ofx.schwab.com/cgi_dev/ofx_server
When setting up with PocketSense, I successfully used the following:
SiteName : Schwab Brokerage (use whatever you like here)
AcctType : INVSTMT
fiorg : ISC
fid : 5104
url : https://ofx.schwab.com/cgi_dev/ofx_server
bankid :
brokerid : SCHWAB.COM
appid :
appver :
mininterval:
I entered by account number exactly as seen on the website, like: 1234-5678
It took my username & password exactly as I use logging into the account website.
My Schwab OFX download stopped working a few weeks ago, producing a generic error message. Today I spoke with Schwab technical support and they said that, although they no longer currently support MS Money, they did recently change their systems and how they work with Quicken. One problem they have been having since the change was that people with dashes in their account setup in Quicken were having download problems. I did have dashes in my PocketSense account setup for Schwab (as in, account number 1234-5678), so I removed the dashes and - viola! - it works again.
Thanks very much for this post! My Pocketsense downloads from Schwab Brokerage have also been failing and removing the dashes from the account numbers (using Setup.pyc) has everything working again.
This stopped working for me in August, 2013. A call to Schwab said nothing had changed. Schwab bank OFX continued to work fine (different URL, FID, and ORG), but none of my brokerage accounts (the IRA account has never worked).
Yesterday I canned Schwab again, and while the Customer Service rep didn't know much about OFX and even less about GNUcash, he fired up Quicken and turned on logging. From that he captured 8888 as the FID.
I changed the 5104 to 8888 and presto! I can access my brokerage accounts again!
My connection to Schwab OFX is no longer working as of 8/16/17. Requests to the ofx server are timing out. Using the following configurations:
FI ID: 5104
FI URL: https://ofx.schwab.com/cgi_dev/ofx_server
Broker ID: SCHWAB.COM
Unclear if something as changed on Schwab's side that is not reflected yet on OFX Home.
A Schwab tech rep informed me that Schwab is no longer supporting "third parties" retrieving their OFX data and are limited to supporting Turbotax, H&R, and Quicken. His comments suggested that they have implemented IP whitelisting to limit who can access the data.
Haven't been able to download transactions since last month. Before that everything was working fine. According to the profile on this site the connections was tested and found to be working. So, why can't I access my data?
Per the thread about Charles Schwab Bank, removing the User-Agent from requests makes OFX download work normally.
I'm able to get profile and even account info from Schwab: <PROFMSGSRQV1> and <ACCTINFOTRNRQ> both work, and I am able to get a listing of all my accounts with their account numbers.
But I haven't been able to get statements or any further details from the actual investment accounts. I'm using the example format from page 491 of the OFX 2.2 specification. I'm using the same headers and <SIGNONMSGSRQV1> as I am with my other working requests, but I the moment I try to get statements I get a code 2000 OFX reply:
<MESSAGE>Account information may contain bad or invalid characters such as spaces.</MESSAGE>
Any help would be greatly appreciated. My request body is below, sans redacted personal info. I'm performing these requests using Postman.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?OFX OFXHEADER="200" VERSION="220" SECURITY="NONE" OLDFILEUID="NONE" NEWFILEUID="NONE"?>
<OFX>
<SIGNONMSGSRQV1>
<SONRQ>
<DTCLIENT>20190817160231.968[0:GMT]</DTCLIENT>
<USERID> </USERID>
<USERPASS> </USERPASS>
<LANGUAGE>ENG</LANGUAGE>
<FI>
<ORG>ISC</ORG>
<FID>5104</FID>
</FI>
<APPID>QWIN</APPID>
<APPVER>2700</APPVER>
</SONRQ>
</SIGNONMSGSRQV1>
<INVSTMTMSGSRQV1>
<INVSTMTTRNRQ>
<TRNUID>4a07e322-8a4e-49f5-9213-021a0c4428a7</TRNUID>
<INVSTMTRQ>
<INVACCTFROM>
<BROKERID>SCHWAB.COM</BROKERID>
<ACCTID> </ACCTID>
</INVACCTFROM>
<INCTRAN>
<DTSTART>20190701000000</DTSTART>
<INCLUDE>Y</INCLUDE>
</INCTRAN>
<INCPOS>
<INCLUDE>Y</INCLUDE>
</INCPOS>
<INCBAL>Y</INCBAL>
</INVSTMTRQ>
</INVSTMTTRNRQ>
</INVSTMTMSGSRQV1>
</OFX>
I was able to get transactions with:
ofxget stmt schwab
with the following configuration (as a section in ~/.config/ofxtools/ofxget.cfg):
[schwab]
url = https://ofx.schwab.com/cgi_dev/ofx_server
org = ICS
fid = 5401
brokerid = SCHWAB.COM
investment = <account number>
version = 102
appid = QWIN
appver = 2200
user = <user name>
Note that when I attempt to retrieve transactions from GnuCash, I get the same error as you do. We need to inspect what is the exact request sent by ofxget and how it differs from yours/GnuCash.
(Posting separately because the forum doesn't allow multiple urls per post)
Interestingly, the Schwab non-investment checking account returns transactions given the following configuration:
[schwab-bank]
url = https://ofx.schwab.com/bankcgi_dev/ofx_server
bankid = 121202211
brokerid = SCHWAB.COM
checking = <account number>
version = 102
appid = QWIN
appver = 2200
user = <user name>
Note the URL is different from the investment account config.
Ah-ha! I modified ofxtools to print requests before sending them and saw that it was sending the following:
OFXHEADER:100
DATA:OFXSGML
VERSION:102
SECURITY:NONE
ENCODING:USASCII
CHARSET:NONE
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:58d6fc0c-8348-416a-9957-000000000000
<OFX>
<SIGNONMSGSRQV1>
<SONRQ>
<DTCLIENT>20190821215521.990[0:GMT]</DTCLIENT>
<USERID>username</USERID>
<USERPASS>userpass</USERPASS>
<LANGUAGE>ENG</LANGUAGE>
<FI>
<ORG>ICS</ORG>
<FID>5401</FID>
</FI>
<APPID>QWIN</APPID>
<APPVER>2200</APPVER>
</SONRQ>
</SIGNONMSGSRQV1>
<INVSTMTMSGSRQV1>
<INVSTMTTRNRQ>
<TRNUID>a1479f21-4ae0-4c32-9c08-000000000000</TRNUID>
<INVSTMTRQ>
<INVACCTFROM>
<BROKERID>SCHWAB.COM</BROKERID>
<ACCTID>00001111</ACCTID>
</INVACCTFROM>
<INCTRAN>
<INCLUDE>Y</INCLUDE>
</INCTRAN>
<INCOO>N</INCOO>
<INCPOS>
<INCLUDE>Y</INCLUDE>
</INCPOS>
<INCBAL>Y</INCBAL>
</INVSTMTRQ>
</INVSTMTTRNRQ>
</INVSTMTMSGSRQV1>
</OFX>
Using this request does work! Looks to me (having only started in OFX this week, so taken with a grain of salt) like it's just indicating an older OFXHEADER and OFX VERSION. Be curious to know if GnuCash is trying to use 200/220 for the header/version.
By default GnuCash uses OFXHEADER 102, at least v3.6 for me.
So you are able to get Schwab Brokerage statement data through ofxtools, but what about directly from GnuCash?
EDIT.
I think the header version is a red herring.
Here is the request GnuCash sends for me right now, pulled from /tmp/ofx.log
OFXHEADER:100
DATA:OFXSGML
VERSION:220
SECURITY:NONE
ENCODING:USASCII
CHARSET:1252
COMPRESSION:NONE
OLDFILEUID:NONE
NEWFILEUID:20190821160519.000
<OFX><SIGNONMSGSRQV1><SONRQ><DTCLIENT>20190821160519.000<USERID>username
<USERPASS>password
<LANGUAGE>ENG<FI><ORG>ISC<FID>5104</FI><APPID>QWIN<APPVER>2700</SONRQ></SIGNONMSGSRQV1><INVSTMTMSGSRQV1><INVSTMTTRNRQ><TRNUID>20190821160519.000<CLTCOOKIE>1<INVSTMTRQ><INVACCTFROM><ACCTID>account number</INVACCTFROM><INCTRAN><INCLUDE>N</INCTRAN><INCOO>Y<INCPOS></INCPOS><INCBAL>Y</INVSTMTRQ></INVSTMTTRNRQ></INVSTMTMSGSRQV1></OFX>
I get the same error message as you, about invalid characters such as spaces. But when I compared with the ofxget request, I noticed I was missing the field
<BROKERID>SCHWAB.COM</BROKERID>
.
After adding SCHWAB.COM to appropriate BrokerId field in AqBanking user config, now GnuCash pulls data correctly.
OFX Home Forum → Institution Comments → Charles Schwab&Co., INC
Powered by PunBB, supported by Informer Technologies, Inc.