Rubic logo
Configuration
Theme
Dark
Background
Language
English
From amount
Clue
Can be used to specify the initial trade amount
From blockchain
Ethereum
From token
To blockchain
Ethereum
To token
Hide selection from
Hide selection to
Clue
Allows you to lock the token selection in the widget
Fee
Not set
Fee receiver address
Clue
Wallet address to receive the fees
Advanced Settings
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: '0xa4eed63db85311e22df4473f87ccfc3dadcfa3e3',
        fromChain: 'ETH',
        toChain: 'ETH',
        amount: 1,
        iframe: 'flex',
        hideSelectionFrom: false,
        hideSelectionTo: true,
        theme: 'dark',
        background: '#28372e',
        injectTokens: {
            'eth': [
                '0xa4eed63db85311e22df4473f87ccfc3dadcfa3e3'
            ]
        },
        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>