Multi-chain

<script src="https://just.money/assets/js/widgetLib-1.1.js"></script>
<script type="application/javascript">
    JmApi.swapWidget('jmSwapFrame', {
        network: ['TRON','BSC','POLY','BTTC'],
        slippage: 0.05,
        liquidityTab: true,
        shadow: false,
        backgroundColor: '#7f8588',
        backgroundImage: 'url(/assets/img/swap-form-bg-lighter.svg);',
        textColor: '#000',
        buttonStyle: 'background:#0057f6;color:#FFF;',
        maxButtonStyle: 'background:#0057f6;color:#FFF;',
        chartBackgroundColor: '#0057f6',
        headingStyle: 'color:#0057f6;text-shadow:none',
        lightBranding: false,
        tokens: {
            TRON:[],
            BSC:[],
            POLY:[],
            BTTC:[]
        },
        fromToken: {
            TRON: "TRX",
            BSC:"USDT",
            POLY:"MATIC",
            BTTC:"TRX"
        },
        toToken: {
            TRON:"JM",
            BSC:"BNB",
            POLY:"USDT",
            BTTC:"BTT"
        },
    });
</script>
<iframe id="jmSwapFrame" src="https://just.money/widget" style="width:500px;height:500px;margin:auto;display:block;" allowtransparency="true" frameborder="0" scrolling="no"></iframe>

Or create automatically by

<script src="https://just.money/assets/js/widgetLib-1.1.js"></script>
<script type="application/javascript">
    JmApi.createSwapWidget('anyID', {
        type:'MULTICHAIN'
        network: ['TRON','BSC','POLY','BTTC'],
        slippage: 0.05,
        liquidityTab: true,
        shadow: false,
        backgroundColor: '#7f8588',
        backgroundImage: 'url(/assets/img/swap-form-bg-lighter.svg);',
        textColor: '#000',
        buttonStyle: 'background:#0057f6;color:#FFF;',
        maxButtonStyle: 'background:#0057f6;color:#FFF;',
        chartBackgroundColor: '#0057f6',
        headingStyle: 'color:#0057f6;text-shadow:none',
        lightBranding: false,
        tokens: {
            TRON:[],
            BSC:[],
            POLY:[],
            BTTC:[],
            ZENITH:[],
        },
        fromToken: {
            TRON: "TRX",
            BSC:"USDT",
            POLY:"MATIC",
            BTTC:"TRX",
            ZENITH: "BUSD"
        },
        toToken: {
            TRON:"JM",
            BSC:"BNB",
            POLY:"USDT",
            BTTC:"BTT"
        },
    });
</script>

Instead of having single network in "network" parameter you can use an array of networks. You need to also in this case specify tokens, fromToken and toToken parameters for each network like shown in the example above.

Last updated