Skip to navigation

Trading Widget SDK

View as Markdown

Responsibility split

AreaOwnerNotes
Container creationPartner frontendProvide a visible element with explicit width and height.
iframe creationTrading Widget SDKThe SDK creates and manages the iframe.
Trading UI6MM iframeK-line, order book, order form, positions, orders, and account data run inside the iframe.
Display controlsTrading Widget SDK + 6MM iframeThe PC embed header and bottom ticker are hidden by default. Partners can use display to show shell areas or hide high-level trading containers.
Partner login checkPartner backendValidate the partner user session before issuing auth credentials.
Embed token issuancePartner backend + Agent APIRecommended for partner-token mode.

Versioning

The public integration path remains stable under the v1 script URL. The current v1 capability set includes partner-token, tokenProvider, entryUrlProvider, display controls, lifecycle events, instance methods, and order events.

<script src="https://app.6mm.com/sdk/trading-widget/v1/index.js"></script>

When to use the widget

Choose Trading Widget when a partner needs a complete trading interface inside an existing web product. Use the REST API and WebSocket documentation instead when building and maintaining a fully custom trading interface.

Implementation path

  1. Follow the Trading Widget Quick Start to load the script and create a visible container.
  2. Configure partner-token authentication through a partner backend.
  3. Add the required options and events.
  4. Use instance methods for lifecycle and runtime controls.

Verified public runtime

The public v1 script reports version 1.8.0 as of 2026-10-10. This URL is a stable major-version entry point, not a pinned build. Read TradingWidget.version and TradingWidget.capabilities in your loaded runtime before using optional features. Java Agent SDK v0.3.0 is a separate backend package.

The runtime supports a single active instance (multiInstance=false); creating another widget destroys the previous instance. Its supported locales are en, en-US, and zh-CN, independently of the 20 documentation languages.