# Reality Orderbook Segmented Channel

### Description

Subscribe to real-time segmented depth data of a specified Reality (US stock) trading pair (up to 50 levels). Each price level reports onshore (internal) and offshore (external) quantities separately.

Every push is a full snapshot (`snapshot`). The depth copy is pushed every 500ms when it has changed, or every 10s when unchanged.

:::warning{title="Access requirements"}

This channel requires API Key authentication. You must contact your Business Development (BD) representative in advance to apply for whitelist access.

:::

<div className="api-aligning">

```json title="Request Example"
{
    "op": "subscribe",
    "args": [
        {
            "instType": "UTA",
            "topic": "reality-orderbook-segmented",
            "symbol": "RAAPLUSDT"
        }
    ]
}
```

### Request Parameters

| Parameters    | Type   | Required | Description                                            |
|---------------|--------|----------|----------------------------------------------------------|
| op            | String | Yes      | Operation <br/> `subscribe` Subscribe <br/> `unsubscribe` Unsubscribe |
| args          | List&lt;Object&gt; | Yes | Subscribed channel                                    |
| &gt; instType | String | Yes      | Product type <br/> Fixed to `UTA`                       |
| &gt; topic    | String | Yes      | Topic <br/> Fixed to `reality-orderbook-segmented`           |
| &gt; symbol   | String | Yes      | Symbol name <br/> e.g., `RAAPLUSDT`                       |

</div>

<div className="api-br-10"></div>

<div className="api-aligning">

```json title="Response Example"
{
  "event": "subscribe",
  "arg": {
    "instType": "UTA",
    "topic": "reality-orderbook-segmented",
    "symbol": "RAAPLUSDT"
  }
}
```

### Response Parameters

| Parameters    | Type   | Description                                              |
|---------------|--------|------------------------------------------------------------|
| event         | String | Event <br/> `subscribe` Subscribe <br/> `unsubscribe` Unsubscribe <br/> `error` Parameter error |
| arg           | Object | Subscribed channel                                          |
| &gt; instType | String | Product type <br/> Fixed to `UTA`                           |
| &gt; topic    | String | Topic <br/> Fixed to `reality-orderbook-segmented`               |
| &gt; symbol   | String | Symbol name                                                 |
| code          | String | Error code                                                  |
| msg           | String | Error message                                               |

</div>

<div className="api-br-5"></div>

<div className="api-aligning">

```json title="Push Data"
{
  "arg": {
    "instType": "UTA",
    "topic": "reality-orderbook-segmented",
    "symbol": "RAAPLUSDT"
  },
  "action": "snapshot",
  "ts": 1740000000000,
  "data": {
    "a": [
      ["227.55", "60", "20"],
      ["227.60", "200", "100"]
    ],
    "b": [
      ["227.50", "80", "20"],
      ["227.45", "250", "0"]
    ]
  }
}
```

### Push Parameters

| Return Field   | Parameter Type     | Description                                                              |
|-----------------|--------------------|---------------------------------------------------------------------------|
| arg             | Object             | Subscribed channel                                                        |
| &gt; instType   | String             | Product type <br/> Fixed to `UTA`                                          |
| &gt; topic      | String             | Topic <br/> Fixed to `reality-orderbook-segmented`                             |
| &gt; symbol     | String             | Symbol name                                                                |
| action          | String             | Data push action <br/> `snapshot` Full push                                |
| ts              | String             | Data push timestamp <br/> A Unix timestamp in milliseconds                 |
| data            | Object             | Subscribed data                                                            |
| &gt; a          | List&lt;Array&gt;  | Sell asks. Each item is [price, onshore qty, offshore qty], sorted by price in ascending order |
| &gt; &gt; a[0]   | String             | Sell price                                                                 |
| &gt; &gt; a[1]   | String             | Sell onshore (internal) quantity                                          |
| &gt; &gt; a[2]   | String             | Sell offshore (external) quantity                                         |
| &gt; b          | List&lt;Array&gt;  | Buy bids. Each item is [price, onshore qty, offshore qty], sorted by price in descending order |
| &gt; &gt; b[0]   | String             | Buy price                                                                  |
| &gt; &gt; b[1]   | String             | Buy onshore (internal) quantity                                           |
| &gt; &gt; b[2]   | String             | Buy offshore (external) quantity                                          |

</div>
