Skip to main content

Converts NovaDAX CSV reports to formats accepted by Koinly.

Project description

nd2k

Converts NovaDAX CSV reports to formats accepted by Koinly.

PyPI version CI Release Codacy Badge Codacy Coverage Badge

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:

  • A "simple" transaction, such as deposits and withdraws have only one operation.
  • A "trade" transaction has three operations (base asset, quote asset, and trading fee).

This script organizes NovaDAX CSV operations into transactions, and outputs a CSV in 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.

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

nd2k-0.7.4.tar.gz (37.5 kB view details)

Uploaded Source

Built Distribution

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

nd2k-0.7.4-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file nd2k-0.7.4.tar.gz.

File metadata

  • Download URL: nd2k-0.7.4.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for nd2k-0.7.4.tar.gz
Algorithm Hash digest
SHA256 8e97bdbb6e490b8eb7b50b981f195a4f55cad03bd2e62ed21dec7ecc2fe4df97
MD5 2c7514390cc19a89ad330dd1c4bfe6ed
BLAKE2b-256 a30bc0b0ad9848b63319f408e7e915d5816d5b8bd395abe7001d5552dbc7b529

See more details on using hashes here.

File details

Details for the file nd2k-0.7.4-py3-none-any.whl.

File metadata

  • Download URL: nd2k-0.7.4-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for nd2k-0.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6ba673d41126b7f380ed56db4efce1e3c76a8a5eedb319999081ea49718614b2
MD5 2eb2685d246a2a0773b6ded0c62d3753
BLAKE2b-256 595e367d03d9b58264576760460692a86a26230a7ece0a055d73c622be561478

See more details on using hashes here.

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