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

# Websockets

> Get started with Dome Websockets

## What is Dome API?

Dome API provides comprehensive access to prediction market data across multiple platforms including Polymarket and Kalshi. Get real-time market prices, historical candlestick data, wallet analytics, order tracking, and cross-platform market matching. Get started with a free API key [here](https://dashboard.domeapi.io/).

## What are Websockets?

Dome API provides real-time data streaming through WebSocket connections, allowing you to receive live updates for market prices, trades, orderbook changes, and more without constantly polling the REST API.

## Tier Limits

Subscription and wallet tracking limits vary by tier:

| Tier | Subscriptions | Wallets per Subscription |
| - | - | - |
| **Free** | 2 | 5 |
| **Dev** | 500 | 500 |
| **Enterprise** | Custom | Custom |

## Quick Start

### 1. Get Your API Key

[Sign up](https://dashboard.domeapi.io/) for an account and get your API Key from the dashboard.

![Hero Light Pn](https://mintcdn.com/dome/IMjIL8frwMJgJNzZ/images/hero-light.png?fit=max\&auto=format\&n=IMjIL8frwMJgJNzZ\&q=85\&s=fa7ef3bac84721e7d4366ad8207f8068)

### 2. Connect to the WebSocket

Connect to the Dome API WebSocket endpoint to start receiving real-time data. Below is an example using `wscat`

`wscat -c wss://ws.domeapi.io/<API_KEY_GOES_HERE>`

### 3. WebSocket Actions

Dome API WebSockets support three main actions to manage your real-time data streams:

#### Subscribe

Subscribe to channels to start receiving real-time updates. You can filter orders by:

* **[User addresses](https://docs.domeapi.io/websockets/subscribe-users)** - Track trades from specific wallets or use a wildcard for all trades
* **[Condition IDs](https://docs.domeapi.io/websockets/subscribe-condition-ids)** - Track trades for specific market conditions
* **[Market slugs](https://docs.domeapi.io/websockets/subscribe-market-slugs)** - Track all trades within specific markets

```json theme={null}
{
    "action": "subscribe",
    "platform": "polymarket",
    "version": 1,
    "type": "orders",
    "filters": {
        "users": ["0x6031b6eed1c97e853c6e0f03ad3ce3529351f96d"]
    }
}
```

[Learn more about subscribing →](https://docs.domeapi.io/websockets/subscribe.md)

#### Update

Update an existing subscription's filters without creating a new subscription:

```json theme={null}
{
    "action": "update",
    "subscription_id": "sub_k7f5hgr7wy",
    "platform": "polymarket",
    "version": 1,
    "type": "orders",
    "filters": {
        "users": ["0x6031b6eed1c97e853c6e0f03ad3ce3529351f96d"]
    }
}
```

[Learn more about updating subscriptions →](https://docs.domeapi.io/websockets/update.md)

#### Unsubscribe

Stop receiving updates from a subscription:

```json theme={null}
{
    "action": "unsubscribe",
    "version": 1,
    "subscription_id": "sub_wjhhq8dny2"
}
```

[Learn more about unsubscribing →](https://docs.domeapi.io/websockets/unsubscribe.md)

## Need Help?

* Email: [Support Email](mailto:support@domeapi.com)
* Join our [Discord](https://discord.gg/fKAbjNAbkt) community
* Check out our SDKs: [TypeScript](https://github.com/kurushdubash/dome-sdk-ts) | [Python](https://github.com/kurushdubash/dome-sdk-py)


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