joonis Logo

Processing CAMT documents

from __future__ import print_function

import fintech
fintech.register()

from fintech.ebics import EbicsKeyRing, EbicsBank, EbicsUser, EbicsClient
from fintech.sepa import CAMTDocument

keyring = EbicsKeyRing(keys='~/mykeys', passphrase='mysecret')
bank = EbicsBank(keyring=keyring, hostid='MYBANK', url='https://www.mybank.de/ebics')
user = EbicsUser(keyring=keyring, partnerid='CUSTOMER123', userid='USER1')
client = EbicsClient(bank, user)

start = '2016-11-01'
end = '2016-11-30'

camt53 = client.C53(start, end)
camt54 = client.C54(start, end)

names = camt53.keys()
names.sort()

for name in names:
    doc = CAMTDocument(camt53[name], camt54)
    print('transactions for account:', doc.iban)
    for trans in doc:
        if trans.batch:
            for t in trans:
                print(t.date, t.name, t.purpose, t.amount)
        else:
            print(trans.date, trans.name, trans.purpose, trans.amount)

Kann ich
  Ihnen helfen?


Schreiben Sie mir
doch einfach unter
giraffe@joonis.de