Get a partner code

Embed swap.my anywhere

A drop-in iframe for any site. Cross-chain swaps with zero backend work. Earn a revenue share on every swap your visitors make.

1Get your code

Sign up and grab your referral code from your account page. That code is also your partner ID for embedding.

2Paste the iframe

Use the snippet generator below — pick your default currencies, theme, and size, then copy the snippet into your site.

3Earn on every swap

Every swap that originates through your widget is attributed to your code. You earn a cut of the fee, paid into your account balance and withdrawable in USDT, USDC, ETH, or SOL.

Configure

Without a code, swaps still work but you won't earn attribution.

Embed snippet
<iframe
  src="https://swap.my/embed?from=USDC&fromNetwork=base&to=ETH&toNetwork=ethereum"
  width="420"
  height="560"
  style="border:0;border-radius:16px;overflow:hidden"
  allow="clipboard-write"
  title="swap.my widget"
></iframe>

Live preview

This is the actual widget loaded from /embed. What you see here is what your visitors will see.

postMessage events

The widget emits events to the parent window. Listen for them to react to widget state in your app.

window.addEventListener("message", (event) => {
  if (event.origin !== "https://swap.my") return;
  const { type, payload } = event.data || {};
  switch (type) {
    case "swapmy:ready":
      // Widget loaded, currencies fetched
      break;
    case "swapmy:quote":
      // payload: { fromAmount, toAmount, rate }
      break;
    case "swapmy:order-created":
      // payload: { orderId, depositAddress, statusUrl }
      // The widget also opens statusUrl in a new tab automatically
      break;
    case "swapmy:error":
      // payload: { code, message }
      break;
  }
});

How earnings work

  • • Every swap that originates through your widget gets your partner code attributed on the order row.
  • • When the swap completes successfully, you earn a share of the platform fee — paid into your account balance.
  • • Withdraw your balance anytime in USDT, USDC, ETH, or SOL via your account page.
  • • The current default share is set platform-wide. Custom rates for high-volume partners are available — reach out via support.