> For the complete documentation index, see [llms.txt](https://docs.aevo.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aevo.xyz/api-reference/websocket-api/public-operations/subscribe.md).

# 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>
&#x3C;tbody>
&#x3C;tr>
&#x3C;td>
* *channel** &#x3C;span class="ws-data-type ws-small-font">string&#x3C;/span>  &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
Channel name in the format orderbook:INSTRUMENT_NAME. Eg. orderbook:ETH-31MAR23-1350-C
&#x3C;/td>
&#x3C;/tr>
&#x3C;tr>
&#x3C;td>
<strong>&#x3C;span class="ws-small-font">data.&#x3C;/span>type &#x3C;span class="ws-data-type ws-small-font">string&#x3C;/span> &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
</strong>Type of orderbook message. Allowed values: snapshot update
&#x3C;/td>
&#x3C;/tr>
&#x3C;tr>
&#x3C;td>
<strong>&#x3C;span class="ws-small-font">data.&#x3C;/span>instrument_id &#x3C;span class="ws-data-type ws-small-font">string&#x3C;/span> &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
</strong>Instrument ID number. Eg. 12
&#x3C;/td>
&#x3C;/tr>
&#x3C;tr>
&#x3C;td>
<strong>&#x3C;span class="ws-small-font">data.&#x3C;/span>instrument_name &#x3C;span class="ws-data-type ws-small-font">string&#x3C;/span> &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
</strong>Instrument symbol. Eg.  ETH-24DEC22-1250-C
&#x3C;/td>
&#x3C;/tr>
&#x3C;tr>
&#x3C;td>
<strong>&#x3C;span class="ws-small-font">data.&#x3C;/span>instrument_type &#x3C;span class="ws-data-type ws-small-font">string&#x3C;/span> &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
</strong>Type of instrument. Allowed values: OPTION PERPETUAL
&#x3C;/td>
&#x3C;/tr>
&#x3C;tr>
&#x3C;td>
<strong>&#x3C;span class="ws-small-font">data.&#x3C;/span>bids &#x3C;span class="ws-data-type ws-small-font">array of arrays&#x3C;/span> &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
</strong>Array of 3 elements - price in USD, contract amount and order IV. Eg.[["1", "10", "0.75"]]
&#x3C;/td>
&#x3C;/tr>
&#x3C;tr>
&#x3C;td>
<strong>&#x3C;span class="ws-small-font">data.&#x3C;/span>asks &#x3C;span class="ws-data-type ws-small-font">array of arrays&#x3C;/span> &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
</strong>Array of 3 elements - price in USD, contract amount and order IV. Eg.[["1", "10", "0.85"]]
&#x3C;/td>
&#x3C;/tr>
&#x3C;tr>
&#x3C;td>
<strong>&#x3C;span class="ws-small-font">data.&#x3C;/span>last_updated &#x3C;span class="ws-data-type ws-small-font">string&#x3C;/span> &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
</strong>Last updated timestamp in UNIX timestamp in nanoseconds. Eg. 1680249600000000000
&#x3C;/td>
&#x3C;/tr>
&#x3C;tr>
&#x3C;td>
<strong>&#x3C;span class="ws-small-font">data.&#x3C;/span>checksum &#x3C;span class="ws-data-type ws-small-font">string&#x3C;/span> &#x3C;span class="ws-required-tag ws-small-font">required&#x3C;/span>
</strong>Payload checksum. Eg. 1321749405
&#x3C;/td>
&#x3C;/tr>
&#x3C;/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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
