Wat je nodig hebt Een account op OKX Een account op Cryptotax (zie account aanmaken ) Stap 1: Maak een API-sleutel aan op OKX Log in op OKX en open het menu bij je profiel. Kies API en maak een nieuwe…
What you need
- An account on OKX
- An account on Cryptotax (see create account)
Step 1: Create an API key on OKX
- Log in to OKX and open the menu at your profile.
- Choose API and create a new API key (Create V5 API key).
- Give the key a name, for example "Cryptotax".
- Choose a passphrase yourself. You need it in Cryptotax in a moment.
- Under permissions, tick only Read.
- Confirm with your two-factor authentication.
Which permissions do you need
Give the key only the Read permission. Do not tick Trade or Withdraw. Cryptotax only reads and cannot buy, sell or transfer anything.
The passphrase
OKX asks for a passphrase for every API key. You choose it yourself when you create the key and OKX does not show it again afterwards. Keep it together with the API key and the secret key. Lost the passphrase? It cannot be retrieved: create a new API key.
Also note the API key and the secret key right away. OKX shows the secret key only once.
An IP restriction is optional
OKX lets you restrict the key to certain IP addresses. That is not required. If you leave the list empty, the connection works right away. If you do set a list, the IP address of Cryptotax must be on it, otherwise OKX rejects the request. See a failed exchange connection.
Step 2: Enter the key in Cryptotax
- Log in to Cryptotax and go to My sources.
- Click Add source, choose Exchange and then OKX.
- Paste your API key, your secret key and your passphrase into the correct fields.
- Click Connect OKX.
You do not have to choose a region. Cryptotax tests your key automatically on OKX Europe (the entity for Belgian users, my.okx.com) and then on the international OKX site, and remembers where it works.
Step 3: Synchronise your transactions
After saving the key, synchronisation starts automatically. Depending on the number of transactions this takes a few seconds to minutes.
What does Cryptotax import from OKX
- Funding account: deposits, withdrawals, conversions, earn rewards and airdrops, from 1 February 2021.
- Trades (trading account): the last 3 months. OKX does not release older trades through the API.
Older trades: import a CSV
Did you trade on OKX more than 3 months ago? Then those trades are missing after the connection. Fill them in with an export:
- Log in to OKX and open your trade history (Trading history).
- Export the missing period as a CSV file.
- Import the file into Cryptotax via CSV import, just like for other exchanges.
Export only the period from before the last 3 months: that part already comes in through the API.
Important notes
- Connect your OKX account only once.
- Cryptotax supports keys from OKX Europe and from the international OKX site. A key from another OKX entity (for example OKX US) does not work.
- Trades made through sub-accounts are not read through the API. Use a CSV export for those.
Troubleshooting
- Message about invalid API credentials or a wrong passphrase: check the API key, the secret key and the passphrase. Watch out for extra spaces and swapped fields. If you no longer know the passphrase, create a new key.
- Message that the key also has trade or withdraw permission: Cryptotax refuses keys that can do more than read. Create a new key with only the Read permission.
- Message about missing permissions: check that the key has the Read permission.
- IP not allowed: remove the IP restriction on the key or add the IP address of Cryptotax.
- Trades from more than 3 months ago are missing: import the trade history as a CSV, see above.