Note: There is no affiliation between the Ofx4j and Ofx4js projects.
npm install ofx4js
import * as ofx4js from 'ofx4js';
To parse an OFX response:
// aliases;// your ofx datavar ofxData = "OFXHEADER:100...";// an unmarshaller that will read responses. Note you will use a// ResponseEnvelope to read responses, and a RequestEnvelope to read// requests.var m = ResponseEnvelope;// parse the string into the ofx data structuresvar data = m;// read the datavar messageSets = data;var bankingResponse = messageSets1cast<BankingResponseMessageSet>;
To download a bank's profile information:
// aliases;// input your bank's information. Seevar bank = ;bank;bank;bank;bank;var connection = ;var service = bank connection;return service;
NOTE: making an OFX connection will fail security checks in browsers. On Chrome you can make it run with the "--disable-web-security" command-line option
e.g. (OSX): open /Applications/Google\ Chrome.app --args --disable-web-security
Presently it can parse ofx strings, create ofx requests, and contact servers. Good enough to get started, but expect bugs.
Ofx4js was ported from Ofx4j at r45 (1.7)
This is not a full port of ofx4j- specifically, the server portion is gone, as are the FinancialInstitutionDataStore-related classes. That is, you will have to provide your own financial insitution
Github push requests are welcome. Please create test cases. Bugs that are originally in Ofx4j should be contributed to that project.