This page explains how to get an API key for OKX's transaction history.
Contents
1.Our Support Status for OKX
1.1 Types of transactions that can be retrieved
You can check the support status of API endpoints for exchanges on the ”Supported Exchanges & Blockchains” page.
-
For margin trading history, please note that "borrow" and "repay" records are not available via API due to exchange limitations. Kindly refer to the instructions below and upload the data manually using a custom file.
2.12 Borrowing/Returning between individuals
- As of 6th Jan 2026, since API doesn't provide enough data, and therefore, we don't support the transaction from "Shark Fin," "Seagull," and "Snowball".
If an exchange provides transaction history via API, we will automatically reflect that data. However, if the exchange does not supply certain information through API or if the provided files lack transaction details or are unclear, those transactions cannot be automatically imported. In such cases, please upload the transaction history manually using a Custom File.
Custom File for any other trades
1.2 Time period that can be retrieved
-
Only Distribution history from February 1, 2021 onward and other transaction histories from the past three months are available.
Due to the exchange’s specifications, only Distribution history from February 1, 2021 onward and other transaction histories from the past three months are available. Therefore, any transaction history before these periods cannot be automatically imported via either file upload or API. You will need to manually enter such transactions yourself by Custom File.
How to get trade history from OKX
-
Please re-sync the API manually at least once every 3 months
Transaction history older than 3 months will not be reflected, so it is necessary to perform regular API re-synchronization within that period after the first sync. (Distributions can be obtained only past 1 month)
2.How to get API Key for OKX
1. Log into OKX, click the Profile icon, and then click the "API" menu.
2. Click "Create V5 API key".

3.
①Select API trading.
②Fill in the API name field.
③Fill in the Passphrase field.
④Enter the below IP in IP address allowlist(option)
52.69.115.51,52.193.138.38,18.179.74.94
④Select "Read"in Permission.
⑤Click "Confirm".
4.Two-factor authentication
①~③Fill in Email code and Authentication app code fields and click "Confirm".
5. Take note of the API key and the Secret key displayed on the screen.
3.How to add your OKX API key to cryptact
Please select your exchange on the designated screen, enter your API key, secret key and Passphrase, then click "Submit" to initiate automatic API synchronization. If you conduct new transactions later, you'll need to manually click the "Sync" button to update your transaction history.
How to manage (add/sync) your API keys with exchanges
Disclaimer
Please note that we will not be held responsible for any damages caused by unauthorized use or other accidents due to API connections. When connecting, please be sure to use the API key specified by us.