🀝DEX Integration

KaspaCom DEX allows seamless token swaps across Kaspa-compatible EVM chains. Integrate it into your application with two flexible options:

Option 1: SDK Integration (TypeScript)

For advanced or fully custom integrations, use the KaspaCom Swap SDK β€” a lightweight TypeScript library built on top of the Uniswap V2 SDK.

Overview

  • Written in TypeScript for strong typing and better developer experience.

  • Provides easy-to-use tools for implementing swap functionality in wallets or websites.

  • Powered by the Uniswap V2 SDK.

  • Compatible with custom EVM chains.

  • Supports any external wallet provider implementing EIP-1193 (e.g., MetaMask, WalletConnect, custom wallets).

  • Designed for developers who need flexibility and full control.

Option 2: Iframe Integration

The easiest and fastest way to embed the KaspaCom Swap UI into any website or web app. πŸ”— Base Iframe URL (Mainnet) πŸ”— Base Iframe URL (Testnet): Use the testnet URL for development and testing purposes. URL Parameters Customize the iframe using the following query parameters:

inputCurrency

Token address the user will swap from

outputCurrency

Token address the user will swap to

chain

Chain ID (as a number) of the target EVM network

βœ… Example

<iframe
  src="https://defi.kaspa.com/swap?inputCurrency=0x654A3287c317D4Fc6e8482FeF523Dc4572b563AA&outputCurrency=0xD33d07ccfEd8038cEd1aa393FbEf7D7dA72be20e&chain=167012"
  width="100%"
  height="600"
  style="border: none; border-radius: 12px;"
  allow="clipboard-write"
  sandbox="allow-scripts allow-same-origin"
></iframe>

This will:

  • Load the KaspaCom Swap UI

  • Preselect the token pair

  • Connect to chain ID 167012 (e.g., Kasplex Testnet

Partner Integration

Interested in integrating the KaspaCom DEX into your platform or wallet? We can enable a custom client fee and provide you with a partner key. πŸ‘‰ Reach out on Telegram to get started.

Last updated