Dokumentation fintech.swift
SWIFT module of the Python FinTech package.
This module defines functions to parse SWIFT messages.
Index- fintech.swift.parse_mt940(data)
Parses a SWIFT message of type MT940 or MT942.
It returns a list of bank account statements which are represented as usual dictionaries. Also all SEPA fields are extracted. All values are converted to unicode strings.
A dictionary has the following structure:
- order_reference: string (Auftragssreferenz)
- reference: string or
None
(Bezugsreferenz) - bankcode: string (Bankleitzahl)
- account: string (Kontonummer)
- number: string (Auszugsnummer)
- balance_open: dict (Anfangssaldo)
- amount: Decimal (Betrag)
- currency: string (Währung)
- date: date (Buchungsdatum)
- balance_close: dict (Endsaldo)
- amount: Decimal (Betrag)
- currency: string (Währung)
- date: date (Buchungsdatum)
- balance_booked: dict or
None
(Valutensaldo gebucht) - amount: Decimal (Betrag)
- currency: string (Währung)
- date: date (Buchungsdatum)
- balance_booked: dict or
- balance_noted: dict or
None
(Valutensaldo vorgemerkt) - amount: Decimal (Betrag)
- currency: string (Währung)
- date: date (Buchungsdatum)
- balance_noted: dict or
- sum_credits: dict or
None
(Summe Gutschriften / MT942 only) - amount: Decimal (Betrag)
- currency: string (Währung)
- count: int (Anzahl Buchungen)
- sum_credits: dict or
- sum_debits: dict or
None
(Summe Belastungen / MT942 only) - amount: Decimal (Betrag)
- currency: string (Währung)
- count: int (Anzahl Buchungen)
- sum_debits: dict or
- transactions: list of dictionaries (Auszugsposten)
- description: string or
None
(Beschreibung) - valuta: date (Wertstellungsdatum)
- date: date or
None
(Buchungsdatum) - amount: Decimal (Betrag)
- reversal: bool (Rückbuchung)
- booking_key: string (Buchungsschlüssel)
- booking_text: string or
None
(Buchungstext) - reference: string (Kundenreferenz)
- bank_reference: string or
None
(Bankreferenz) - gvcode: string (Geschäftsvorfallcode)
- primanota: string or
None
(Primanoten-Nr.) - bankcode: string or
None
(Bankleitzahl) - account: string or
None
(Kontonummer) - iban: string or
None
(IBAN) - amount_original: dict or
None
(Originalbetrag in Fremdwährung) - amount: Decimal (Betrag)
- currency: string (Währung)
- amount_original: dict or
- charges: dict or
None
(Gebühren) - amount: Decimal (Betrag)
- currency: string (Währung)
- charges: dict or
- textkey: int or
None
(Textschlüssel) - name: list of strings (Name)
- purpose: list of strings (Verwendungszweck)
- sepa: dictionary of SEPA fields
- [nn]: Unknown structured fields are added with their numeric ids.
- description: string or
- Parameters
- data – The SWIFT message.
- Returns
- A list of dictionaries.