Rubic logo
Configuration
From Chain
Ethereum
From Token
To Chain
Ethereum
To Token
Initial amount
Clue
Can be used to specify the initial trade amount
Advanced SettingsArrow
Installation
See full instruction on GitHub
<!-- 1. Place this script tag on the <head> of your page: -->

<script type="text/javascript" src="https://new-widgets.rubic.exchange/iframe/bundle.new-app.min.js"></script>


<!-- 2. Place this div tag at the location where the Rubic Widget will be:  -->

<div id="rubic-widget-root"></div>


<!-- 3. Place this script tag at the bottom of <body>: -->

<script defer type="text/javascript">
    // describe widget configuration and saving to a global variable for future use
    var configuration = {
        from: 'ETH',
        to: '0x3330BFb7332cA23cd071631837dC289B09C33333',
        fromChain: 'ETH',
        toChain: 'ETH',
        amount: 1,
        iframe: 'true',
        hideSelectionFrom: false,
        hideSelectionTo: true,
        hideTokenSwitcher: false,
        theme: 'dark',
        injectTokens: {
            'eth': [
                '0x3330BFb7332cA23cd071631837dC289B09C33333'
            ]
        },
        slippagePercent: {
            instantTrades: 2,
            crossChain: 5
        },
        crossChainIntegratorAddress: '',
        onChainIntegratorAddress: '',
        whitelistOnChain: [],
        blacklistOnChain: [],
        whitelistCrossChain: [],
        blacklistCrossChain: []
    }

    // prevent accidental changes to the object, for example, when re-creating a widget for another theme
    Object.freeze(configuration);

    // create widget
    rubicWidget.init(configuration);
</script>