How to move Mint transaction data to GnuCash

Online financial aggregators are great for getting transactions from all of your accounts into one place, but the accounting tools they provide are pretty minimal. I'm a Mint user, and I like the idea of letting Mint manage the connection to my bank, but I need to get the data into a real accounting package: GnuCash.

Mint provides the data in CSV format. So far I have been able to convert that data into QIF. The file format for QIF was simple enough that I was able to write my own conversion tool.

However, with QIF I can only import data from one account at a time. Ideally I would like to be able to download transactions from all of my accounts at once. Here's a sample of Mint data with a few accounts in it:

Date,Description,Original Description,Amount,Transaction Type,Category,Account Name,Labels,Notes
3/29/2014,BART,BART-POWELL QPS 5104646979 CA 94102 US C_OTHERTRAVEL,20,debit,Public Transportation,CapitolOne Visa,,
3/28/2014,Student Loan Payment,MY STUDENT LOAN LENDER,40,debit,Student Loan,Checking,,
3/28/2014,Check 995525,Check Paid #995525,64,debit,Check,Checking,,
3/28/2014,Mortgage,MY MORTGAGE COMPANY,1.95,debit,Credit Card Payment,OtherChecking,,
3/28/2014,Paycheck,MY EMPLOYER,1,000,000.00,credit,Paycheck,Checking,,

It would be nice if I could take this file and process it once and output a file that GnuCash could then import into the correct accounts. I was working with an OFX converter, but I'm not clear that OFX can combine data from multiple accounts into a single file due to the requirement to have a ledger balance line.

Is this a reasonable way to try to move data from Mint to GnuCash?


I've written up a Python suite called csv2cash that will take the csv that comes out of Mint and put it into GNUCash. It's setup so that it can be easily rerun several times without much user input.

The other big thing that this does that I haven't seen implemented is it will attempt to resolve accounts transfers between your bank accounts. For example, if your bank does automatic transfers from your savings to your checking account, a simple CSV import won't pick up on this and will create two separate transactions. csv2cash will actually look at transfers with the same value, figure out if there are any matching transfers that also go to the users bank accounts, and then combines them together into a single GNUCash transaction.


I am also looking to do exactly what you describe.
I just came across mintcash and it looks like it has the functionality.
Granted this solution requires some python knowledge, no code generation should be required.
It uses two other libraries:mintapi and piecash

I just attempted to do this but it seems that mintapi currently has a login issue that is literally two days old at this writing due to mint changing some authentication related calls. Hopefully someone will patch it soon.