Skip to main content

Beancount/beangulp importer for open-banking.io — zero-knowledge PSD2 bank sync for EEA & UK banks.

Project description

beancount-openbanking-io

A Beancount / beangulp importer for open-banking.io — zero-knowledge PSD2 bank sync for EEA & UK banks.

Transactions arrive as zero-knowledge encrypted envelopes and are decrypted locally by the official open-banking-io SDK with a key only you hold. Your statement is never readable off your machine — a good fit for a plaintext-accounting ledger you keep yourself.

Why

If you sync EU/UK banks into Beancount, your options have been thinning out:

  • GoCardless / Nordigen stopped approving new personal Bank-Account-Data accounts, and imposes a 4-requests-per-account-per-day rate limit that breaks routine imports.
  • Other aggregators terminate your bank connection in the clear on their servers.

open-banking.io is an alternative built for self-hosters: client-side decryption, no eIDAS certificate to obtain, no per-account daily rate-limit wall.

Install

pip install beancount-openbanking-io

This pulls in beancount, beangulp, and the open-banking-io SDK.

Configure

Export your credentials bundle from the open-banking.io dashboard, then create a small YAML file whose name ends in openbanking.yaml:

# myfinances.openbanking.yaml
credentials: ./open-banking.io-credentials.json   # path is relative to this file
accounts:
  - id: f1345859-....          # open-banking.io account id (from client.get_accounts())
    account: Assets:Bank:Nordea:Checking
    currency: DKK              # optional guard
    counterpart: Expenses:Uncategorized   # optional; default holding account for the other leg
    assert_balance: true       # optional: emit a booked-balance (ITBD) assertion

To list your account ids:

from open_banking_io import OpenBankingClient

with OpenBankingClient.from_credentials("open-banking.io-credentials.json") as client:
    for account in client.get_accounts():
        print(account.id, account.aspsp_name, account.currency, account.iban)

Use

Wire it into your beangulp import script like any other importer:

# import.py
import beangulp
from beancount_openbanking_io import OpenBankingImporter

if __name__ == "__main__":
    beangulp.Ingest([OpenBankingImporter()]).main()
python import.py extract myfinances.openbanking.yaml >> ledger.beancount

Re-running is safe: each entry is stamped with its stable open-banking.io transaction id (obio-id), so already-imported transactions are skipped.

Mapping

open-banking.io Beancount
amount (unsigned) + creditDebitIndicator signed posting amount — DBIT → negative, CRDT → positive
creditorName (DBIT) / debtorName (CRDT) payee
remittanceInformation / note narration
bookingDate (→ valueDatetransactionDate) entry date
status PDNG ! (flagged/uncleared); BOOK*
transaction id obio-id metadata (dedup key)
ITBD booked balance optional balance assertion

Each transaction gets a second, amount-elided posting to the counterpart account (default Expenses:Uncategorized) so entries balance on import; reclassify it later (e.g. with smart_importer). Transactions whose direction cannot be determined are skipped, never imported with a guessed sign.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

beancount_openbanking_io-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

beancount_openbanking_io-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file beancount_openbanking_io-0.1.0.tar.gz.

File metadata

  • Download URL: beancount_openbanking_io-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for beancount_openbanking_io-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a38cc422bf557b241bb203e219a9564f529e482b4518df7d7d433e782f3ebf54
MD5 b3427125a5cd53899a90130c9a527607
BLAKE2b-256 58bf4d0e8a0ad8bc7ea7a6dedc3cc48b26d6a4b6029d3a1a2ecfe202349bb007

See more details on using hashes here.

Provenance

The following attestation bundles were made for beancount_openbanking_io-0.1.0.tar.gz:

Publisher: publish-beancount.yml on open-banking-io/clients

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file beancount_openbanking_io-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for beancount_openbanking_io-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4619a824b8aef0642ee921ae1a9db2e35ca4511e5c8a5b71f6d70e62c2255945
MD5 53a775cce9736ab76358c6304e756300
BLAKE2b-256 9758a0010bb290bedfe279a4a3c6368d422f4533a2bdf391622cfbc8da4c8f04

See more details on using hashes here.

Provenance

The following attestation bundles were made for beancount_openbanking_io-0.1.0-py3-none-any.whl:

Publisher: publish-beancount.yml on open-banking-io/clients

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page