Why transaction history is duplicated after API sync

In this page, we will introduce the reasons for accidental double counting caused by API integration and the corresponding countermeasures.

 

1.Inputting different sub-account names with the same API key for integration.

If you are using an exchange that allows the creation of sub-accounts, when connecting via API in the cryptact, there is a field where you can input the sub-account name. If you do not have a sub-account with the exchange, you should generally leave the sub-account name field blank. Please note that if the exchange does not support sub-account creation, this field will not be displayed.

API二重計上ヘルプページ⓪EN.webp

If you have multiple sub-accounts, it is important to input the respective sub-account name separately when loading them as different transactions. However, be cautious not to input different sub-account names using the same API key, as cryptact will recognize them as separate API keys, leading to duplicate recording of transactions.

For example, even if you do not have any sub-accounts, if you link the same API key obtained from your main account using a ‘Subaccount Name’ such as ‘Test1’, and then link it again separately using the same API key but with a different ‘Subaccount Name’ such as ‘Test2’ or leaving it blank, duplicate entries will occur. This is because, although the API key is the same, the subaccount names differ.
API二重計上ヘルプページ①EN.webp
API二重計上ヘルプページ②EN.webp

 

Countermeasures:

STEP 1:On the Transactions page, click the transaction that appears to be duplicated, and check the sub-account name on the transaction details screen. If the sub-account name field is blank, it will be displayed as 'N/A'. If something was entered, the entered value will be shown.

API二重計上ヘルプページ③EN.webp
API二重計上ヘルプページ④EN.webp

STEP 2:Delete API connection for one of the sub-account name.
■How to delete API connection

 

STEP 3:Delete the history of the sub-accounts deleted in STEP2.

Delete all history after the earliest date that is double-counted from the transaction page. Please see the following help page for instructions on how to delete history uploaded by API for each sub-account name.
■How to delete trade history

※Please make sure that the API integration you deleted matches the sub-account name of the transaction history you are removing.
 

▼In the future, if you conduct new transactions, clicking on "Sync" with the existing API key for API integration will ensure that no duplicate entries occur, and it will retrieve the latest history for you.

※Since bybit, for example, has a limit on the past history that can be retrieved by the API, it is necessary to upload a custom file or the like for the history that could not be retrieved.
cryptact's Support Status for Bybit.


 

 

2.Changes in the exchange's specifications resulting in a modification of the API's endpoint (connection destination).

If an exchange changes the API specifications, cryptact's system will consider it a different API key and double-counting will occur.

 

Countermeasures:

As soon as we confirm the change in specifications on the exchange side, we will send an e-mail to the relevant customers with information about the elimination of double-counting.

 

3.When switching from exchange files to API, the transaction timestamps retrieved via the API include milliseconds.

When a transaction type can be obtained through both exchange files and API integration, uploading in the order of exchange file → API will not normally result in duplicate records, because the system is designed to retrieve only the transaction history from the API that occurs after the latest transaction timestamp already uploaded via the exchange file.

However, for transactions that occur around the time of switching from exchange files to API, there is a possibility of duplicate entries. This is because the timestamps retrieved via the API contain more precise information down to the millisecond compared to the exchange files, and to prevent missing any transactions when importing the data.

 

Countermeasures:

After switching from exchange files to API integration, please check your Transactions to ensure that no duplicate records exist. If any duplicates are found, you will need to delete them manually.
 

Uploading Transaction History: Switching Between Exchange Files and API – Key Points

 

4.Transactions that may appear as double-counted but are, in fact, distinct and separate transactions.

As shown in the image below, when the details of the date, time, and volume of transactions are the same, it appears that double-counting has occurred.

 

Countermeasures:

STEP1:Click on the relevant transaction and confirm the "Transaction ID".

mceclip2.png

 

STEP2:Upon checking, you found that if the transaction IDs are different, the history is delivered by the exchanges as different transactions, and therefore, cryptact reflects them as different transactions as they are. If you are seeing different transaction IDs for transactions that you did not actually execute, and the transactions appear to be double-counted, please check with your exchange to confirm this.