AqBanking CLI on Mac OS X with ING DiBa via HBCI

Get the requisite: AqBanking via Homebrew on Mac OS X:

brew install aqbanking
# ↑ At the time of writing (2011-12-28) this will get you AqBanking v5.0.16

Now set up your ING-DiBa online banking account (needs activated HBCI interface):

ktoblzcheck 50010517 5400040302
aqhbci-tool4 --help
aqhbci-tool4 adduser -N philipp -u 5400040302 -b 50010517 -s https://fints.ing-diba.de/fints/ -t pintan --hbciversion=220
# ↓ not needed for ING-DiBa (but possibly for Sparkasse, VR-Bank etc.)
#aqhbci-tool4 listitanmodes -b <blz>
#aqhbci-tool4 setitanmode -b <blz> -m 911
# ↓ not really needed (done automatically when running getsysid)
#aqhbci-tool4 getcert
aqhbci-tool4 getsysid
aqhbci-tool4 getaccounts
aqhbci-tool4 listaccounts

This will set up your aqbanking settings in .aqbanking/settings/. Now you're ready to query your transactions:

aqbanking-cli --help

aqbanking-cli request --help
# ↓ ask for your account balance
aqbanking-cli request --balance
# ↓ ask for your account transactions and save them as transactions.ctx
aqbanking-cli request --transactions -c transactions.ctx
# ↓ convert transactions.ctx to a CSV file (noted transactions get lost this way)
aqbanking-cli listtrans -c transactions.ctx --exporter=csv --profile=full -o transactions.csv

Now you have a CSV file with all your transactions on your hard disk.

Sometimes I get the message

4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1283: Unexpected tag '34F' found.
4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1284: To debug set environment variable AQBANKING_LOGLEVEL=info and rerun
4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1283: Unexpected tag '13' found.
4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1284: To debug set environment variable AQBANKING_LOGLEVEL=info and rerun
4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1229: Your bank does not send an opening saldo
4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1283: Unexpected tag '90D' found.
4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1284: To debug set environment variable AQBANKING_LOGLEVEL=info and rerun
4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1283: Unexpected tag '90C' found.
4:2012/01/10 16-57-20:aqbanking(784):swift940.c: 1284: To debug set environment variable AQBANKING_LOGLEVEL=info and rerun

This is due to the fact that there is a difference between MT940 (finished transactions) and MT942 (noted transactions).

Resources

Comments