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.

CI Codacy Badge Codacy Coverage Badge

Requirements

  • Python 3.10 or later

Installation and Usage

pip3 install https://github.com/thiagoalessio/nd2k/releases/download/v0.1/nd2k-0.1.tar.gz
nd2k novadax-file.csv

Alternatively, you can use a container image:

<docker|podman> run -v $(pwd):/wdir -w /wdir ghcr.io/thiagoalessio/nd2k:v0.1 ./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 two Koinly CSVs (one for trades and another for all non-trades).

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

nd2k-0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nd2k-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c9b880e0e90f37f5444159728ad79b08e52c11eeba6161218516725c97b88fa5
MD5 23778030de8e0f9123114a9a1ebdc864
BLAKE2b-256 4bdaf6c05293c79583d93e69a1a11c435802160a3d2954d67937be4a39229561

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