-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schwab support broken #93
Comments
HTTP 403 is kind of a bitch! This isn't coming from my code, but from Schwab's server. Most likely is that they've upgraded their OFX server (provided by a 3rd party vendor e.g. FiServ), which is now being stricter about detected clients allowed from some whitelist. The name of the game is to spoof Quicken. The easiest thing to do is to modify Another possibility (perhaps more likely, b/c the server threw an HTTP error not an OFX error) is that the server is checking the HTTP It is annoying. A couple other FIs that used to work (Vanguard for one) have recently started exhibiting this kind of behavior. |
I was optimistic about trying to figure out the Digging a bit more over the week, it looks like Schwab is using an OAuth framework now and asking developers to register. Lastly, there appear to be other OFX users left out from the changes and there was some notice to the YNAB developers. Is there any indication vanguard is doing something similar? |
I believe Schwab's OAuth framework is unrelated to this issue - it's aimed at the plethora of services like Plaid or YNAB who don't authenticate through OFX. They're saying "For the love of God stop roboscraping our website; let's set up proper API access". Quicken, which has a near-monopoly on the OFX interface, does not use OAuth at all. My goal for ofxtools is that, if Quicken can get download data through an OFX interface, then we should be able to as well. I don't know about Schwab; I don't have data.... but ofxtools users have provided Quicken logs of successful OFX profile requests to Vanguard. I match the same request, and it fails. If you look at the OFX spec, really the only place to discriminate is in the HTTP wrapper. Apparently Vanguard at least is starting to do that; Schwab may be the same. This would be explained by, for instance, a 3rd-party vendor like FiServ pushing an OFX server upgrade that got picked up by both brokers. HTTP wrapper isn't captured by Quicken logs, unfortunately. It will be necessary to have a host with Quicken installed, configure its internet access through a proxy, then MITM the proxy to dump the HTTP request. I would be very interested to see the HTTP headers sent by Quicken. I set ofxtools |
I'm having the same problem with American Express (403 Forbidden). It started happening around Nov 14th 2020. I can't find any information on their site about a change. |
This issue has some information about Amex. If I patch Unfortunately, this doesn't seem to work for Schwab. |
Discussion of Amex problems & fixes split off into a separate issue. Still not sure what the hell is up with Chucky Schwab. |
On a related note, Schwab OFX download has stopped working in other budgeting apps. I opened a support request with one particular app, and received this response:
And so here I am, trying to see if I can use |
Has Schwab turned off Quicken downloads? I'm not concerned about Yodlee or the like. I am just interested in piling up 3 monkeys in a trenchcoat & passing them off as Quicken. I'm looking for confirmation that Quicken can connect to Schwab, but ofxtools cannot. |
I can download Quicken to try… and maybe I can put wireshark or mitmproxy in there to see what requests Quicken is making if it works |
Quicken's new owners are all about those subscriptions... they've disabled OFX download capability for older (purchased rather than rented) versions of Quicken. They do have a 30-day money back guarantee, but still... If you do ascend into a dudgeon sufficient to motivate you to MITM a copy of Quicken, drop me a line! Or if you talk to any Quicken users who are currenty using Direct Connect to import their Schwab transactions, I'd be interested to know about that as well. But it's not all that bad to download OFX data manually from FI websites. I mean, you pretty much have to go there anyway to download statement PDFs. |
I did confirm that Quicken can download Schwab statements. (30-day money-back, here I come). I captured some packets, and it seems like Quicken first connects service.quicken.com and then to ofx.schwab.com, then back to service.quicken.com. I need to dig further, but I'm wondering if it's doing an OAuth connection? I was thinking I could do a mitm, but given this is all TLS traffic, I don't think I can?
Unfortunately, Schwab doesn't provide OFX downloads from their website. 🤦♂️ |
The dudgeon rises! Good on ya. Before going too far down the rabbit hole, it's worth getting Quicken logs (I think available under the Failing that...
You can; at least one ofxtools user has already done so. The transport-layer encryption will prevent you from snooping the packets with e.g wireshark. What you need to do is to set up a proxy such as mitmproxy on another host, and then set the IP configs for the host running Quicken to access the internet via that proxy. If you don't have a bunch of machines lying around, you can:
|
CharlesProxy may be a little more user-friendly than mitmproxy - I've used it for mobile apps in the past - it has a gui, can install locally on win/mac/linux, and can proxy and inspect http/s traffic. Looking forward to seeing this dismantled. |
Ok, so I got CharlesProxy working… Here's the interesting thing. Quicken makes a request to ofx.schwab.com, which 403s. It then seems to do all of its OFX requests to services.quicken.com. |
"OFX Secure Plus"... public key management system... just ducky. What exactly is being POSTed to services.quicken.com/ofx-secure-plus/10655 either time? Let me guess... encrypted alphabet soup. Is there anywhere where the proxy can snoop an |
Here are some people on the Quicken forum struggling with a similar issue for Vanguard. N.B. this is not at all how we recently restored connectivity to Vanguard. |
Both requests have a Bearer token and the following User-Agent.
If I'm reading this correct, here's the payload of the requests (not the responses):
The second:
|
OK, thanks. So at least it's not e2e encrypted. Bad news is (a) it is indeed an OAuth type protocol at work here, as people were trying to tell me above, and (b) the server request/response is proxied through Quicken itself. This ain't gonna work, is it? At the end of the day, I really can only maintain an Open Financial Exchange protocol library. I'm sure I'm an outlier, but I have in fact had quality of data downloads factor largely in my decision to switch financial institutions. TD Ameritrade doesn't do any of this horseshit, but still stands up an entirely reasonable liability limitation. Interactive Brokers offers much higher quality data downloads in a proper XML format... I've in fact written a Python library for that too, you may be unsurprised to learn. I know it's not a satisfactory response to your entirely admirable efforts here, but I've just become less & less willing to pay FIs who offer crappy service. Anybody got any bright ideas here? |
It seems that way. I don't blame you! Thank you for the help and consideration.
I did the same thing recently, and unfortunately had the rug pulled out from me again, this time by Schwab. Thanks again for all the work on this! |
Don't throw the baby out with the bathwater. There are many more significant reasons to pick a brokerage than OFX access and I suspect many other companies will be following or carving out a more convoluted route. I certainly don't have any level of trust for quicken or the other proxies so I'm quite keen on figuring out what can be done. With the 403, it's possible there might still be a whitelist possibility if their support doesn't deflect directly to the api service. Schwab's notices imply that there's a more granular access control within the account settings but I can't find anything new on the internal side and the security settings still have OFX access enabled/disabled. For Oauth, I would expect some kind of web-self service access since they imply you don't have to give the 3rd parties access to your account anymore (which doesn't exactly seem true from the above). |
@q0rban - since you've gone to the trouble to hax0r Quicken, I don't suppose you're interested in extracting a bit more value from your free trial? I don't know if it's feasible, but the database of FI connection information (originally sourced from MS Money) could really use a refresh. @skontrolle - if you need to book lots of transactions every month, it might change your perspective on the relative importance of data downloads. You might even wind up spending many years building a software library or two to help extract this particular baby from the bathwater... Just to reiterate, though... the core purpose of the But it really needs to be in the OFX specification, or immediately spec-adjacent. If Quicken has decided to cement their monopoly by wrapping up OFX in a proprietary transport layer, and your service providers are buying into this scheme... y'all are gonna need to write your own library to deal with all that tasty goodness. Feel free to use |
I certainly see the value in automatically booking the transactions but their approach to transaction fees, account servicing, and having a history of these long outlive my use of gnucash and OFX. It's clearly not an |
All brokers suck in some regard; you pick your poison. I probably just have Stockholm syndrome from putting up with IBKR's concept of customer service for 20+ years. @aclindsa - I hear the roar of the masses calling out for you to inaugurate an |
Hah! I did actually manage to obtain access to the API, but now have absolutely no idea how to determine which banks implement it or how to find their URLs... Does that sound familiar? |
Do we have a critical mass to make a coordinated effort to inform Schwab (e.g. open letter, petition) that OFX support is something critical for us? We could broadcast our effort on the GnuCash Mailing List, OFX Home Forum, and YNAB Reddit and maybe get additional support. |
Does this get you what you need? https://download.fidir.intuit.com/qm2400/data/xmlonline.zip |
@q0rban Well, that's nifty! That does appear to show at least some entries for Schwab as |
That's cool! I'll have to scrutinize it in more detail, but it doesn't seem to have what we need. To make a connection, we need:
In the ZIP archive above, the list of FIs is in The Quicken FI identifier can be used to query the XML file (XPath baby!) to get Quicken's config for that FI, e.g. text to fill in GUI templates, how to handle investment income reinvestment... even instructions for how to parse stock splits. This information can be very useful for people trying to figure out e.g. they need to use their USAA member# to log on, but it doesn't give us the info we need to drop into |
Just for completeness, here is the response from Schwab:
|
Yikes. So now you have to manage to register both at https://financialdataexchange.org/ and at https://developer.schwab.com/home as a 'developer' to have any hope of getting programmatic access to your own data. I certainly don't love the current state of OFX, but it seems like it might be better than what is coming next... |
I came across this morning that Moneydance supposedly has Schwab support working again: https://infinitekind.tenderapp.com/discussions/problems/63978-moneydance-stopped-downloading-transactions-from-charles-schwab |
Ah, seems like they may be proxying the requests, and have specified their own app_id and app_ver - see https://infinitekind.com/app/md/fi2004.dict. I wonder if Schwab allowed them to register for OFX access and tie a particular IP/app_id/app_ver combination together and allowing access for it or something. |
Schwab UI allows exporting the transaction data in CSV format. Is there a script to convert a Schwab CSV file to OFX? |
I've seen several similar types of scripts written by users of GnuCash, beancount, etc. I don't conceive it as a goal of |
You could also have a look at this project. It seems to support investment transactions. |
My h4x0r skillz are insufficiently 3l337 to penetrate Schwab's puissant security countermeasures. As such I'm closing this issue INVALID. The related discussion it generated is rather interesting; if desired it may be continued off the bug tracker on the newly created Discussions page. |
It seems that the
schwab
andschwabbank
endpoints broke. My setup used to work fine. Now, when I doofxget stmt schwab
I get:I'm using Python 3 and ofxtools
0.8.22
The text was updated successfully, but these errors were encountered: