> This page is for Datasets.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.immix.xyz/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.immix.xyz/_mcp/server.

# trades

**Family** `trades` · **Since** contract `2.0.0` · **Rows per fact** one

**Key** `trades/{exchange}/{yyyy-MM-dd}/{encoded_symbol}.{sha12}.csv.gz`

`trades`: `id,id_type,side,price,amount`. `id` is the wire exchange-trade identifier;
`id_type` preserves its meaning. Known enums use lowercase codec names; side is `buy`, `sell`
or `unknown`. Unrecognized and wire-null values in both `id_type` and `side` render
as `unknown`.

## Columns

Every family begins with the same 9 columns, in this order; the family's own follow them.

| Column               | Type       | May be empty | Notes                                                                                                                                                             |
| -------------------- | ---------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `exchange`           | `string`   | No           | Exchange code from refdata, for example `OKX`                                                                                                                     |
| `symbol`             | `string`   | No           | Canonical symbol, for example `BTC/USDT`                                                                                                                          |
| `instrument`         | `string`   | No           | Gateway spelling, `EXCHANGE@SYMBOL`                                                                                                                               |
| `exchange_symbol`    | `string`   | No           | Venue spelling, for example `BTC-USDT`                                                                                                                            |
| `instrument_id`      | `int64`    | No           | Signed 64-bit refdata identifier                                                                                                                                  |
| `timestamp`          | `epoch_ns` | No           | Sequencer consensus time, epoch ns                                                                                                                                |
| `exchange_timestamp` | `epoch_ns` | Yes          | Exchange time, epoch ns; empty when absent                                                                                                                        |
| `local_timestamp`    | `epoch_ns` | Yes          | Connector socket-read time, epoch ns; empty when absent                                                                                                           |
| `global_sequence`    | `int64`    | No           | The fact's envelope ordinal in the source stream. It identifies a row where a fact writes at most one; the rows one fact writes to `incremental_book_L2` share it |
| `id`                 | `int64`    | No           |                                                                                                                                                                   |
| `id_type`            | `enum`     | No           | One of `exchange_numeric`, `exchange_hashed`, `unknown`.                                                                                                          |
| `side`               | `enum`     | No           | One of `buy`, `sell`, `unknown`.                                                                                                                                  |
| `price`              | `decimal`  | No           |                                                                                                                                                                   |
| `amount`             | `decimal`  | No           |                                                                                                                                                                   |

## A file's first lines

**`trades: the header, and a row's shape`**

```csv title="trades: the header, and a row's shape"
exchange,symbol,instrument,exchange_symbol,instrument_id,timestamp,exchange_timestamp,local_timestamp,global_sequence,id,id_type,side,price,amount
<string>,<string>,<string>,<string>,<int64>,<epoch_ns>,<epoch_ns>,<epoch_ns>,<int64>,<int64>,<exchange_numeric|exchange_hashed|unknown>,<buy|sell|unknown>,<decimal>,<decimal>
```

The second line is a row's shape, read off the contract: `<decimal>` stands for a value of that type, an enum shows its values, and a cell that may be empty is marked in the table above.