← All articles

Kraken Futures drops /withdrawal on 30 Nov. Move funds between Futures and Spot with submitWalletTransfer in Node.js/TS

If your Node.js code moves funds from Kraken Futures to Spot with POST /withdrawal, or checks transfers with GET /transfers, it needs to change. Kraken said both endpoints would be removed on 30 November 2026. The replacement is POST /transfer with spot as the source or destination wallet.

This post shows the change with @siebly/kraken-api, which added Spot support for submitWalletTransfer() in v1.1.11 (v1.1.12). It also covers how to confirm a transfer now that GET /transfers is gone.

What changed

From the 19 November 2026 Derivatives entry in the Kraken API changelog (the date moved from 17 November):

  • POST /transfer can move funds between any Futures wallet and your Kraken Spot wallet. Pass spot as fromAccount or toAccount.
  • The transfer settles before the response is sent, so there is nothing to poll.
  • A transfer to or from Spot needs an API key with the withdrawal permission. It costs 100 rate-limit units, compared with 10 for transfers between Futures wallets, and it is only available to accounts linked to a Kraken account.
  • It can fail with insufficientFunds, invalidAmount, invalidUnit, invalidCurrency or transferFailed.
  • New GET /transfer/assets lists the assets you can transfer, the minimum and maximum amounts for Spot transfers (minSpotTransferAmount, maxSpotTransferAmount), and whether MTF accounts can move each asset to Spot (allowMtfSpotTransfers). It costs 2 rate-limit units.
  • POST /withdrawal is deprecated in favour of POST /transfer with toAccount=spot.
  • GET /transfers is deprecated. It only lists transfers made through the legacy cross-exchange transfer system. Transfers made with POST /transfer appear in the account log.
  • POST /withdrawal and GET /transfers are removed on 30 November 2026.

The change in code

In @siebly/kraken-api, submitTransferToSpot() calls POST /withdrawal and is marked @deprecated. submitWalletTransfer() calls POST /transfer. Watch the parameter changes: currency becomes unit, sourceWallet becomes fromAccount, and amount is a number instead of a string.

// Before: POST /withdrawal (deprecated, removed 30 Nov 2026)
await client.submitTransferToSpot({
  currency: 'USDT',
  amount: '25',
  sourceWallet: 'cash',
});

// After: POST /transfer with toAccount 'spot'
await client.submitWalletTransfer({
  fromAccount: 'cash',
  toAccount: 'spot',
  unit: 'usdt',
  amount: 25,
});

The repository example examples/Derivatives/Private/account.ts still has an initiateWithdrawalToSpot() function that calls submitTransferToSpot(). Use submitWalletTransfer() as shown here instead.

A full transfer to Spot, with checks

The example below moves 25 USDT from the Futures cash wallet to Spot. It checks the balance and the Spot transfer limits first, makes one transfer call, and then confirms the move from the account log and the wallet balance.

import { DerivativesClient } from '@siebly/kraken-api';

// Futures API key with the withdrawal permission.
const client = new DerivativesClient({
  apiKey: process.env.KRAKEN_FUTURES_API_KEY,
  apiSecret: process.env.KRAKEN_FUTURES_API_SECRET,
});

const unit = 'usdt';
const amount = 25;

const same = (a: string, b: string) =>
  a.toLowerCase() === b.toLowerCase();

// 1. Check the source wallet and the Spot transfer limits.
async function preflight() {
  const { accounts } = await client.getAccounts();
  const cash = accounts.cash;
  if (!cash) throw new Error('No Futures cash wallet');

  const balanceKey = Object.keys(cash.balances).find((k) =>
    same(k, unit),
  );
  const balance = Number(balanceKey ? cash.balances[balanceKey] : 0);
  if (balance < amount) {
    throw new Error(`cash has ${balance} ${unit}, need ${amount}`);
  }

  const { assets } = await client.getTransferAssets();
  const asset = assets.find((a) => same(a.asset, unit));
  const min = asset?.minSpotTransferAmount;
  const max = asset?.maxSpotTransferAmount;
  if (min == null || max == null) {
    throw new Error(`${unit} cannot move to or from Spot`);
  }
  if (amount < min || amount > max) {
    throw new Error(`amount must be between ${min} and ${max}`);
  }

  return balance;
}

