Skip to content

Swap Widget

Overview

This documentation provides instructions for web developers to seamlessly integrate our swap widget into their webpages using an iframe.

Prerequisites

Before integrating the widget, ensure that you have the following:

  • Access to the HTML of the page you will be adding the widget to
  • Your referral codes generated and accessible.

Instructions

Adding the swap widget is really simple. Just add the following iframe code to the HTML of your webpage where you want the widget to appear.

Remember to replace the placeholder with your referral code.

html
<iframe
  src="https://widget-xdefi.netlify.app/?widget=true&referral=YOUR_REFERRAL_CODE"
  width="500px"
  height="700px"
  frameborder="0"
  style="border: none"
></iframe>

Configuration

You can configure the width and height of the widget to fit your page content by adjusting the width and height parameters in the iframe tag.