XY Finance Widget (iframe)
XY Finance Widget is easy to embed into your apps and sites alike, helping engage and retain your users.
XY Finance team has been wracking our brains just to come up with a powerful engagement tool to help strengthen your user retention, making them want to come back more for a satisfying user experience that this widget provides for your website and reducing friction by letting them fast-forward into your app's/site's key functionality. Note that this Widget will be constantly renewed as we're also gathering more resources and collecting feedback from users along the way.
Get Started
Place the <iframe>
tag where you want the widget to appear, and you’re all set!
List of environments we've tested so far:
For more detailed examples, please refer to our example repository where you can find additional information.
Configuring Default Settings for the Widget
If you’d like to set default values for the widget, simply add search parameters to the URL.
For example:
Configuration
Key | Type | Default | Note |
---|---|---|---|
fromTokenAddress | String | '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE' | Use |
sourceChainId | String | '1' | Please check Supported Blockchains/Bridges/DEXs |
toTokenAddress | String | '0x77777777772cf0455fB38eE0e75f38034dFa50DE' | |
targetChainId | String | '1' | Please check Supported Blockchains/Bridges/DEXs |
amount | Number | 1 | |
slippage | String | '1' | If the difference between the estimated quote and execution price exceeds the rate (default rate 1%), the tx will be revoked. |
theme |
|
| |
lockmode |
|
| Disable user select Token |
referrer | String or null | null | For the details, please check How do referrer and commissionRate work? |
commissionRate | Number | 0 | min: For the details, please check How do referrer and commissionRate work? |
How do referrer and commissionRate work?
Setting the commissionRate will collect a fee percentage from the user's swap amount, which is then directly distributed to the specified wallet address. XY Finance will receive a share of these fees, varying according to the use case and transaction volume.
commissionRate
represents the fee you wish to collect. It is an integer between 0 and 20,000. In this range, 20,000 corresponds to 2%, 1,000 represents 0.1%, and so on in a similar fashion.referrer
parameter represents the address where you want to receive the fees. The collected fee in every transaction will be directly transferred to this address. Before proceeding, please ensure that the provided address is under your management and capable of receiving assets correctly.
Last updated