Skip to main content

Kraken Integration

The Dynamic SDK provides a seamless way to transfer cryptocurrency from users’ Kraken exchange accounts to external wallets. This enables your users to fund their wallets directly from their Kraken holdings without leaving your application.

Overview

The Kraken integration consists of three functions:

Prerequisites

Before using the Kraken integration:
  1. Kraken Account Connection - Users must connect their Kraken account through Dynamic’s exchange connection flow
  2. Address Whitelisting - If enabled on the user’s Kraken account, destination addresses must be whitelisted in Kraken’s security settings
  3. Sufficient Balance - The Kraken account must have enough funds for the transfer

Quick Start

Here’s a minimal example showing the complete flow:

Understanding the Data

Account Structure

When you call getKrakenAccounts(), you receive an array of accounts, each containing multiple currency balances:

Whitelisted Addresses

Kraken users can enable address whitelisting as a security measure. When enabled, withdrawals can only go to pre-approved addresses:

Complete React Example

Here’s a production-ready React component for Kraken transfers:

Filtering Accounts by Chain

You can filter accounts to show only balances for specific blockchains:

Transfer with Network Specification

When transferring tokens that exist on multiple networks (like USDC), specify the network:

Using Idempotency Keys

Prevent duplicate transfers by providing an idempotency key:

MFA Support

If the user has MFA enabled on their Kraken account, you may need to pass an MFA code:

Error Handling

Handle common error scenarios:

Best Practices

  1. Always check balances first - Use getKrakenAccounts() to verify the user has sufficient funds before showing the transfer UI
  2. Respect whitelisting - If enforcesAddressWhitelist is true, only show whitelisted addresses as options
  3. Use idempotency keys - For production applications, always include an id parameter to prevent duplicate transfers from network retries
  4. Validate amounts client-side - Check that the transfer amount doesn’t exceed the available balance before submitting
  5. Show transfer status - Display the transfer status to users so they know their transfer is being processed
Last modified on February 2, 2026