Skip to content
SwapKit is a powerful suite of tools for building blockchain applications.
SwapKit logo SwapKit logo

SwapKit

Cross-chain swaps made easy

SwapKit provides everything you need to integrate blockchain functionality into your application with a single, unified API. Now with v4’s enhanced architecture and runtime flexibility.

20+ Blockchains

Support for EVM chains, Bitcoin, Cosmos ecosystem, Solana, Ripple (XRP), and more - all through one consistent interface. Explore Networks →

Multi-Wallet Support

Connect with 20+ wallets including MetaMask, WalletConnect, Ledger, Keystore, and hardware wallets. Wallet Integration →

DeFi Protocols

Built-in integrations with THORChain, Chainflip, 1inch, and other leading DeFi protocols. View API Reference →

Runtime Configuration

New in v4: Update API keys, RPC URLs, and settings at runtime without recreating your client. Learn About v4 →

// @noErrorValidation
import { createSwapKit, Chain, SwapKitApi } from "@swapkit/sdk";
const swapKit = createSwapKit();
await swapKit.connectKeystore(
[Chain.Ethereum, Chain.Bitcoin, Chain.Ripple],
"your mnemonic phrase"
);
const ethBalance = await swapKit.getBalance(Chain.Ethereum);
const btcBalance = await swapKit.getBalance(Chain.Bitcoin);
const xrpBalance = await swapKit.getBalance(Chain.Ripple);
const { routes } = await SwapKitApi.getSwapQuote({
sellAsset: "ETH.ETH",
sellAmount: "1000000000000000000",
buyAsset: "BTC.BTC",
sourceAddress: swapKit.getAddress(Chain.Ethereum),
destinationAddress: swapKit.getAddress(Chain.Bitcoin),
slippage: 3,
});
if (routes.length > 0) {
const txHash = await swapKit.swap({ route: routes[0] });
}

Unified API

One consistent API for all chains and protocols. No need to learn different interfaces for each blockchain. Essential Actions →

Production Ready

Battle-tested in production by THORSwap and other leading DeFi applications. Best Practices →

Active Development

Regular updates, new chain integrations, and responsive community support. What’s New →

Whether you’re building a simple wallet connector or a complex DeFi protocol, SwapKit has the right approach for your needs:

🚀 Quick Start

Perfect for: New developers, prototyping, learning Get up and running in minutes with the complete SDK package. - Full feature set out of the box - All wallets and chains included - Production-ready defaults Get Started →

⚡ Essential Actions

Perfect for: Basic DeFi apps, wallet integrations Learn the core functionality every SwapKit app needs. - Connect wallets across 20+ chains - Send transactions with proper fee handling - Perform cross-chain swaps Essential Actions →

🌐 Multi-Chain Focus

Perfect for: Cross-chain applications, portfolio trackers Dive deep into specific blockchain ecosystems. - EVM networks (Ethereum, Arbitrum, Polygon)

  • Bitcoin family (BTC, BCH, LTC, DOGE) - Cosmos ecosystem (ATOM, THOR, MAYA) Explore Chains →

🔧 Advanced Development

Perfect for: Custom protocols, enterprise applications Extend SwapKit with your own plugins and wallets. - Create custom plugins for new protocols

  • 🔗 Cross-Chain Swaps: Seamlessly swap assets across different blockchains
  • 💰 Multi-Chain Wallets: Manage wallets and balances across all supported chains
  • 🔐 Hardware Wallet Support: Full support for Ledger, Trezor, and KeepKey
  • 📊 Real-Time Quotes: Get accurate swap quotes from multiple DEX aggregators
  • 🛠️ Toolbox System: Low-level utilities for direct blockchain interactions
  • 🔌 Plugin Architecture: Extend functionality with custom plugins
  • 📱 Mobile Ready: Works in React Native and mobile environments
  • ⚡ Optimized Performance: Efficient caching and request batching

bash bun add @swapkit/sdk

// @noErrorValidation
import { createSwapKit } from "@swapkit/sdk";
const swapKit = createSwapKit({
config: {
apiKeys: {
swapKit: "your-swapkit-api-key",
},
},
});
// @noErrorValidation
import { createSwapKit, Chain, AssetValue, FeeOption } from "@swapkit/sdk";
const swapKit = createSwapKit();
await swapKit.connectEVMWallet([Chain.Ethereum]);
const balance = await swapKit.getBalance(Chain.Ethereum);
const assetValue = AssetValue.from({
asset: "ETH.ETH",
value: "0.1",
});
const txHash = await swapKit.transfer({
assetValue,
recipient: "0x742d35Cc6634C0532925a3b844Bc9e7595f6E321",
feeOptionKey: FeeOption.Fast,
});

Ready to Build?

Take this code for a spin in one of our live environments

Discord

Join our Discord server for support and discussions with the community.

[Join Discord →](https:

GitHub

Contribute to SwapKit development or report issues on GitHub.

[View on GitHub →](https: