createKrakenExchangeTransfer
Creates a transfer from a Kraken exchange account to an external wallet address. This allows users to withdraw cryptocurrency from their Kraken holdings to a wallet they control. Before calling this function, usegetKrakenAccounts to get the accountId and verify available balance, and getKrakenWhitelistedAddresses to check if the destination address is valid.
Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
accountId | string | The Kraken account ID to transfer from. Get this from getKrakenAccounts(). |
to | string | The destination wallet address. Must be whitelisted if the user has address whitelisting enabled. |
amount | number | The amount to transfer. |
currency | string | The cryptocurrency to transfer (e.g., 'ETH', 'BTC', 'USDC'). |
description | string (optional) | A description for the transfer. |
network | string (optional) | Network name (e.g., 'ethereum', 'polygon'). |
networkObject | object (optional) | Network details with chainName and networkId. Use this for multi-network tokens. |
networkObject.chainName | string | The chain name (e.g., 'EVM'). |
networkObject.networkId | string | The network ID (e.g., '1' for Ethereum mainnet, '137' for Polygon). |
mfaCode | string (optional) | MFA code if required by the user’s Kraken account settings. |
id | string (optional) | Idempotency key to prevent duplicate transfers on retry. |
client | DynamicClient (optional) | The Dynamic client instance. Only required when using multiple clients. |
Returns
Promise<ExchangeTransferResponse> - A promise that resolves to the transfer details:
Transfer Status Values
| Status | Description |
|---|---|
pending | Transfer has been submitted and is being processed |
completed | Transfer has been successfully completed |
failed | Transfer failed (check error details) |
Examples
Basic transfer
Transfer USDC on a specific network
When transferring tokens that exist on multiple networks, specify the target network:Transfer with MFA
If the user has MFA enabled on their Kraken account:Idempotent transfers
Use an idempotency key to safely retry failed requests without creating duplicate transfers:Complete transfer flow with validation
React component with transfer form
Handle transfer errors
Prerequisites
- User must have connected their Kraken account through Dynamic
- The destination address must be whitelisted in Kraken if the user has address whitelisting enabled
- The Kraken account must have sufficient balance for the transfer
Notes
- Transfers are processed by Kraken and may take time to complete depending on network conditions
- The
statusfield indicates the current state of the transfer - Use idempotency keys (
idparameter) in production to prevent duplicate transfers from network retries - For tokens on multiple networks (like USDC), always specify the
networkObjectto ensure the transfer goes to the correct chain
Related
getKrakenAccounts- Get user’s Kraken account balancesgetKrakenWhitelistedAddresses- Get whitelisted withdrawal addresses- Kraken Integration Guide - Complete integration overview