English Deutsch

Download documents

Download Bank to Customer Statements (camt.53)
from fintech.ebics import EbicsKeyRing, EbicsBank, EbicsUser, EbicsClient

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)

# Download camt.53 documents
docs = client.C53('2014-02-01', '2014-02-07')
# Print all received documents
for name, xml in docs.items():
    print(xml)
# Print the transaction id for this download process
print(client.last_trans_id)
# Confirm download
client.confirm_download()