> 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 快速开始

<h2 id="minimal-example">
  最小示例
</h2>

```html
<div id="trading-widget" style="width: 100%; height: 720px"></div>

<script src="https://app.6mm.com/sdk/trading-widget/v1/index.js"></script>
<script>
  const widget = TradingWidget.create('#trading-widget', {
    baseUrl: 'https://app.6mm.com',
    symbol: 'BTCUSDT',
    theme: 'dark',
    locale: 'en',
    layout: 'default',
    onReady(event) {
      console.log('ready', event)
    },
    onError(error) {
      console.error('error', error)
    },
  })
</script>
```

<h2 id="sdk-urls">
  SDK 地址
</h2>

| 环境   | Script 地址                                                                                                |
| ---- | -------------------------------------------------------------------------------------------------------- |
| 生产环境 | [https://app.6mm.com/sdk/trading-widget/v1/index.js](https://app.6mm.com/sdk/trading-widget/v1/index.js) |

> **显式设置 baseUrl**
>
> 在 Partner 自己页面测试时，建议传 baseUrl，确保 iframe 始终指向 6MM Web 域名。

<h2 id="container-size">
  容器尺寸
</h2>

| 端   | 建议最小尺寸     |
| --- | ---------- |
| 桌面端 | 1024 x 720 |
| 移动端 | 390 x 700  |