> ## Documentation Index
> Fetch the complete documentation index at: https://dexbuilder.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# WebSocket 概览

> 连接事件市场 WebSocket，接收实时公开行情和认证账户事件。

事件市场 WebSocket API 提供公共行情数据和需要认证的账户更新。

## 连接

```text theme={null}
wss://broker.dexbuilder.com/ws/dex-builder/prediction
```

在同一产品的频道中复用一个连接。Prediction Markets 使用 `pred.*` 前缀，Event Contracts 使用 `ec.*` 前缀。

## 频道分组

* 公共频道：`pred.trades`、`pred.depth`、`pred.bbo`、`pred.status`、`pred.cpi`、`pred.candlestick`、`pred.oc_price`
* 私有频道：`pred.orders`、`pred.usertrades`、`pred.positions`、`pred.settlements`

公共频道不需要认证，私有频道需要 API Key 签名。请参阅[WebSocket 协议](https://dexbuilder.mintlify.site/zh/event-markets/websocket/protocol.md)、[公共频道](https://dexbuilder.mintlify.site/zh/event-markets/websocket/public-channels.md)和[私有频道](https://dexbuilder.mintlify.site/zh/event-markets/websocket/private-channels.md)。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.