> For the complete documentation index, see [llms.txt](https://docs.unix.market/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.unix.market/websocket/public-channels/trade.md).

# Trade

Push trades as a batch, one push per block, containing every trade that filled in that block.

{% hint style="info" %}
**No auth.** Pushed only when at least one trade fills in the block; quiet markets produce no push.
{% endhint %}

## Subscribe

```json
{ "channel": "trade", "symbol_id": 100001 }
```

## Payload

`data` is an **array** of trades. Each element:

| Field | Type         | REST equivalent                                            |
| :---: | ------------ | ---------------------------------------------------------- |
|  `i`  | string       | `trade_id`                                                 |
|  `p`  | string       | `price`                                                    |
|  `q`  | string       | `quantity`                                                 |
|  `a`  | string       | `amount`                                                   |
|  `m`  | bool         | `is_taker_buyer`                                           |
|  `t`  | integer (ms) | `time`                                                     |
|  `x`  | string       | `tx_hash` (the taker transaction that produced this match) |

## Example Push

```json
{
  "channel": "trade",
  "symbol_id": 100001,
  "ts": 1719500000150,
  "finality": "final",
  "data": [
    { "i": "9012", "p": "67500.00", "q": "0.50", "a": "33750.00", "m": false, "t": 1719500000120, "x": "0xabc…" },
    { "i": "9013", "p": "67500.50", "q": "1.20", "a": "81000.60", "m": true, "t": 1719500000120, "x": "0xabc…" }
  ]
}
```


---

# 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:

```
GET https://docs.unix.market/websocket/public-channels/trade.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.
