Skip to main content

Interactive TUI for browsing and exporting Nordnet financial data

Project description

nordpy

nordpy

A terminal UI for browsing and exporting your Nordnet portfolio data.
PyPI - Version

Python versions prek uv Ruff ty tox Pydantic Pydantic
CI Release to PyPI


[!CAUTION] Disclaimer – This tool is provided as-is, with no warranty of any kind. Use it at your own risk.

This project is not affiliated in any way with Nordnet nor MitID.

The author assumes no liability for any loss, damage, or misuse arising from the use of this software. You are solely responsible for securing any exported data and ensuring it is only accessible to you.

Features

  • Browse accounts, balances, holdings, transactions, trades, and orders
  • Portfolio value chart and instrument price charts in the terminal
  • Sparkline trends on holdings (3-month price history via yfinance)
  • Export data to CSV, Excel, or DuckDB
  • Session persistence with automatic re-authentication
  • Headless export mode (no TUI) for scripting
  • SOCKS5 proxy support

How It Works

nordpy authenticates with Nordnet through the same MitID flow your browser uses – it simply performs the login via Nordnet's API directly from the terminal, rather than through a web page. Once authenticated, it fetches your portfolio data using Nordnet's standard API endpoints.

[!IMPORTANT] Privacy – nordpy does not collect, transmit, or store any of your personal information. Your credentials are sent directly to MitID and Nordnet – never to any third-party server. Session cookies are saved locally on your machine (with 0600 permissions) solely to avoid repeated logins. No telemetry, analytics, or external services are involved.

Quickstart

# Run with Python 3.10–3.13 and replace <your-mitid-username> with your MitID username
uvx --python 3.13 nordpy --user <your-mitid-username>

Using nordpy (step by step with screenshots)

Sign in with your MitID username
Step 1
Approve the login on your MitID app, then enter your CPR number if prompted
Step 2
If you have authorized correctly, you will see a confirmation message
Step 3
You are now logged in and will see your list of accounts
Step 4
Select an account to view its holdings
Step 5
View the transactions for the selected account
Step 6
See the price history for the selected instrument in your holdings
Step 7

Requirements

  • Python 3.10–3.13
  • A Nordnet account with MitID (Danish)

Installation

With uv

uv add nordpy

With pip

pip install nordpy

Usage

Interactive TUI

nordpy --user <your-mitid-username>

# Force re-authentication (ignore saved session)
nordpy --user <your-mitid-username> --force-login

# Verbose logging (debug output to stderr + nordpy.log)
nordpy --user <your-mitid-username> --verbose

# Delete saved session and exit
nordpy --logout

[!NOTE] The first time you log in, you may be prompted to enter your CPR number as part of the MitID verification process. This is a one-time step required by MitID to link your identity – subsequent logins will skip this.

Headless Export

nordpy --user <your-mitid-username> --export csv
nordpy --user <your-mitid-username> --export xlsx
nordpy --user <your-mitid-username> --export duckdb

# Export to a specific folder
nordpy --user <your-mitid-username> --export csv --output-dir ~/my-exports

Exported files are saved to the exports/ directory.

[!WARNING] Exported files contain sensitive financial data. Make sure you do not share these filesnor commit them to version control. Keep your exports in a secure location accessible only to you.

Keybindings

Key Action
Enter Select account / view instrument chart
Tab Switch between tabs
e Export current view
r Refresh data
Backspace / Esc Go back / quit
q Quit

Development

git clone https://github.com/kiliantscherny/nordpy.git
cd nordpy
uv sync --dev

Running checks

# Run all checks (tests on Python 3.10–3.13, lint, type check)
uv run tox

# Run tests only
uv run pytest

# Run tests with coverage
uv run pytest --cov=nordpy --cov-report=term-missing

# Lint
uv run ruff check .

# Type check
uv run ty check

License

This project is licensed under the MIT License.

Acknowledgments

This project includes code from MitID-BrowserClient by Hundter, licensed under the MIT License.

Credit also to Morten Helmstedt for the groundwork of looking into this.

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

nordpy-1.3.0.tar.gz (54.3 kB view details)

Uploaded Source

Built Distribution

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

nordpy-1.3.0-py3-none-any.whl (69.5 kB view details)

Uploaded Python 3

File details

Details for the file nordpy-1.3.0.tar.gz.

File metadata

  • Download URL: nordpy-1.3.0.tar.gz
  • Upload date:
  • Size: 54.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nordpy-1.3.0.tar.gz
Algorithm Hash digest
SHA256 199b9ea1d707448ac3f2dfd5f03f334ab89a493cb9de9e5797cb995a61019a88
MD5 7bd151a93194ec53af476e5b818fd264
BLAKE2b-256 7b80142136c43436574c50aff671ec32ffcee4e4e3bd96c6200f6d121f02f74c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nordpy-1.3.0.tar.gz:

Publisher: release.yml on kiliantscherny/nordpy

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

File details

Details for the file nordpy-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: nordpy-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 69.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for nordpy-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 213f30499de46b0974ad4829fee8b5882cbfe9b5589d5fc97c50c54272355842
MD5 e9dfe9e54a725e11ceedba9f205dfdd3
BLAKE2b-256 42ae15eb06aa32ad0223329fc54dd72d71cd7c5f008dda00fd18bfe61ddf4da6

See more details on using hashes here.

Provenance

The following attestation bundles were made for nordpy-1.3.0-py3-none-any.whl:

Publisher: release.yml on kiliantscherny/nordpy

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