This article explains what you need to be aware of when you are establishing an API connection.
1. Check the date when establishing a connection
1.1 You previously fetched trade history using an API but you accidentally deleted the connection. You want to re-establish the connection using the same API.
If you previously have fetched trade history using the same API, the new connection would only fetch any new trades since the last sync time. If you don't have any trade history previously fetched by the API, then you can specify a custom timestamp you want to sync from.
1.2 For the same trade type, you previously uploaded trade history using exchange files.
If you previously have uploaded trade history for the same trade type using exchange files, the API would only fetch any new trades since the most recent timestamp to avoid duplicate trades. For more details, please refer to the below article.
How to leverage both exchange files and API to load trade history
1.3 You previously uploaded trade history using custom files
Cryptact cannot link the trades uploaded using custom files to the trades fetched via the API. When you establish the API connection, you will end up with duplicate trades.
If you wish to upload all trade history using the API instead of using custom files going forward, please follow the below steps.
① Delete trade history that was uploaded via custom files:
[Method 1] Delete all trade history that was uploaded via custom files
Please refer to How to delete trade history.
[Method 2] Delete specific trades from the screen:
Please refer to How to add/edit/delete transactions manually from the screen.
② Establish the API connection
Please refer to How to use API connectivity with exchanges.
1.4 You previously added trades manually from the screen
Cryptact cannot link the trades that were added manually from the screen to the trades fetched via the API. When you establish the API connection, you will end up with duplicate trades.
If you wish to upload all trade history using the API instead of manually adding going forward, please follow the below steps.
① Delete manually added trades
[Method 1] Delete all trades that were manually added:
Please refer to How to delete trade history.
[Method 2] Delete specific trades from the screen:
Please refer to How to add/edit/delete transactions manually from the screen.
② Establish the API connection
Please refer to How to use API connectivity with exchanges.