firefly-iii
firefly-iii copied to clipboard
OFX Support
So with Spectre being sort of iffy and not supporting some major banks, I wanted to implement support for OFX. I am currently working on a new Laravel app to gather OFX data. I was wondering if you would be able to help out with the actual import of the data to firefly though.
Currently this is what I want to accomplish:
- Get information about how to connect to banks to download ofx data (https://www.ofxhome.com/) -- I am pretty much done with this.
- Configure interface for people to select the bank they want to pull data from and save these configs. Sort of like uploading a csv file, but this would hold information about which banks to connect to, what accounts to pull from within that bank, username, password, etc. All the information would be saved locally and sensitive information would be encrypted.
- Connect and download transactions as OFX data
- Parse OFX data and map to firefly fields. This should be fairly easy since there is a standard, so the mapping could be automatic, but shown just like the csv importer
From here, the data should be ready to be imported to firefly and this is where I would need some help. Basically making sure the app follows what csv importer would do in that you need an api key and taking the parsed data and importing it into firefly. I may also need help with duplication. Within the OFX standard, there should be a 'FITID' field. Which is a unique transaction id. I may need some help on where I we could add this field in firefly and potentially do some other things to detect duplicates.
This would allow you to pick from over 1100 different banks. Let me know if you would be willing to support me a bit in this if I can get it up and running and parsed. I'm also willing to accept help from anyone.
Absolutely! That would be awesome. I'd love to help you out, and feel free to look at the CSV importer to see how it works.
- OFX is a "standard", make no mistake about that. I hope you won't run in too many issues 😁
- Firefly III does a basic check on how unique a transaction is by comparing sha2 hashes. This is very exact though; any extra spaces or info and the transaction will no longer be a duplicate. You could also use the search to find duplicates, and for values like the FITID you should use the external_identifier.
If you create a repository I'd be happy to look at the code and drop the occasional PR if you'd appreciate it. Feel free to use code from the CSV importer, or it's support library.
What do you need to start?
That's awesome. As of right now, I don't need anything. I just started it today, so I'll probably get it to the point where I can download ofx data and save accounts and then I'll upload it to a repo.
It might be nice to eventually decouple the ofx piece into a separate library so anyone can use it, but not going to worry about that now lol.
Just getting started with Firefly and am waiting on my Spectre account to be enabled. I'd love to help out with OFX support as well, so let me know if you get started on this. @kungfu71186 @JC5
Just getting started with Firefly and am waiting on my Spectre account to be enabled. I'd love to help out with OFX support as well, so let me know if you get started on this. @kungfu71186 @JC5
Yeah, i started working on it. I went down a rabbit hole as to what stack to use, so i haven't got very far with it.
There are a few options i am looking into. I was thinking of making an app that can be used as a standalone, but have a web interface. Some issues I am running into are things like how to store the configuration. Not a lot of data to be stored, but having a small relational database of some sort would be nice and the ability to store raw ofx files offline. I have flirted with the idea of using indexeddb, but it would be hard to back that up if you wanted to.
- Use laravel for the backend and create an api and use vuejs/vuetify for the frontend.
- Use expressjs for the backend and create an api and vuejs/vuetify for frontend.
- Create a PWA with pouchdb/couchdb
- just create a python api for some ofx libraries out there and then again, use vuejs/vuetify as a frontend
Once the OFX piece is in place, then we can implement the actual import routines to firefly. I was thinking of just having an app that can import/download OFX data and the firefly import as more of a plugin sort of thing. So you can look at OFX data and sort through it and then import that into firefly and possibly in the long term, import it into any money manager.
@JC5 @aegixx so finally got to go through some scenarios. super good times.
anyway, wanted your guys thoughts on something. There are currently two fairly good ofx libraries. ofxtools and ofxclient. It seems like ofxclient isn't really maintained anymore.
The biggest issue is just the old ofx standards are xml, but not. This is why i am a little hesitant about creating something new for the OFX piece. So you may have something like this, with no closing tag:
<APPID>QWIN
<APPVER>2700
This may mean we would need to work with something like Flask for the backend, which would include importing all transactions to fireflyiii using python code.
What are your thoughts about this and how to integrate one of these libraries into a backend?
I don't mind using other programming languages; whatever works. My proficiency with them however isn't guaranteed.
I was able to make a little bit of progress https://github.com/kungfoome/iho
Doesn't do much yet except test a connection using ofx parameters in an api, but gives an idea of where I am headed with it.
Backend would be an API and then the front-end could be whatever, but a simple web app would be sufficient.
Any progress on this?
There are currently two fairly good ofx libraries. ofxtools and ofxclient. It seems like ofxclient isn't really maintained anymore.
Not sure if you saw libofx, which is used by desktop Linux financial software (GnuCash, HomeBank, KMyMoney).
The biggest issue is just the old ofx standards are xml, but not. This is why i am a little hesitant about creating something new for the OFX piece. So you may have something like this, with no closing tag:
<APPID>QWIN <APPVER>2700
That's SGML, not XML. It's used for OFX 1.x, which was first standardized in 1997. (It was also used for HTML 4.)