> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.6mm.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.6mm.com/_mcp/server.

# Trading Widget SDK

<h2 id="responsibility-split">
  Responsibility split
</h2>

| Area                 | Owner                       | Notes                                                                                      |
| -------------------- | --------------------------- | ------------------------------------------------------------------------------------------ |
| Container creation   | Partner frontend            | Provide a visible element with explicit width and height.                                  |
| iframe creation      | Trading Widget SDK          | The SDK creates and manages the iframe.                                                    |
| Trading UI           | 6MM iframe                  | K-line, order book, order form, positions, orders, and account data run inside the iframe. |
| Partner login check  | Partner backend             | Validate the partner user session before issuing auth credentials.                         |
| Embed token issuance | Partner backend + Agent API | Recommended for partner-token mode.                                                        |

<h2 id="versioning">
  Versioning
</h2>

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

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