Embed the 6MM Trading Widget: Quick Start
Embed the 6MM Trading Widget: Quick Start
Add the trading terminal to a web page with a container, the v1 script, and TradingWidget.create().
The Trading Widget SDK embeds the 6MM trading interface inside a partner-owned web page. The quickest integration requires a visible container, the production SDK script, and a call to TradingWidget.create().
Before you start
- Run the example from a web page that can load resources from
https://app.6mm.com. - Give the widget container an explicit width and height.
- Load the SDK before calling
TradingWidget.create(). - Plan the authentication flow before enabling account or trading features in production.
Minimal example
When the integration succeeds, the SDK creates an iframe inside #trading-widget and calls onReady. Capture onError during development so configuration and loading failures are visible.
SDK URLs
Set baseUrl explicitly
When testing from partner-owned pages, pass baseUrl so the iframe always points to the 6MM Web domain.
Display controls
Partner embeds hide the PC header and bottom market ticker by default. Use display when you need to show those shell areas or hide high-level containers in the embedded trading page.
Container size
For responsive layouts, keep the width fluid and set an appropriate minimum height for each breakpoint. A container with zero height can load the SDK successfully while leaving the trading interface invisible.
Verify the integration
- Confirm the SDK script returns successfully in the browser network panel.
- Confirm
onReadyfires once the iframe is initialized. - Test the configured
symbol,locale, theme, and hidden sections. - Resize the page across desktop and mobile breakpoints.
- Complete an authenticated test with a non-production user before launch.