{"id":13771904,"url":"https://github.com/svenstaro/mt940-rs","last_synced_at":"2025-04-02T12:11:20.529Z","repository":{"id":33275995,"uuid":"147464794","full_name":"svenstaro/mt940-rs","owner":"svenstaro","description":"A MT940 parser in Rust","archived":false,"fork":false,"pushed_at":"2024-10-02T02:05:23.000Z","size":309,"stargazers_count":22,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-30T01:43:40.303Z","etag":null,"topics":["bank","fints","hbci","mt940","sepa","statement","strictness"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/svenstaro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"svenstaro"}},"created_at":"2018-09-05T05:32:19.000Z","updated_at":"2024-10-02T02:05:21.000Z","dependencies_parsed_at":"2024-02-12T04:34:56.020Z","dependency_job_id":"a7a4f0f4-135c-46e4-817b-068c2ff415d0","html_url":"https://github.com/svenstaro/mt940-rs","commit_stats":{"total_commits":199,"total_committers":8,"mean_commits":24.875,"dds":0.2562814070351759,"last_synced_commit":"728b2342e645b0b378090399e52dbb8dfafb51d2"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenstaro%2Fmt940-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenstaro%2Fmt940-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenstaro%2Fmt940-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenstaro%2Fmt940-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svenstaro","download_url":"https://codeload.github.com/svenstaro/mt940-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246780116,"owners_count":20832527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bank","fints","hbci","mt940","sepa","statement","strictness"],"created_at":"2024-08-03T17:00:57.384Z","updated_at":"2025-04-02T12:11:20.480Z","avatar_url":"https://github.com/svenstaro.png","language":"Rust","funding_links":["https://github.com/sponsors/svenstaro"],"categories":["Projects"],"sub_categories":[],"readme":"# mt940-rs\n\n[![GitHub Actions Workflow](https://github.com/svenstaro/mt940-rs/workflows/Build/badge.svg)](https://github.com/svenstaro/mt940-rs/actions)\n[![Docs Status](https://docs.rs/mt940/badge.svg)](https://docs.rs/mt940)\n[![codecov](https://codecov.io/gh/svenstaro/mt940-rs/branch/master/graph/badge.svg)](https://codecov.io/gh/svenstaro/mt940-rs)\n[![Crates.io](https://img.shields.io/crates/v/mt940.svg)](https://crates.io/crates/mt940)\n[![license](http://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/svenstaro/mt940-rs/blob/master/LICENSE)\n\n**A strict MT940 bank statement parser in Rust.**\n\n## Features\n\n- Parse MT940 bank statements.\n- Strict and well-researched.\n- Super simple API and nice Rusty structs.\n- Small commandline utility that allows for quick and easy conversion of MT940 statements to JSON.\n- Well tested with many automated tests to find weird corner cases.\n- [Pretty fast](#Performance).\n\n## Planned features\n\n- MT941 support\n- MT942 support\n\n## Library usage example\n\n```rust\nuse mt940::parse_mt940;\n\nfn main() {\n    let input = \"\\\n        :20:3996-11-11111111\\r\\n\\\n        :25:DABADKKK/111111-11111111\\r\\n\\\n        :28C:00001/001\\r\\n\\\n        :60F:C090924EUR54484,04\\r\\n\\\n        :61:0909250925DR583,92NMSC1110030403010139//1234\\r\\n\\\n        :86:11100304030101391234\\r\\n\\\n        Beneficiary name\\r\\n\\\n        Something else\\r\\n\\\n        :61:0910010930DR62,60NCHGcustomer id//bank id\\r\\n\\\n        :86:Fees according to advice\\r\\n\\\n        :62F:C090930EUR53126,94\\r\\n\\\n        :64:C090930EUR53189,31\\r\\n\\\n        \\r\\n\";\n\n    let input_parsed = parse_mt940(input).unwrap();\n    assert_eq!(input_parsed[0].transaction_ref_no, \"3996-11-11111111\");\n}\n```\n\n## CLI usage example\n\n```sh\ncargo run --bin sta2json tests/data/mt940/full/danskebank/MT940_DK_Example.sta\n```\n\n## Documentation\n\nDocumentation is [here](https://docs.rs/mt940).\n\n## Performance\n\nTime to parse the provided `MT940_FI_Example.sta`:\n\n|             | mt940-rs (this crate) | mt940-js (NodeJS)    | mt-940 (Python)      |\n|-------------|-----------------------|----------------------|----------------------|\n| Time for file  | 0.054ms               | 0.08ms               | 1.15ms               |\n| **Performance** | **600000 lines per sec**  | 400000 lines per sec | 28000 lines per sec |\n\n## Strictness\n\nSome banks bank use weird derivates of MT940 that do not strictly follow the specification.\nIn that case you should try to do some pre-processing either by yourself or using one of the provided sanitizers.\n\n## Resources and acknowledgements\n\nReferencing proper docs is important because because banks seem to be somewhat lenient about their strictness in implementing MT940. Below I assembled a list of resources that I reference.\n\n### Other projects\n\n- Lots of test data copied from https://github.com/WoLpH/mt940\n\n### iotafinance.com\n\nAmazing interactive docs.\n\n- http://www.iotafinance.com/en/SWIFT-ISO15022-Message-types-in-category-9.html\n\n### DanskeBank\n\nThey provide tons of good docs.\n\n- https://danskebank.com/en-uk/ci/Products-Services/Transaction-Services/Online-Services/Integration-Services/Documents/Formats/FormatDescriptionSWIFT_MT940/MT940.pdf\n- https://danskebank.com/en-uk/ci/Products-Services/Transaction-Services/Online-Services/Integration-Services/Documents/Formats/FormatDescriptionSWIFT_MT942/MT942.pdf\n- https://danskebank.com/en-uk/ci/Products-Services/Transaction-Services/Online-Services/Integration-Services/Formats/Pages/SWIFT-formats.aspx\n- https://www-2.danskebank.com/Link/ExtendedMT940/$file/Extended_MT940.pdf\n\n### Bank Austria\n\n- https://www.bankaustria.at/files/MBS_MT940_V5107.pdf\n\n### Deutsche Bank\n\n- https://deutschebank.nl/nl/docs/MT94042_EN.pdf\n\n### ABN AMRO\n\n- https://www.abnamro.nl/nl/images/Generiek/PDFs/020_Zakelijk/03_OfficeNet/Formatenboek_MT94_(engels).pdf\n- https://www.abnamro.nl/en/images/Generiek/PDFs/020_Zakelijk/04_Migratie/Derde_banken_Specificaties_EN.pdf\n\n### Westpac Banking\n\n- https://quickstream.westpac.com.au/docs/quickrec/#mt940-file-format-specification\n\n### Societe Generale Srbija\n- https://web.archive.org/web/20160725042101/http://www.societegenerale.rs/fileadmin/template/main/pdf/SGS%20MT940.pdf\n\n### Bank Millennium\n\n- https://www.bankmillennium.pl/documents/10184/128700/File_format_description_of_MT940_v20120309_1216901.pdf/d56bc65f-fa84-4d6c-b07c-9ca60381016b\n\n\n### DZ Bank\n\n- https://www.dzbank.de/content/dam/dzbank_de/de/home/produkte_services/Firmenkunden/PDF-Dokumente/transaction%20banking/elektronicBanking/SEPA-Belegungsregeln_MT940-DK_082016.~644b217ec96b35dfffcaf18dc2df800a.pdf\n\n### Handelsbanken\n\n- https://www.handelsbanken.se/shb/inet/icentsv.nsf/vlookuppics/a_filmformatbeskrivningar_fil_mt940_account_statement_20081212/$file/mt940_account_statement.pdf\n\n### ING Bank\n\n- https://www.ing.nl/media/ING_Format-Description-Structured-Unstructured-MT940-MT942-IBP-v5.2_tcm162-140454.pdf\n\n### Kontopruef\n\n- https://www.kontopruef.de/mt940s.shtml\n\n### Rabo Bank\n\n- https://www.rabobank.com/en/images/Format_Description_MT940%20_2.4_EN.pdf\n\n### SEPA for Corporates\n\n- http://www.sepaforcorporates.com/swift-for-corporates/account-statement-mt940-file-format-overview/\n- http://www.sepaforcorporates.com/swift-for-corporates/list-mt940-transaction-type-identification-codes/\n- http://www.sepaforcorporates.com/swift-for-corporates/quick-guide-swift-mt101-format/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenstaro%2Fmt940-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvenstaro%2Fmt940-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenstaro%2Fmt940-rs/lists"}