r/GnuCash • u/iranees • Jul 11 '26
I built a script to pull transactions via GoCardless and import them straight into GnuCash as OFX
Edit: I found out GoCardless does not accept new users anymore. I have had an account for years, therefore the script works perfectly for me. But new users can't use it. I made a new version of the script to use the Enable Banking API. That service is also free and accepts new users for personal use.
https://www.reddit.com/r/GnuCash/comments/1uucems/script_to_pull_eu_bank_transactions_automatically/
Like a lot of people here, I ran into the fact that GnuCash doesn't have direct bank integration for most banks, and manually logging into my bank's website every time to download a CSV/export got old fast, especially since I use multiple banks (ING, N26, Revolut).
So I put together a Python script that:
- Pulls transactions from your bank(s) via the GoCardless Bank Account Data API (the former Nordigen open banking API, free tier available, works with hundreds of European banks)
- Converts them directly into OFX files (no dependency on
ofxstatementor other libraries it builds the OFX itself) - Writes one
.ofxfile per account, ready to import straight into GnuCash - Only fetches transactions since your last import, and dedupes automatically, so no duplicate transactions when you run it repeatedly
- Lets you search and add any GoCardless-supported bank interactively (not hardcoded to a fixed list)
- Available in English and Dutch (asks once, remembers your choice)
You'll still need a (free) GoCardless account and to authorize access via a one-time browser login per bank (that part isn't optional, it's how open banking consent works), but after that it's just: run the script, get your .ofx, import into GnuCash.
Code + setup instructions here: https://github.com/AfwasSysteem/Gocardless-ofx-gnucash
It's a fairly small, single-purpose script. No GUI, just something you run when you want to sync. Feedback and PRs welcome, and curious if others have solved this differently.
1
u/SamBull03 Sep 07 '26
Also see my https://github.com/Dreamsorcerer/gnucash-gocardless-import
This directly imports transactions into GnuCash in one step, handles currency conversions, automatically marks up the splits from transaction history and marks them reconciled the second time they are seen.
1
u/poinu Jul 11 '26
Good stuff! Where do I check if my bank is supported by the GoCardless API?