How to Sync Exchange APIs Correctly

This page explains the important points to consider during API integration.

 

1.Basic Rules for API Integration

1-1.Perform regular re-synchronization after integration

After adding API key to cryptact, transaction history does not update automatically. Please re-sync regularly to reflect the transactions to cryptact.
How to Upload Transaction History via API

Some exchanges may impose restrictions on the period for which transaction history can be retrieved retroactively. Please check the "Automation Coverage Updates" or the "API Import"  for each exchange, and perform re-synchronization within the restricted period to ensure that all transaction history is captured without omissions.

When re-synchronization is performed, only transactions after the “Latest transaction timestamp” will be imported. In principle, duplicate entries will not occur, so you can rest assured.

For cases where duplicate entries may occur, please refer to the following help page:
Why transaction history is duplicated after API sync
 

1-2.What is “Latest transaction timestamp”

It refers to the most recent transaction date already uploaded to the transactions in cryptact.
The “Latest transaction timestamp” is managed for each Endpoints and can be seen on the API integration screen under the respective exchange’s API Endpoints.

Example:
For “bybit/Spot Trades,” the Latest transaction timestamp is 2025/01/05 10:05:01.
Therefore, when re-syncing, only transactions after this date will be reflected.

 

2.Sync API after uploading exchange file

When you upload an exchange file and then connect via API, the system is designed to only import transactions that occurred after the “Latest transaction timestamp” recorded in the uploaded file history, so there is no risk of double counting. Please rest assured.
Uploading Transaction History: Switching Between Exchange Files and API – Key Points
 

Example:
If you have uploaded a file for “MEXC Global/Trades” and the last transaction date in the uploaded history is “2024/6/23 19:58:41,” then when you sync via “MEXC/API,” only the transaction history after that timestamp will be reflected.

 

3.Sync API after uploading Custom file or manually

"Custom files" or "Manually added transactions" cannot be linked to transactions retrieved via API. If the same transaction history is uploaded through API, it will result in duplicate entries. Please take care to avoid this.

3-1.Upload via API Only Transactions After the Last Manually or Custom Uploaded Date

When setting up API integration, turn ON the option “Sync from a custom timestamp” and specify the start date for the transactions you want to retrieve.

 

3-2.Re-import Full Transaction History via API

Delete any transaction history added through custom files or manually added transactions before performing API integration.

Notes:

  • Once data is deleted from the transaction list, it will also be permanently removed from the server and cannot be restored.
  • Some exchanges may limit how far back transaction history can be retrieved. Please check each exchange’s API specifications before proceeding.