Skip to content

Connect OKX

OKX, in one book with the bank.

A key, a secret and a passphrase, and your OKX history arrives as ledger lines with a cost basis behind them.

Read only, and refused if the key can trade or withdraw. How we check that is below.

What lands, and what does not

The spot side becomes a ledger. The derivative side stays a balance.

Only one of the two can honestly become tax rows, so the line is drawn here.

  • Spot fills become a pair of legs with the price they happened at, and the fee its own row in the currency OKX charged
  • Margin and perpetual positions are not booked as trades: a position is not a disposal, and inventing one would poison the gains report
  • Balances mirror regardless, so the total is right even where the history stops
  • Deposits and withdrawals become transfers and pair with your own wallets
  • The first sync reaches back to 1 January of the previous calendar year, then keeps up hourly

The key you give us

Three credentials, and a permission string we read before saving any of them.

OKX is the one venue that needs a passphrase as well as key and secret.

What OKX asks forThree fields, not twoAn API key, a secret and the passphrase you set when you created the key. All three are needed before anything can be read
What we ask OKXTheir own answerOKX reports the permissions on a key as a list. If that list mentions trading or withdrawal, the key is rejected outright
If the list is absentThe important halfRefused. An answer without permissions in it is treated as no answer, because a venue that renamed the field would otherwise pass every key as read only
Where the secrets liveAfter they are acceptedEncrypted at rest, all three, and never returned by our API again
If the key stops workingRotation and expirySync stops after repeated auth failures, the space owner gets one message, and you replace the credentials in place

One thing worth knowing

Withdrawing to your own wallet does not create a gain.

Paired, it is one internal move; unpaired, it is not a sale. How the pairing works.

Questions

The questions people ask before connecting.

Can Orla trade or withdraw on my OKX account?
No. OKX reports the permissions on a key as a list, and a list mentioning trading or withdrawal is rejected before the connection is created. OKX also needs a passphrase alongside the key and secret, and all three are encrypted at rest and never returned by our API.
Does it import my history or just the balance?
Both, and the history is the point. Fills, deposits and withdrawals become transactions in the ledger, so the capital gains engine can work a cost basis out by lot. The first sync reaches back to 1 January of the previous calendar year, which covers the current tax year and the one before it.
Will moving coins to my own wallet look like a sale?
No. The withdrawal is matched to the arrival on the other side, by transaction hash where the venue gives one and by coin, amount and date where it does not, and the pair becomes one internal move. An unmatched withdrawal is left out of disposals rather than counted as a sale.

Didn't find your answer? [email protected]

Read next: how crypto works in the ledger, capital gains and the tax year, what getting paid in crypto really costs.

Start

Connect OKX, and see the year add up.

Connecting an exchange is on the paid plans; the free plan holds the book, manual accounts and imports.