How do I get my OKX API key?
- Log in to your OKX account.
- Go to the user icon, in the upper-right corner, to display the drop-down menu and select API.
- Now select "+ Create APIs" and enter a name for your API key.
- Enter a Api name like "blockpit".
- Keep "API trading" as purpose.
- Please do not use IP whitelisting for now.
- Grant the API key permissions "Read".
-
Important: Enter "Blockp!t1" as the passphrase.
- Now select "Submit all" and enter your Two-factor authentication codes.
- Click on "Show info". Your API key and Secret are now visible in the API-List.
Your Secret is now shown only once and available to copy! Do not click Complete yet.
- To import your data, you must first create an Integration in the Blockpit Web App.
To do so, click + Integration in the upper navigation. - Select OKX from the list of exchanges, and then copy the API key and the Secret into the designated fields. Confirm your entries by clicking Create.
OKX only provides the transaction history of the last 3 months via API! We recommend that you do not delete your OKX Integration after the first creation. This will ensure a consistent transaction history, at least for future transactions. For the import of your missing transaction history, a migration of your OKEx CSV data into the Blockpit template is necessary for the time being.
Which data can be imported via OKX API?
Your complete transaction history always serves as the basis for your tax report. Preferably, automatic API solutions are used to import your transactions. Our team is committed to implementing all API data provided by your exchange for you.
Using the following list, you can identify all products that are implemented:
Transactions:
Transactions older than 3 months are not available via API and have to be imported manually or via XLS template.
On-Chain Earn Transactions older than 1 month are not available via API and have to be imported manually or via XLS template.
Supported
Deposits & Withdrawals
Fee Payments
Spot Market Trades
Derivative Trades PnL (Profit, Loss, Fee and Funding)
Non-EU Earn: Rewards & Distributions (Staking, Lending, Airdrops, Bounties, Hard Forks)
In case of missing transactions, you can identify them in the history of your exchange and help our support team via ticket to include them in our import spectrum.
Not Supported
EU Earn/Grow (update: no longer available via API for EU users since 2025 - except on-chain staking)
Margin Trades
Buy Crypto via Card (Express buy)
If an import of your transactions via API is not available on exchange side, you can also add these transactions manually or by migrating your CSV data into our Excel template.
Synced Balance:
Complete import scope
If your Synced Balance is displayed incompletely, you can help our support team via ticket to include it in our import spectrum (if technically possible).
> What is the difference between Synced/Manual Integrations and Synced/Calculated Balance?
How do I solve problems with my OKX Integration?
-
Blockpit shows different Tips (indicators) in the Dashboard and your Transactions list depending on the type of problem you are facing. The following procedure can help you to solve these problems.
Please always synchronize all your integrations first using “Synce All” (Dashboard) and then start a calculation of your transaction data using “Recalculate ” (Transactions) before you analyze Tips or the performance values of your portfolio.
Product updates provided by Blockpit have no direct effect on existing transaction data in your Integration (precautionary measure to avoid changing existing transaction histories through automatic product updates), so creating a new Integration could bring it up to date and solve your problem (Tips) already.
1. Create a new Integration
Temporarily create a second Integration to be able to compare the new and old Integration. Then delete the Integration that you do not want to keep.
> How to create, sync, edit, convert, group, delete and deactivate Integrations?
Alternatively, it is possible to re-synchronize missing or incorrectly imported transactions. In order not to damage existing transaction histories and to avoid new duplicate transactions, we recommend the following article:
> How can to synchronize integrations or re-synchronize missing/incorrectly imported transactions?
2. Label or merge Unlabeled Transactions
Unlabeled transactions can be subsequently categorized with a corresponding label, edited or merged into Trades or Transfers by selecting related transaction pairs. It is also possible to change the labels of multiple similar transactions collectively (bulk edit).
> Basics on Labeling and Merging of Transactions
3. Manually edit, exclude or delete transactions
If you should still see Tips, it is possible that these were caused by incorrect transactions or transactions that were imported twice. These transactions can be edited as follows.
> Transaction Details Overview and Managing & Editing of Transactions
4. Add new transactions
If transactions have not been fully imported, you can add them individually or upload them directly to your integration using the Blockpit XLS Template.
> How to import my CSV/Excel history?
5. Continue to browse Troubleshooting category
> Overview of frequently asked questions and their solutions