Help with OFX in Gnucash

Ngewi Fet ngewif at
Tue Jul 10 03:31:47 EDT 2012

Thanks for the clarifications Dave.

On Tue, Jul 10, 2012 at 6:12 AM, David Reiser <dbreiser at> wrote:

> On Jul 9, 2012, at 6:02 PM, Ngewi Fet wrote:
> Hello everyone,
> I have a question about OFX which I am implementing for Gnucash Mobile for
> Android and
> I need help from anyone more experienced with OFX.
> I'm not sure it matters to gnucash, but your <ACCTTYPE> tags are
> misspelled.

Will fix.

> I export the transactions from the app as bank statement transactions. In
> OFX, this means the
> accounts which the user creates in the app are treated as bank accounts.
> Bank accounts
> do not have any names defined in the OFX schema, only bank ID and account
> ID. Gnucash on
> the other hand supports descriptive account names and so forth. I also see
> that there are "Cash Accounts" in Gnucash,
> but I cannot find any analogous accounts in the OFX standard. Am I missing
> something here?
> You're not missing anything. Outside of the investment account handling,
> OFX has no concept of cash accounts. There are cash withdrawals, ATM
> deposits and withdrawals, Point Of Sale debits and credits, and general
> debits and credits. OFX is constructed from the viewpoint of a customer's
> interactions with various accounts at a financial institution. So money
> either enters or leaves a given account. Gnucash has a means to let you
> specify the gnucash account that is the second split of the transaction
> reported by the bank in the OFX file, but OFX doesn't handle double entry
> transactions internally. OFX also doesn't handle split transactions at all.

Ok. Good to know.

> When importing the OFX file with transactions into Gnucash, it always asks
> you to create a new account
> into which to import the transactions. It correctly identifies that there
> are multiple accounts and requires you to create an account in Gnucash
> (or select an existing one) into which to import the transactions from the
> account for each of the accounts from the file.
> Ideally, I would like Gnucash to simply create the corresponding new
> accounts to those defined the exported OFX and import the transactions for
> each of the accounts accordingly. Is this possible?
> I don't think it is possible the way you describe it. Will any new account
> always be created at the root level of your gnucash account hierarchy? If
> not, will they always have the same parent at some other point in the tree?
> (seems unlikely to me that such an assumption would please many users). In
> any event, doing automatic account creation would require a change to
> gnucash itself.

I was thinking more of like the accounts are created at the root level.
Subsequent imports will realize that the account has the same ID and then
just import the transactions directly into that account.
But now that you mention it, I am beginning to think many-a-user will not
be happy about this. Maybe I'll just let the user specify where to put the
It will be less automatic than I hoped, but gives more control to the user.

> Does anyone know how I can best export OFX so that Gnucash automatically
> picks up both
> the accounts and the transactions within those accounts? Thanks.
> One of the problems is that OFX's notion of accounts does not include the
> concept of another account being the other half of a double entry system.
> To OFX, there is only one account at a time, and one or more transactions
> affecting that account. Transfers affect two OFX accounts at a time, but I
> don't think you want to make every transaction a transfer.
> Attached is a sample file produced by the OFX exporter at the moment.
> Cheers,
> Ngewi
> <20120709_2221_gnucash_all.ofx>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at
> One other thing to consider is that once you've assigned an FITID, a
> gnucash user won't be able to use a download from their bank to
> clear/reconcile transactions in the desktop file. Since an FITID exists,
> and download from a bank results in those transactions being duplicated in
> gnucash because they'll certainly have different FITIDs from the bank than
> they will from your app.

So will it be better if I eliminate the transaction IDs (FITID) in order to
allow for reconciling transactions in Gnucash with other external accounts?
This will make the OFX produced invalid, though, as I think an FITID tag is
I guess the bigger question is how many people will use it like this, so
the decision becomes a trade-off between validity and practicality.

> Dave
> --
> Dave Reiser
> dbreiser at

More information about the gnucash-devel mailing list