How to download your OKX history (step-by-step guide 2026)

Víctor Lázaro

Víctor Lázaro

4 min read

How to download your OKX history (step-by-step guide 2026)

Guide to extracting your transaction history from the OKX exchange

If you use OKX and need to export your transaction history so your colvence specialist can work out your crypto tax, this guide is for you. It covers two methods: downloading CSV files and connecting by API.


Why you need your OKX history

OKX is an exchange based in the Seychelles. For Spanish tax purposes it counts as a foreign exchange.

If you hold more than €50,000 on foreign exchanges, you have to file the Modelo 721.

To calculate the gains and losses for your tax return you need:

  • the date of every buy and sell
  • the amount of crypto
  • the price at the moment of the transaction
  • the fees paid

The files you need

For a complete tax return you will need to export the following CSV files from OKX:

  1. Trading Account History — your trading record (spot, futures and so on)
  2. Funding Account History — your record of deposits, withdrawals and transfers

Note: you need both files for your tax return to be complete.


Method 1: CSV export

1. Trading Account History

  1. Sign in to okx.com
  2. Click “Assets” in the top right corner
  3. In the dropdown menu, select “My Assets”
  4. Select “Order Center”
  5. Go to “Trading Account History”
  6. Click “Download”
  7. Choose a custom date range covering your entire trading history on OKX
  8. Click “Export”

Important: the date range has to run from your first transaction to today so that nothing is left out.


2. Funding Account History

  1. Sign in to okx.com
  2. Click “Assets” in the top right corner
  3. In the dropdown menu, select “My Assets”
  4. Select “Order Center”
  5. Go to “Funding Account History”
  6. Click “Download”
  7. Choose a custom date range covering your entire history on OKX
  8. Click “Export”

Sending the documents

Gather the two exported CSV files and send them to your assigned colvence specialist so they can be processed.

Important: do not open or modify the CSV files before sending them to us. Opening them in Excel can alter the date or number formatting.


Method 2: connecting by API

For a more direct and precise connection, you can link your account by API.

Step 1: open the API settings

  1. Sign in to okx.com
  2. Click your profile icon in the top right corner
  3. In the dropdown menu, select “API”

Step 2: create the API key

  1. Enter a name for your key (for example, “colvence”)
  2. Create a passphrase — you will need to remember it later
  3. Under Permissions, tick “Read” only
  4. Click “Get code” next to the email code field
  5. Open the inbox linked to your OKX account, copy the verification code and paste it in
  6. You may also need to confirm with an authenticator app (such as Google Authenticator)
  7. Click “Confirm”

Step 3: copy the credentials

Once the key is created, copy the following somewhere safe:

  • API Key
  • API Secret Key
  • Passphrase (the one you created in the previous step)

Send these three credentials to your colvence specialist.

Security: the “Read” permission only allows account and order information to be read; it does not allow trading or withdrawals.


Summary

FilePath on OKXNotes
Trading Account HistoryAssets > My Assets > Order Center > Trading Account HistoryCustom range, CSV
Funding Account HistoryAssets > My Assets > Order Center > Funding Account HistoryCustom range, CSV

Need help with your OKX history?

At colvence we download and process your OKX history. We calculate every gain and loss using the FIFO method and prepare your tax return.

Get in touch and we will help you.

Get in touch

Share this post
OKX Tutorial CSV API Tax return Guides
Víctor Lázaro

Víctor Lázaro

Tax adviser, colvence.com

Blog

Latest news and updates

The most recent posts from our blog