Skip to main content

Connect Kraken

Kraken uses one API key for spot and another for futures: the spot key trades spot and spot margin, and the futures key trades perpetuals. This guide covers how to create the keys and what to enter in Trade.

Prepare on Kraken

Create at least one of the two keys. You can skip the spot key if you only trade perpetual contracts, and the futures key if you only trade spot and spot margin.

  1. Spot key: create it in the API settings on kraken.com. Enable Funds permissions - Query, Orders and trades - Query open orders & trades, Orders and trades - Query closed orders & trades, Orders and trades - Create & modify orders and WebSocket interface - On.

  2. Futures key: create it in the API settings on Kraken Futures and choose General API: Full Access.

  3. Create keys for Trade alone. Don’t share a key with another program.

  4. If you set an IP allowlist on the key, add your Trade server’s egress IP addresses. The Add account window lists them under Server egress IPs. Choose Copy all egress IPs.

To transfer funds between your spot and futures wallets in Trade, enter both keys. Also enable the read-only Data - Query ledger entries permission on the spot key, which Trade uses to confirm that funds moved to the futures wallet have arrived, and choose Withdrawal API: Full Access on the futures key. Withdrawal API is only Kraken’s name for this permission: it can move funds from the futures wallet back to your own Kraken spot wallet and cannot send them to an outside address. If you don’t transfer in Trade, leave both disabled.

ZML Trade does not need or use withdrawal permission, so leave Funds permissions - Withdraw, Add withdrawal addresses and Update withdrawal addresses off on the spot key.

Account mode

The only account mode is Spot and futures account: one Kraken account uses two keys. The spot key trades spot and spot margin, and the futures key trades multi-collateral USD perpetuals. Each key you enter enables its markets.

Spot margin borrows when an order is placed and repays only when the position is closed to zero. A residual below the minimum order size can’t be closed with an order, so its liability stays in the account until you settle it on Kraken. While a position is open, Kraken charges a rollover fee every 4 hours.

Futures cross margin follows Kraken’s margin tiers and has no leverage setting. The leverage in a combo is applied on the exchange only when that contract is set to isolated margin on Kraken.

Enter it in Trade

In Trade, open Accounts, choose Add account and select Kraken. For the general steps, see Connect an exchange.

FieldWhat to enter
Spot API keyThe API key of your spot key
Spot Private KeyThe private key of the same spot key, pasted as is
Futures Public KeyThe public key of your futures key
Futures Private KeyThe private key of the same futures key, pasted as is
Account nameA name of your choice

Fill in the spot pair and the futures pair as complete pairs, and leave the pair you don’t use empty. Choose Verify and add.

Common questions

“Enter at least one Kraken key pair”

Enter at least one complete pair: the Spot API key with the Spot Private Key, or the Futures Public Key with the Futures Private Key. If you entered only one item of a pair, add the other.

“This API key is also being used by another program”

Create a key on Kraken for Trade alone, then save again.

Was this article helpful?