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 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.1.tar.gz (14.4 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.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nd2k-0.7.1.tar.gz
Algorithm Hash digest
SHA256 d66be79e26f72042269d662681009c4cb75beb89274e99af33563d318f19c3ad
MD5 3f0252b4cd95d0a6e68fcaaf13ef79c8
BLAKE2b-256 147b8b88f86364c26febe17830a04bd6bca47c9589074e1d00183eaf7eb636f8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nd2k-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e427c7f21cbb1ac670c3b6712ae9b87bb8bb582ebb59cf66c121f7d1e7e6bae
MD5 25c9726bbdca7e995d3195e5d766a927
BLAKE2b-256 8700a145dd4f7b1ede2daca97b31a1e38cf378bb48bb831ea5b68bf1be08178a

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