A tool for downloading transactions from FinTS banking APIs and sorting them into a ledger journal.
pyfints is used to download the transactions. A list of compatible banks can be found there. This tool was tested with ING and GLS Bank.
There is a pure python implementation available on the python branch.
You can skip the next step if you are using Nix to install fints2ledger.
Make sure you have Python installed at version 3.6 or higher. Install the Python dependencies using:
pip3 install "fints>=4,<5" "mt-940>=4.11,<5"
Next, you can install fints2ledger.
nix profile install github:MoritzR/fints2ledger
Grab the package for your system from the releases page.
On Unix, don't forget to make the binary executable with chmod +x fints2ledger
.
For this you need cabal installed. Then run
git clone [email protected]:MoritzR/fints2ledger.git
cd fints2ledger
cabal install
This might take a while.
You can try out the program with the demo
flag, which does not call any banking API.
fints2ledger --demo
To use a real connection run
fints2ledger
and enter your banking credentials in the following form. This only needs to be done once.
The full configuration is stored in ~/.config/fints2ledger/config.yml
.
For a list of available command line arguments, run
fints2ledger --help
In the ledger
section you can use a regex match on any field of the transaction data to automatically fill other fields.
The amount
field uses comparison symbols instead of a regex. Valid values are for example "<=90.5", "120.13", "> 200"
Example: I do not want to enter a credit_account
and purpose
for my monthly recurring payments for the rent of my apartment. Same for my music streaming transactions. I can change the config.yml
like this:
ledger:
...
fills:
- match:
payee: "The Landlord"
purpose: "Rent for apartment B month.*"
fill:
credit_account: "expenses:monthly:rent"
purpose: "monthly rent"
- match:
payee: "MUSIC COMPANY 123"
fill:
credit_account: "expenses:monthly:musiccompany"
purpose: "Monthly fee for music streaming"
To only fill out parts of the transaction while still being prompted for others, leave the value empty for the fields that you like to be prompted for.
The following will fill out credit_account
but still prompt for purpose
(instead of taking the purpose from the original transaction).
ledger:
...
fills:
- match:
payee: "The Landlord"
fill:
credit_account: "expenses:monthly:rent"
purpose:
The changelog can be found in CHANGELOG.md
For additional information on how to work with the repository, see CONTRIBUTING.md