> For the complete documentation index, see [llms.txt](https://docs.zofinance.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zofinance.io/building-on-zo/trading-widget.md).

# Trading Widget

#### Overview

The ZO Trading Widget (@zofai/trading-widget) is an embeddable perpetuals trading UI for ZO Finance on Sui.It lets you drop a full-featured trading interface into your dapp:

* Market header – Symbol selector, mark price, funding rate
* Price chart – Pyth-powered OHLC with live updates
* Recent trades – Live trade feed
* Trade panel – Open/close positions (market & limit) on ZLP / SLP / USDZ
* Positions / Orders / History – Bottom tabs, each with a countdown to next refresh
* RPC settings – Predefined or custom RPC URL with latency checks
* Wallet – Sui wallet connect via @mysten/dapp-kit-react and an account sidebar

You can either:

* Use the full widget as a single component, or
* Compose custom layouts using the exported components and hooks.
