# SUBSCRIBE Trades

**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 `trades:ASSET` or `trades:INSTRUMENT_NAME`. Eg. `trades:ETH` or `trades: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>

* `ASSET` allowed values: `ETH`

<details>

<summary>Example</summary>

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

</details>

<br>

**RESPONSE**

```
<tr>
  <td>
    <span class="ws-small-font">data.</span>**trade\_id** <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
    Trade transaction hash. Eg. `0x17897e438f15c459a3a4ed44687dc7f0c4c678b2b005ea87bbae35346f279f02`
  </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 name. 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>**side** <span class="ws-data-type ws-small-font">object</span> <span class="ws-required-tag ws-small-font">required</span>
    Trade side. Allowed values: `buy` `sell`
  </td>
</tr>

<tr>
  <td>
    <span class="ws-small-font">data.</span>**price** <span class="ws-data-type ws-small-font">object</span> <span class="ws-required-tag ws-small-font">required</span>
    Price in USD. Eg. `12.23`
  </td>
</tr>

<tr>
  <td>
    <span class="ws-small-font">data.</span>**amount** <span class="ws-data-type ws-small-font">string</span>
    Amount of contracts. Eg. `10.4`
  </td>
</tr>

<tr>
  <td>
    <span class="ws-small-font">data.</span>**created\_timestamp** <span class="ws-data-type ws-small-font">string</span> <span class="ws-required-tag ws-small-font">required</span>
    Timestamp in UNIX timestamp in nanoseconds. Eg. `1680249600000000000`
  </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>* \*channel\*\* string required Channel name in the format `index:ASSET`. Eg. `index:ETH`</td></tr></tbody></table>

<details>

<summary>Example</summary>

```json
{
    "channel": "trades:ETH-20JAN23-1200-P",
    "data": {
        "trade_id": "0x17897e438f15c459a3a4ed44687dc7f0c4c678b2b005ea87bbae35346f279f02",
        "instrument_id": 830,
        "instrument_name": "ETH-20JAN23-1200-P",
        "instrument_type": "OPTION",
        "side": "sell",
        "price": "0.58",
        "amount": "1",
        "created_ttimestamp": "1674118637229190091"
    }
}
```

</details>

<br>


---

# 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/subcribe-trades.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.
