nd2k
Converts NovaDAX CSV reports to formats accepted by Koinly.
Requirements
- Python 3.10 or later
Installation and Usage
pip3 install --upgrade nd2k
nd2k novadax-file.csv
Alternatively, you can use a container image:
[docker|podman] run -v $(pwd):/wdir -w /wdir ghcr.io/thiagoalessio/nd2k ./novadax.csv
Key concepts
Operations and Transactions
- Each line in the NovaDAX CSV is an Operation.
- Each line in the Koinly CSV is a Transaction.
Transactions can consist of one or more operations.
Types of Transaction
NonTrade(a.k.a. "Simple Transaction"), such as deposits and withdraws has only one operation;Swaphas 2 operations (asset_a and asset_b). Swaps have no fees;ExchangeandTradehave 3 operations: base asset, quote asset and fee;- The only practical difference between them is that in the NovaDAX CSV, trades mention the trading pair explicitly on the operation summary, while exchanges come only with a generic summary ("Convert").
This script organizes NovaDAX CSV operations into transactions, and outputs them as a new CSV that follows the Koinly Universal Format.
Base and Quote assets
In a trading pair like BTC/EUR:
- Base asset (BTC): The asset being bought or sold.
- Quote asset (EUR): The asset used to price the base asset.
Implementation details
The NovaDAX CSV file must be parsed in reverse order (from the last line to the first) to correctly match trades with their corresponding fees.
Trading fee lines do not specify which trade they belong to, so we infer the relationship based on the fee's currency and the trade type (purchase or sale).
- For purchases, the fee is charged in the base asset currency.
- For sales, the fee is charged in the quote asset currency.
Metadata
Release files for nd2k 0.9.4
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 | Actions |
|---|---|---|---|---|
| nd2k-0.9.4.tar.gz | 51.3 kB | Without provenance | Details for nd2k-0.9.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nd2k-0.9.4-py3-none-any.whl | Python 3 | none | any | Details for nd2k-0.9.4-py3-none-any.whl |
Total release size: 61.4 kB
Release files / nd2k-0.9.4.tar.gz
| Download URL | nd2k-0.9.4.tar.gz |
|---|---|
| Size | 51.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e784c6b862146a45c168855b45674fda0c75b576ab631a3cb2d8f413dd7d51ce
|
|
BLAKE2b-256 checksum How to use checksums |
f230302f3dfee26fd44080a8140dc374bf53a454124d4a6beb53d00b0a21a097
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.33.0
|
Release files / nd2k-0.9.4-py3-none-any.whl
| Download URL | nd2k-0.9.4-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f86c7f5afbe4692390ac71e26eacded4a2a3c132affe3723f43f222756e7321
|
|
BLAKE2b-256 checksum How to use checksums |
62df916803a41c0694f52e9e8acf0ab235436557c7136e60ec99639137f43b71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.33.0
|
Security for nd2k 0.9.4
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.