# SUBSCRIBE Orderbook

**UPDATE TIME**

**Real Time**

**REQUEST**

```
<tr>
  <td>
    * \*data\*\* <span class="ws-data-type ws-small-font">array of strings</span>  <span class="ws-required-tag ws-small-font">required</span>
      Channel name in the format `orderbook:SYMBOL`. Eg. `orderbook:ETH-31MAR23-1350-C`
  </td>
</tr>
```

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><pre><code>  &#x3C;/th>
&#x3C;/tr>
</code></pre></td></tr><tr><td>* \*op\*\* string required Operation code allowed values: `subscribe` `unsubscribe`</td></tr></tbody></table>

<details>

<summary>Example</summary>

```json
{
    "op":"subscribe", 
    "data": ["orderbook:ETH-31MAR23-1350-C"]
}
```

<br>

**RESPONSE**

<table data-header-hidden><thead><tr><th></th></tr></thead><tbody><tr><td><pre><code>    &#x3C;/th>
  &#x3C;/tr>
&#x3C;/thead>

\<tbody>
\<tr>
\<td>
\* \*channel\*\* \<span class="ws-data-type ws-small-font">string\</span>  \<span class="ws-required-tag ws-small-font">required\</span>
Channel name in the format `orderbook:INSTRUMENT_NAME`. Eg. `orderbook:ETH-31MAR23-1350-C`
\</td>
\</tr>

\<tr>
\<td>
\<span class="ws-small-font">data.\</span>**type** \<span class="ws-data-type ws-small-font">string\</span> \<span class="ws-required-tag ws-small-font">required\</span>
Type of orderbook message. Allowed values: `snapshot` `update`
\</td>
\</tr>

\<tr>
\<td>
\<span class="ws-small-font">data.\</span>**instrument\_id** \<span class="ws-data-type ws-small-font">string\</span> \<span class="ws-required-tag ws-small-font">required\</span>
Instrument ID number. Eg. `12`
\</td>
\</tr>

\<tr>
\<td>
\<span class="ws-small-font">data.\</span>**instrument\_name** \<span class="ws-data-type ws-small-font">string\</span> \<span class="ws-required-tag ws-small-font">required\</span>
Instrument symbol. Eg. ` ETH-24DEC22-1250-C`
\</td>
\</tr>

\<tr>
\<td>
\<span class="ws-small-font">data.\</span>**instrument\_type** \<span class="ws-data-type ws-small-font">string\</span> \<span class="ws-required-tag ws-small-font">required\</span>
Type of instrument. Allowed values: `OPTION` `PERPETUAL`
\</td>
\</tr>

\<tr>
\<td>
\<span class="ws-small-font">data.\</span>**bids** \<span class="ws-data-type ws-small-font">array of arrays\</span> \<span class="ws-required-tag ws-small-font">required\</span>
Array of 3 elements - price in USD, contract amount and order IV. Eg.`[["1", "10", "0.75"]]`
\</td>
\</tr>

\<tr>
\<td>
\<span class="ws-small-font">data.\</span>**asks** \<span class="ws-data-type ws-small-font">array of arrays\</span> \<span class="ws-required-tag ws-small-font">required\</span>
Array of 3 elements - price in USD, contract amount and order IV. Eg.`[["1", "10", "0.85"]]`
\</td>
\</tr>

\<tr>
\<td>
\<span class="ws-small-font">data.\</span>**last\_updated** \<span class="ws-data-type ws-small-font">string\</span> \<span class="ws-required-tag ws-small-font">required\</span>
Last updated timestamp in UNIX timestamp in nanoseconds. Eg. `1680249600000000000`
\</td>
\</tr>

\<tr>
\<td>
\<span class="ws-small-font">data.\</span>**checksum** \<span class="ws-data-type ws-small-font">string\</span> \<span class="ws-required-tag ws-small-font">required\</span>
Payload checksum. Eg. `1321749405`
\</td>
\</tr>
\</tbody> </code></pre></td></tr></tbody></table>

</details>

<details>

<summary>Example</summary>

```json
{
    "channel": "orderbook:ETH-31MAR23-1350-C",
    "data": {
        "type": "update",
        "instrument_id": "165",
        "instrument_name": "ETH-31MAR23-1350-C",
        "instrument_type": "OPTION",  
        "bids": [
            [
                "1",
                "10",
                "0.75"
            ]
        ],
        "asks": [
            [
                "10",
                "1",
                "0.85"
            ]
        ],
        "last_updated": "1673436052887313432",
        "checksum": "1321749405"
    }
}
```

<br>

> 📘 Note!
>
> Bid or ask contract amount can be 0. This indicates that the price level has been removed from the orderbook.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aevo.xyz/api-reference/websocket-api/public-operations/subscribe.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
