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

# WebSocket Protocol

> Ondo's native WebSocket endpoint and how the SDK discovers it

Ondo exposes a native WebSocket endpoint at `wss://api.ondoperps.xyz/ws`. The SDK discovers this URL from the `wsUrl` field in the `GET /providers` response. If you're using the SDK, subscribe through [Streaming](/sdk/streaming) rather than connecting to the endpoint directly.

## Per-subscription `dex` field

When subscribing across providers, the per-subscription field that selects the venue is named `dex` (not `provider`). For Ondo the value is `ondo`.

```typescript theme={null}
await ws.subscribe(
  { channel: 'orderbook', dex: 'ondo', marketId: 'BTC-USD.P' },
  (event) => {
    // event.data: orderbook snapshot / updates
  }
);
```

See [SDK / Streaming](/sdk/streaming) for the full list of normalized channels and the subscription lifecycle.
