# Kraken, in the same book as everything else

URL: https://www.orla.finance/en/kraken
Markdown twin of that page. Append `.md` to any Orla page URL to get one.

A read-only key, and your Kraken history joins the ledger: fills, fees and transfers, priced when they happened.

Read only, and refused if the key can trade or withdraw. Kraken is the interesting case, and it is below.

#### The movements, not just the total

A balance answers what you have. A history answers what you owe in January.

- Spot fills arrive as two legs, what left and what arrived, with the price recorded at the moment it happened.
- Fees arrive as their own line, in the currency Kraken charged them in.
- Deposits and withdrawals arrive as transfers and are matched against your own wallets.
- The first sync reaches back to 1 January of the previous calendar year, then keeps up hourly.

#### Kraken will not say what a key can do, so we ask in a way that costs nothing

Kraken publishes no permissions, and not knowing is not a reason to accept.

- The problem: Kraken exposes no endpoint that reports the rights on an API key. Asking it directly is not an option.
- What we do instead: Two requests that cannot execute: an order in Kraken's own validate mode for a volume of zero, and a withdrawal enquiry naming an address that cannot exist on your account. Neither one can move a coin, even if the venue lets it through.
- How we read the answer: Only their complaint counts. If Kraken refuses on permission, the key cannot trade or withdraw and we accept it. If Kraken instead complains about the contents of the request, it had already let the permission through, and the key is rejected on the spot.
- Anything else: Refused. A timeout, a renamed method, an error we do not recognise: none of it is evidence, so none of it is accepted as evidence.
- Where the secret lives: Encrypted at rest once it is accepted, and never returned by our API again.

Both probes are built so the worst case is nothing happening, rather than trusting the checkbox you ticked on their site.

#### Moving your own coins is not a sale

Most tools book it as one anyway, and the bill is real.

- A withdrawal to your own wallet is matched to the arrival on the other side by transaction hash.
- Matched, the two legs become one internal move and no gain is calculated.
- Unmatched, it is left out of the disposals rather than counted as a sale.

Exchanges connect on every plan, the free one included. A plan counts the rows synced in a month, not the connections.
