This Python script imports transactions from banks that support the German FinTS Banking API.
The last 10 days of transactions are imported. It's safe to run this script periodically as duplicates (already imported transactions) are filtered out.
It probably only works with german ING at the moment.
Connection details need to be set up in a settings.json
file in the project folder, see an example at settings.sample.json
.
Multiple bank accounts can be setup in the array "fints"
.
- fints_endpoint: This is the FinTS endpoint for your bank. An incomplete list of endpoints can be found here.
- ynab_account_id: Transactions fetched from this bank account are assigned to this YNAB account. In YNAB's web interface on the account page this is the last ID in the URL.
- parse_paypal: (optional): If
true
, the script tries to extract the merchant's name in PayPal transactions to avoid these transactions being assigned to the genreic PayPal payee. The memo of these transactions is set to PayPal.
- access_token: A YNAB API access token (Request it in the YNAB developer settings).
- budget_id: In YNAB's web interface, this is the first ID in the URL.
- cash_account_id (optional): If set, transactions that are identified as cash withdrawls are imported as transfers to this account.
- requires at least python3.6
- Install dependencies:
pip3 install -r requirements.txt
Run the script with:
python3 fints-to-ynab.py
docker-compose build && docker-compose up -d
, then run docker start fints-to-ynab
periodically, e.g. by adding */10 * * * * /usr/bin/docker start fints-to-ynab
to crontab to run every 10 minutes