Hi there,
Is it possible to use the internal Java API (such as OFXParser or OFXFileImporter) to programmatically parse an OFX file into a detached, temporary TxnSet without any side effects? I need to parse an OFX file in the background purely to read the transactions for analysis, after which the parsed data will simply be discarded. I want to make sure it won't made any ledger changes and i can safely use
Thoughts? Tips?
OFXParser
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
#1 Posted by Stuart Beesley ... on 14 Sep, 2026 06:06 AM
You don’t say whether you know how to code in Java or whether you generally understand then Moneydance API?
OFXParser is probably not bundled as part of the devkit API. However, it is accessible. You would have to compile against the full moneydance jar. The risk with using it is that it’s liable to change between MD versions. Example:
Similar answer for OFXFileImporter but I suspect that is more complex as you want your own TxnSet.
I think what I would say is understand how to manipulate a TxnSet and create txns first before playing with the ofx bit.
#2 Posted by Sean Reilly Support staff on 17 Sep, 2026 08:01 AM
Stuart has the right idea if you want to parse the OFX into a data structure with OFX tags.
If you would like to go a bit further, you can parse them into OnlineTxn objects in an OnlineTxnList which is how Moneydance represents downloaded transactions that haven't yet been processed (aka "merged") into real transactions that affect your balance. This would be quite a bit trickier, and would require creating objects object that implement the
OnlineBankingUIand OnlineAccountProxy interfaces. OnlineBankingUI is not a published interface, but you can find it in the moneydance.jar file, and then override the getDownloadedTxns() method to return your own OnlineTxnList that wasn't linked to any actual account in your moneydance file. I think it should be do-able, but will be messy.Thanks,
Sean
--
Sean Reilly
Developer, The Infinite Kind
https://infinitekind.com
#3 Posted by J C on 19 Sep, 2026 02:34 AM
Thanks to both of you for the reply. It doesn't sound like OFXParser is
what I'm looking for. I can just handle my needs outside of that.
Jim
On Thu, Sep 17, 2026 at 4:01 AM Sean Reilly <[email blocked]>
wrote: