Skip to main content
In-app swaps let users exchange tokens directly in your Sei dApp.

Overview

Swap widgets are embeddable UI components that hide the complexity of interacting with decentralized exchanges (DEXs) and liquidity aggregators. They have these benefits:
  • Users can swap tokens without leaving your dApp.
  • You do not need to redirect users to external DEX interfaces.
  • Many providers offer fee-sharing mechanisms, which can give you revenue.
  • Some widgets let users bridge assets from other chains.

Symphony swap widget

Symphony is a native DEX aggregator on Sei. It offers the simplest integration: an embedded iframe.

Quick start

Live demo

Size requirements

  • Minimum width: 377px
  • Minimum height: 650px (recommended to prevent scrolling in the wallet modal)
  • Optimal height: 680-685px

URL parameters

To customize the widget, append query parameters to the URL:

Token selection

Users can change the tokens after the widget loads.

Appearance

For hex colors, use %23 instead of # in the URL. For example, use %23FFFFFF for white.

Features

Complete example


Best practices

Security considerations

Security checklist
  • Check that iframe sources match the official domains.
  • Add Content Security Policy (CSP) headers.

Performance optimization

Responsive design

Error handling


Additional resources