How to import data via OKX API key?

 How do I get my OKX API key?

  1. Log in to your OKX account.
  2. Go to the user icon, in the upper-right corner, to display the drop-down menu and select API.
  3. Now select "+ Create APIs" and enter a name for your API key.
  4. Enter a Api name like "blockpit".
  5. Keep "API trading" as purpose.
  6. Please do not use IP whitelisting for now.
  7. Grant the API key permissions "Read".
  8. Important: Enter "Blockp!t1" as the passphrase.



  9. Now select "Submit all" and enter your Two-factor authentication codes.
  10. 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.



  11. To import your data, you must first create an Integration in the Blockpit Web App.
    To do so, click + Integration in the upper navigation.
  12. 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:

icon-clock.svg Transactions older than 3 months are not available via API and have to be imported manually or via XLS template.

icon-clock.svg On-Chain Earn Transactions older than 1 month are not available via API and have to be imported manually or via XLS template.

Supported

check.pngDeposits & Withdrawals
check.png Fee Payments
check.png Spot Market Trades
check.png Derivative Trades PnL (Profit, Loss, Fee and Funding)
check.png 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

x.png EU Earn/Grow (update: no longer available via API for EU users since 2025 - except on-chain staking)
x.png Margin Trades
x.png 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:

check.png 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?

> Which assets does Blockpit support & Why is the value of some assets not displayed in the Dashboard?

 

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.

    Sync all.png  Recalculate.png


    1. Create a new Integration

    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.

    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

    03-Merge-to-Transfer.gif

     

    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

 

 

Will OKX automatically deduct the tax for me?

Was this article helpful?