In this guide, we will discuss how duplicate data is recognized and handled in CryptoTaxCalculator.
When might the duplicate transactions be imported?
1. Hard sync
Hard syncing might cause duplicated transactions. However, even though the existing transactions are modified, hard syncing does not always cause duplicated transactions. We will discuss this further in the coming section.
2. Importing via different sources
Transactions from different sources (e.g., API and CSV) are all imported even when they are identical and with the same transaction ID. In the below table, both transactions are imported.
Timestamp | Trade Type | Asset | Transaction ID | Import source |
2021-01-01 00:00:00 | Buy | 1 ETH | 123456 | API |
2021-01-01 00:00:00 | Buy | 1 ETH | 123456 | CSV |
What happens when syncing the API or wallet?
There are two ways to sync your existing API. One is the “resync” and “sync” features, and the other one is the “hard sync” feature.
Sync and Resync
Resyncing the API key or wallet only syncs the data from the last time it was synced. So there is no duplicate data issue when resyncing the data from the same source. You can also check the last sync time when you hover the mouse over the resync or sync button on the Import page.
Hard Sync
The “Hard Sync” feature, however, syncs all the data for that API or wallet from the “Start import from” date, which may be the beginning (by default) or a custom date.
During this process, CTC will check for any new transactions that may have occurred from the import from date but weren’t already imported into CTC.
When you Hard Sync a data source, we do not touch, delete, or alter any transactions which were already imported via that data source. We only import new transactions. Because of this, there may be scenarios where the details of a transaction may have changed slightly in the exchange’s database, causing us to import the same transaction again.
With the exchange API, CTC recognizes the ID; With the on-chain wallet, CTC recognizes the Tx ID. Categorizing or changing the timestamp or amount of the transaction does not change how CryptoTaxCalculator recognizes the transaction as long as the Tx ID (on-chain wallet) or ID (exchange) doesn’t change. Hence, if the Tx ID or ID already exists, hard sync will not bring in the transaction with the same ID.
Examples of how Hard Sync is useful can be seen below (Note: Keep in mind that hard sync could duplicate the transactions.):
1. You want to re-import the original data for some transactions you’ve edited.
In this case, you can delete all the transactions relevant to that transaction ID and hard-sync the API/wallet.
Tip: Use the Transaction ID filter to find all the relevant transactions.
2. The exchange or blockchain API endpoint starts supporting new types of data that weren’t supported previously.
This applies if you haven’t manually imported the data missing from API. In this case, “sync” or “resync” does not bring in the previous data. You need to hard sync to import the previously missing data.
Note: If you’ve already imported the missing data manually or via CSV, hard syncing the API will bring in duplicate transactions.
3. Missing transactions.
Occasionally, there might be part of the transaction missing due to the API connection stability between CryptoTaxCalculator and the exchange API endpoints. Hard sync can bring in the missing transactions. E.g., A buy and a sell transaction with the same Tx ID, but only the buy was imported.
What happens when importing the CSV that might have duplicate data?
Similar to API syncing, CryptoTaxCalculator recognizes the CSV transactions by their IDs. Unlike on-chain Tx IDs, the ID column CTC abstracts could vary due to different formats exchanges provided. For example, there could be order ID, trade ID, and transaction ID columns in the same exchange CSV. You can check which ID CTC uses by checking the in-app transaction.
The same transaction ID might include multiple transactions. When importing a transaction that is modified, even though it has the same transaction ID as the other one, the transaction will still be imported.
When importing via CSV, CryptoTaxCalculator handles duplicated transactions as below.
If the transaction with the same ID already exists:
Importing another identical transaction, the transaction will not be imported. In the below table, only one transaction is imported.
Timestamp | Trade Type | Asset | ID |
2021-01-01 00:00:00 | Buy | 1 ETH | 0000001 |
2021-01-01 00:00:00 | Buy | 1 ETH | 0000001 |
Importing another transaction with the same ID, the transaction will be imported. In the below table, both transactions are imported.
Timestamp | Trade Type | Asset | ID |
2021-01-01 00:00:00 | Buy | 1 ETH | 0000001 |
2021-01-01 00:00:00 | Sell | 0.078 BTC | 0000001 |
If there is no transaction ID assigned in the CSV:
Importing another identical transaction with or without transaction ID, the transaction will be imported. In the below table, both transactions are imported.
Timestamp | Trade Type | Asset | ID |
2021-01-01 00:00:00 | Buy | 1 ETH |
|
2021-01-01 00:00:00 | Buy | 1 ETH |
|
What to do when seeing duplicated transactions?
If you see duplicate transactions showing when there shouldn’t be, try refreshing the calculations on the Settings page to ensure the report is up-to-date.
If, after refreshing the report, you still see the unexpected duplicated transactions, shoot our support team a message with some details via in-app chat so we can assist you.