iExchange
iExchange Developer Docs

Configuration Reference

All settings are passed via the clientOptions object when calling QuickTradeWidget.createWidget({ … }).

OptionTypeDefaultDescription
env'testnet' | 'mainnet''testnet'Backend environment & RPC selection
defaultChainIdnumber84532Chain the widget should connect to initially
defaultCurrencystring'GHS'Fiat currency code for pricing
defaultTokenstring'USDC'ERC-20 symbol to trade against
walletClientWalletClient (optional)undefinedInject a pre-connected viem WalletClient

Widget-specific props:

PropTypeDefaultDescription
themeMode'light' | 'dark''light'Force theme; respects system if omitted
styleReact.CSSProperties{}Custom styles for the outer container
variant'modal' | 'embedded''modal'Rendering mode. Embedded requires a container.
containerNodeOrSelectorHTMLElement | stringOnly for variant: 'embedded' – target container

⚠️ Changing clientOptions after instantiation is not reactive. Destroy and recreate the widget to apply new values.

Example

const widget = QuickTradeWidget.createWidget({
  clientOptions: {
    env: "testnet",
    defaultChainId: 534353,
    defaultCurrency: "USD",
    defaultToken: "USDT",
  },
  themeMode: "dark",
  variant: "embedded",
  containerNodeOrSelector: "#iexchange-widget-container",
});