Rubic logo
Configuration
Theme
Dark
Background
Language
English
Initial amount
Clue
Can be used to specify the initial trade amount
Initial blockchain
Ethereum
Initial token
Destination blockchain
Ethereum
Destination token
Hide selection from
Hide selection to
Clue
Allows you to lock the token selection in the widget
Hide token switcher
Fee
Not set
Fee receiver address
Clue
Wallet address to receive the fees
To receive commissions for cross-chain transactions, contact us to add the address to the white list
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://widgets.rubic.exchange/iframe/bundle.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: 'flex',
        hideSelectionFrom: false,
        hideSelectionTo: true,
        tokenSearch: true,
        rubicLink: true,
        theme: 'dark',
        background: '#28372e',
        injectTokens: {
            'eth': [
                '0x3330BFb7332cA23cd071631837dC289B09C33333'
            ]
        },
        slippagePercent: {
            instantTrades: 2,
            crossChain: 5
        }
    }

    // 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>