> 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 Quick Start

<h2 id="minimal-example">
  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 URLs
</h2>

| Environment | Script URL                                                                                               |
| ----------- | -------------------------------------------------------------------------------------------------------- |
| Production  | [https://app.6mm.com/sdk/trading-widget/v1/index.js](https://app.6mm.com/sdk/trading-widget/v1/index.js) |

> **Set baseUrl explicitly**
>
> When testing from partner-owned pages, pass baseUrl so the iframe always points to the 6MM Web domain.

<h2 id="container-size">
  Container size
</h2>

| Surface | Recommended minimum |
| ------- | ------------------- |
| Desktop | 1024 x 720          |
| Mobile  | 390 x 700           |