// Kraken's error code, e.g. insufficientFunds or transferFailed.
function krakenError(e: unknown): string | undefined {
  if (typeof e !== 'object' || e === null) return undefined;
  const body = (e as { body?: { error?: unknown } }).body;
  return typeof body?.error === 'string' ? body.error : undefined;
}

async function moveToSpot() {
  const balanceBefore = await preflight();
  const startedAt = Date.now();

  // 2. One call. It settles before the response comes back.
  try {
    await client.submitWalletTransfer({
      fromAccount: 'cash',
      toAccount: 'spot',
      unit,
      amount,
    });
  } catch (e) {
    const code = krakenError(e);
    // Do not resend blindly. Check balances and the log first.
    throw new Error(`transfer refused: ${code ?? String(e)}`);
  }

  // 3. Confirm. GET /transfers is gone, so read the account log.
  const log = await client.getAccountLog({
    since: startedAt - 60_000,
    sort: 'desc',
    count: 50,
  });

  const entry = log.logs.find(
    (l) =>
      same(l.asset, unit) &&
      Math.abs(l.old_balance - l.new_balance - amount) < 1e-8,
  );

  const { accounts } = await client.getAccounts();
  const after = Object.entries(accounts.cash?.balances ?? {}).find(
    ([k]) => same(k, unit),
  );

  console.log('balance before', balanceBefore, 'after', after?.[1]);
  if (entry) {
    console.log('log entry', entry.id, entry.info, entry.date);
  } else {
    console.warn('no matching log entry yet, check again shortly');
  }
}

moveToSpot().catch((e) => {
  console.error(e);
  process.exit(1);
});

How it works

  • Wallets. getAccounts() calls GET /accounts. The accounts object holds your Futures wallets: cash, flex, and margin accounts such as fi_xbtusd. Those names are the values fromAccount and toAccount take, plus spot for the Kraken Spot wallet. The cash wallet’s balances are strings keyed by currency. The example compares currency names without case, because Kraken’s own examples use lower-case units such as eth.
  • Limits. getTransferAssets() calls GET /transfer/assets. If minSpotTransferAmount or maxSpotTransferAmount is null, the asset can only move between Futures wallets.
  • The transfer. submitWalletTransfer() resolves once the transfer has settled. When Kraken returns result: "error", the SDK throws, and the error code is in the thrown object’s body.error.
  • Failures. Do not resend in a loop. A transfer to Spot costs 100 rate-limit units, and the docs do not say whether transferFailed leaves anything half done. Check the balance and the account log before you try again.
  • Confirming. getAccountLog() calls GET /api/history/v3/account-log. since is a Unix timestamp in milliseconds, and sort: 'desc' returns the newest entries first. The example looks for an entry in the same asset where old_balance minus new_balance equals the amount, and logs its id, info and date. Kraken’s docs list info types such as transfer and cross-exchange transfer, but they do not say which one a Spot transfer is logged under, so the example matches on asset and amount instead of filtering by info.

Moving funds back from Spot

The same call works the other way round: fromAccount: 'spot' and toAccount: 'cash', or a margin wallet. The same permission, rate-limit cost and asset limits apply.

Checklist

Symptom Likely cause Fix
Futures to Spot transfers stop working after 30 November Code still calls POST /withdrawal (submitTransferToSpot()) Use submitWalletTransfer() with toAccount: 'spot'
Transfer status check fails Code polls GET /transfers, which is removed Nothing to poll: the transfer settles before the response. Confirm with getAccountLog()
Transfer rejected for permissions Futures API key without the withdrawal permission Create a key with the withdrawal permission for this job only
invalidAmount Amount outside the Spot transfer limits Check minSpotTransferAmount and maxSpotTransferAmount from getTransferAssets()
Rate limit errors around transfers Spot transfers cost 100 units each Do not retry in a loop. Batch your moves
  • Search your code for submitTransferToSpot, /withdrawal and /transfers.
  • Rename the parameters: currency to unit, sourceWallet to fromAccount, and pass amount as a number.
  • Keep the withdrawal-permission key separate from your trading key.
  • Confirm transfers from the account log, not GET /transfers.

Further reading