Skip to main content

How duplicate detection works in Koinly

Written by Carl

Will Koinly detect duplicate transactions?

Koinly will discard duplicate transactions if imported from the same source and in the same format, for example, if you have a Binance CSV that covers January - April, then get a newer one that includes January - July.

What else can cause duplicate transactions?

Duplicates can also occur if:

  • Both “trades” and “order” files are imported for the same exchange (as one is single fills from the order book, the other is aggregated)

  • The files that have different rounding (0.12 and 0.1 are different amounts for Koinly)

  • The files are in different timezones and the timestamps differ. If you have a file that is in a different timezone, see this article - How to import a CSV file using a different timezone

  • Transactions previously deleted and later re-imported using CSV can create duplicates, even if soft-deleted entries are not permanently removed.

Note that this duplicate detection does not work if you first imported data using API and are now importing the same data using a CSV file - you will get duplicates here in most cases. This is because different methods of duplicate detection are used by the API / CSV.

If you need to mix CSV and API then simply import CSV files first and setup the API to only import newer transactions. When doing this, you should choose the starting date of the API sync and set it to one day later than your last CSV file (Ex. if you import CSV files for all of 2020 then you should set January 1st, 2021 as the starting date of the API sync).

How to Resolve Duplicate Transactions

Step 1: Identifying Duplicate Entries

  • Look for flagged transactions during the importing process. Koinly often detects potential duplicates and highlights them for review.

Step 2: Deleting Duplicates Permanently

If the duplicate results from previous deletions, soft-deleted entries may still exist in your account. Follow these steps:

  1. Enable the view for soft-deleted transactions in your account settings.

  2. Locate any flagged duplicates that were soft-deleted.

  3. Delete these transactions permanently to avoid conflicts during re-import.

Step 3: Correcting Manually Added Duplicates

Occasionally, manual edits can create double entries of the same transaction. For example, editing a withdrawal into a transfer while using dual import methods can cause duplication. In this case, review your records and delete the redundant transaction.

Step 4: Resolving API and CSV Conflict

If both API and CSV import methods were used and caused the same transaction (e.g., a USDT transaction) to appear twice, determine which entry to keep. Generally, you should:

  • Delete the duplicate withdrawal (send transaction), if another entry already records it as a transfer.

Tips for Preventing Duplicate Transactions

Avoiding duplicates is often easier than resolving them. Here are some tips:

  • Stick to one import method per wallet: Use either API or CSV for importing transactions to avoid overlaps.

  • Review imports carefully: After importing, cross-check flagged entries or inconsistencies before saving changes.

  • Delete transactions properly: Always ensure unwanted transactions are deleted permanently to prevent conflicts in future imports.

Did this answer your question?