▪️iFrame
What is an iFrame
An inline frame or iframe is a HTML element that loads another HTML page within a parent page. Consider it somewhat like a 'window' on your webpage displaying another webpage within it. In our case, the 'window' showcases the Houdini Swap widget, which allows your users to utilize our services without leaving your site. It also automatically adds your Account ID to identify and apportion your revenue share earned on all transactions that originate from your iframe.
Step-by-Step Integration
Step 1 - Inert the HTML Code
To embed the HoudiniSwap widget on your webpage, copy and paste the code snippet below:
Parameters Explained
theme: Adjust the theme by selecting "dark" or "light". Modify the iframe background in css to
#333
for theme=dark andwhite
for theme=light.tokenIn & tokenOut: Preset the default trading pair. A comprehensive list of tokens is here.
Here is a list of the most common tokens.
Tokens | Tokens | Tokens | Tokens | Tokens |
---|---|---|---|---|
LOCK | ETH | BNB | BTC | XMR |
ARB | ETHBASE | MATIC | OP | TRP |
USDC | USDT | XRP |
amount: Decide on a preset amount of tokenIn. You can input any number here.
anonymous: Choose between "true" or "false" based on default anonymity preferences. False is most commonly used when bridging/swapping is the core purpose.
partnerId: Replace
[INSERT KEY]
with your unique key. To apply for a key, please contact us via Partnership Enquiries.accountId: Optionally, input your Referral ID to earn your revenue share. If you haven't yet set up your account please contact us via Partnership Enquiries.
receiveAddress: Ensure the address corresponding to
tokenOut
is validtokenLockOut: Select either "true" or "false". True will restrict users from modifying the chosen
tokenOut
. This is commonly used for protocols implementing a cross-chain swapping solution specifically for their token.
Step 2 - Style the iFrame
To have the HoudiniSwap widget fit with your website design theme, we recommend integrating the following CSS styles:
Conclusion
In two straightforward steps, you have now embedded the Houdini Swap widget into your site, enhancing your user experience with our services.
If you have any questions or if you need further guidance, please don't hesitate to contact us via Partnership Enquiries.
☎️pageCONTACT USLast updated