Options & Events
Options & Events
Initialization options, runtime events, and common error codes.
Options
| Field | Type | Default | Notes |
|---|---|---|---|
| baseUrl | string | SDK script origin | iframe domain. Pass explicitly in partner pages. |
| symbol | string | BTCUSDT | Normalized to uppercase and strips - / _. |
| theme | dark | light | dark | Initial theme parameter. |
| locale | en | en-US | zh-CN | Browser/default | English and Simplified Chinese are supported. |
| layout | default | compact | default | Reserved layout option. |
| auth | object | none | Use partner-token for new SSO integrations. |
Events
| Event | Trigger |
|---|---|
| ready | iframe initialization finished. |
| error | SDK, iframe, or authentication error. |
| state_changed | SDK lifecycle state changed. |
| auth_state_changed | partner-token auth state changed. |
| symbol_changed | Actual iframe symbol changed. |
| locale_changed | Actual iframe locale changed. |
| order_created | User created an order inside the iframe. |
| order_failed | Order submission failed. |
| destroyed | SDK instance destroyed. |