Embed the PulseSwap widget

Updated August 20263 min readView as Markdown

One iframe puts the whole PulseSwap swap card on your site — best-rate quotes across every DEX & aggregator it routes through, wallet connect, and the swap itself, without sending your users anywhere. No key, no registration, no rate limit.

Live demo

This is the real widget, loaded from the URL in the snippet below. Try it.

Copy-paste snippet

HTML
<iframe
  title="PulseSwap"
  src="https://pulseswap.io/?embed=true&chain=pulsechain&from=0x0000000000000000000000000000000000000000&to=0x95B303987A60C71504D99Aa1b13B4DA07b0790ab"
  width="420"
  height="640"
  style="border:0;border-radius:24px"
  loading="lazy">
</iframe>

Both spellings work. embed=yes and embed=true are accepted everywhere — the pre-paint script in _document.js, the layout and the useSwapParams hook all treat the two identically, so a snippet written either way hides the site chrome and puts the app itself in embed mode.

Always pass chain in a deep link. Without it the URL normalizer rewrites the query to its default (chain=pulsechain plus the native from) and your to token is dropped. The snippet above passes chain=pulsechain for exactly that reason — keep it whenever you preselect from, to or amount.

URL parameters

ParamWhat it doesExample
embedenables embed modeTurns on embed mode: hides the site chrome and the SEO block, leaving just the swap card. Accepts true or yes.embed=true
chainrequired for deep linksPreselects the network. A URL that carries nothing else defaults to pulsechain — but it is required whenever you pass from, to or amount, because the normalizer rewrites a chain-less swap URL and drops to.chain=ethereum
fromoptionalSell-token contract address. The zero address selects the chain's native coin.from=0x0000…0000
tooptionalBuy-token contract address.to=0x95B3…90ab
amountoptionalPrefills the sell amount, in whole token units.amount=1000
borderoptionalno drops the card border and its shadow, for a seamless embed on a coloured background.border=no
Every parameter above is read straight from the live parameter hook — src/hooks/useSwapParams.tsx — including the ones the older docs got wrong.

Theming & sizing

The widget picks its own theme: a stored choice first, otherwise the visitor's system setting, so it lands dark on a dark OS and light on a light one without a parameter. It is responsive down to 320px wide, and 640px of height is the recommended minimum — enough for the amount rows, the route list and the action button without the frame scrolling.

Piteas is one of the partners PulseSwap routes through, and its quote API is origin-whitelisted. It answers requests coming from the pulseswap.io origin, so it works on the live site and inside your embedded widget — a local curl or a page opened from localhost gets a 403 and simply shows one route fewer. Nothing to configure on your side.
Embedded swaps use the same engine as pulseswap.io: identical rates, and the same 11 DEXes & aggregators on PulseChain.
About PulseSwap

Put the PulseSwap swap widget on your site

One iframe gives your users best-rate quotes across every DEX & aggregator PulseSwap routes through, wallet connect and swap execution, without leaving your page. No key, no registration, and the same rates as pulseswap.io itself.