Beancount Nordnet DK Importer
beancount-nordnetdk provides an importer for converting CSV exports of Nordnet transaction summaries to the Beancount format.
Installation
$ pip install beancount-nordnetdk
In case you prefer installing from the Github repository, please note that main is the development branch so stable is what you should be installing from.
Usage
If you're not familiar with how to import external data into Beancount, please read this guide first.
Beancount 3.x
Beancount 3.x has replaced the config.py file based workflow in favor of having a script based workflow, as per the changes documented here. The beangulp examples suggest using a Python script based on beangulp.Ingest. Here's an example of how that might work:
Add an import.py script in your project root with the following contents:
from beancount_nordnetdk import NordnetDKImporter
from beangulp import Ingest
importers = (
NordnetDKImporter(
depot_accounts={
"12345678": "Assets:Nordnet:Account1",
"23456789": "Assets:Nordnet:Account2",
"34567890": "Assets:Nordnet:Account3",
},
currency="DKK",
stock_account="Assets:Nordnet:Stocks",
fees_account="Expenses:Investments:Fees",
dividend_account="Income:Investments:Dividends",
tax_account="Expenses:Investments:Tax",
interest_account="Income:Investments:Interest",
),
)
if __name__ == "__main__":
ingest = Ingest(importers)
ingest()
... and run it directly using python import.py extract.
Beancount 2.x
Adjust your config file to include NordnetDKImporter.
Add the following to your config.py:
from beancount_nordnetdk import NordnetDKImporter
CONFIG = [
NordnetDKImporter(
depot_accounts={
"12345678": "Assets:Nordnet:Account1",
"23456789": "Assets:Nordnet:Account2",
},
currency="DKK",
stock_account="Assets:Nordnet:Stocks",
fees_account="Expenses:Investments:Fees",
dividend_account="Income:Investments:Dividends",
tax_account="Expenses:Investments:Tax",
interest_account="Income:Investments:Interest",
),
]
Once this is in place, you should be able to run bean-extract on the command line to extract the transactions and pipe all of them into your Beancount file.
$ bean-extract /path/to/config.py transactions-and-notes-export.csv >> you.beancount
CSV Format
The importer expects Nordnet CSV exports with the following characteristics:
- Filename:
transactions-and-notes-export.csv - Encoding: UTF-16
- Separator: Tab (
\t) - Header row: Present
Key columns:
- Id - 10 digit transaction ID
- Bogføringsdag - Posting date (yyyy-mm-dd)
- Handelsdag - Trade date (yyyy-mm-dd)
- Valørdag - Value date (yyyy-mm-dd)
- Depot - Account number (8 digits)
- Transaktionstype - Transaction type
- Værdipapirer - Security name
- ISIN - ISIN identifier
- Antal - Quantity
- Kurs - Price
- Samlede afgifter - Total fees
- Beløb - Amount
- Valuta - Currency
- Saldo - Account balance
- Transaktionstekst - Transaction text
- Kurtage - Brokerage
Contributing
Contributions are most welcome!
Please make sure you have Python 3.11+ and uv installed.
- Clone the repository:
git clone https://github.com/joandrsn/beancount-nordnetdk - Install the packages required for development:
uv sync --dev - That's basically it. You should now be able to run the test suite:
uv run pytest.
Metadata
Release files for beancount-nordnetdk 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| beancount_nordnetdk-1.0.0.tar.gz | 10.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| beancount_nordnetdk-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.0 kB
Release files / beancount_nordnetdk-1.0.0.tar.gz
| Download URL | beancount_nordnetdk-1.0.0.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb11a366bce2c45caa917f8555819a30c5f1181db65a6af0560f3aee0c3554a6
|
|
BLAKE2b-256 checksum How to use checksums |
2e8221c6d9900cfa77446ac1d8c89717bd0b046f8d4130c78a49990d9a5f87bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.23 {"installer":{"name":"uv","version":"0.9.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / beancount_nordnetdk-1.0.0-py3-none-any.whl
| Download URL | beancount_nordnetdk-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32cc6fe16f0e0f5e60bc5a59fa9aff04a61bafc5aacee4bcdecf9dcd2b4c25d2
|
|
BLAKE2b-256 checksum How to use checksums |
2346c456f4412c572ac0f16373812e90c6d4063119f648b4c036b2df916b58f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.9.23 {"installer":{"name":"uv","version":"0.9.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for beancount-nordnetdk 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.