> 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.

# Overview

**File contract** version `2.4.0`

**`timestamp` is sequencer consensus time, in epoch nanoseconds.** Unlike tardis it is
not the exchange clock. Files are partitioned by this time, and rows retain stream order.
The machine-readable [file contract](/datasets/reference/files/overview)
and [consumer changelog](/datasets/changelog/files) ship in the release contract bundle.

## Encoding

| Encoding      | The contract's statement                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `text`        | UTF-8                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `line_ending` | LF                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `csv`         | RFC 4180 quoting; empty cell is null                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `compression` | gzip: first member contains only the header, remaining members contain rows                                                                                                                                                                                                                                                                                                                                                                                                               |
| `decimal`     | exact mantissa times 10^-scale; trailing fractional zeros preserve the fact scale. A level of a book family is written at the scale its book holds, the one its last restatement stated, whatever scale the fact that carried the level states. A column that states a scale always has that many fractional digits. One that states a scale_column has as many as that column of its own row says, and is empty where that says a scale outside 0 to 18, which no decimal cell can state |
| `boolean`     | true or false                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `enum`        | one of the column's values. An optional_enum may also be empty. The enums table repeats, by column name, the values of the four enum columns older than contract 2.2.0, and says nothing of any other column                                                                                                                                                                                                                                                                              |

## Keys

| Object                                 | Key                                                                | Reference                                                 |
| -------------------------------------- | ------------------------------------------------------------------ | --------------------------------------------------------- |
| A family's file for one symbol and day | `{family}/{exchange}/{yyyy-MM-dd}/{encoded_symbol}.{sha12}.csv.gz` | This page                                                 |
| The day manifest                       | `manifests/{exchange}/{yyyy-MM-dd}/day.json`                       | [Day manifest](/datasets/reference/files/day-manifest)    |
| The day's instruments file             | `instruments/{exchange}/{yyyy-MM-dd}.{sha12}.csv`                  | [Instruments file](/datasets/reference/files/instruments) |
| An exchange's coverage object          | `coverage/{exchange}.json`                                         | [Coverage object](/datasets/reference/files/coverage)     |

| Part of a key      | How it is built                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `{encoded_symbol}` | One path component. A readable symbol matches readable_symbol: a base and a quote, each one or more ASCII letters or digits, joined by one '/', then optionally ':' and one or more ASCII letters, digits or '-'. It spells '/' as '-' and ':' as '*': BTC/USDT is BTC-USDT, AAVE/USD:USD-20310704 is AAVE-USD_USD-20310704. Any other symbol, canonical as it is, is the UTF-8 percent encoding (uppercase hex) of every byte other than an ASCII letter or digit, '-' and '*' included: BTC-PERP/USDT is BTC%2DPERP%2FUSDT. Only a readable spelling contains '-', so no two symbols share a path, and a component reads back as its symbol: in one containing '-', the first '-' is '/' and '\_' is ':'; percent-decode any other. CSV cells keep the canonical symbol. |
| `readable_symbol`  | `^[A-Za-z0-9]+/[A-Za-z0-9]+(?::[A-Za-z0-9-]+)?$`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `{sha12}`          | The first 12 hex digits of the object's SHA-256. The manifest naming the key carries all 64; verify those.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

## Families

| Family                                                                 | Since contract | Rows per fact |
| ---------------------------------------------------------------------- | -------------- | ------------- |
| [`trades`](/datasets/reference/files/trades)                           | `2.0.0`        | one           |
| [`quotes`](/datasets/reference/files/quotes)                           | `2.0.0`        | one           |
| [`book_snapshot_25`](/datasets/reference/files/book-snapshot-25)       | `2.0.0`        | one           |
| [`incremental_book_L2`](/datasets/reference/files/incremental-book-l2) | `2.2.0`        | many          |
| [`funding_rate`](/datasets/reference/files/funding-rate)               | `2.1.0`        | one           |
| [`mark_price`](/datasets/reference/files/mark-price)                   | `2.1.0`        | one           |
| [`open_interest`](/datasets/reference/files/open-interest)             | `2.1.0`        | one           |

## Files and identity

```
{family}/{exchange}/{yyyy-MM-dd}/{encoded_symbol}.{sha12}.csv.gz
hourly/{family}/{exchange}/{yyyy-MM-dd}/{HH}/{encoded_symbol}.{sha12}.csv.gz
manifests/{exchange}/{yyyy-MM-dd}/{HH}.json
manifests/{exchange}/{yyyy-MM-dd}/day.json
instruments/{exchange}/{yyyy-MM-dd}.{sha12}.csv
metadata/days/{exchange}/{yyyy-MM-dd}.{sha12}.json.gz
coverage/{exchange}.json
```

For example, the `BTC/USDT` trades of 2026-10-16 on BINANCE_SPOT are
`trades/BINANCE_SPOT/2026-10-16/BTC-USDT.e88dc5948aa3.csv.gz`, and its 12:00 hour is
`hourly/trades/BINANCE_SPOT/2026-10-16/12/BTC-USDT.….csv.gz`. The date comes before the
symbol, so one prefix per family lists a day's files, beside `manifests/{exchange}/{yyyy-MM-dd}/`.
Every key, including those a manifest names, is relative to the dataset's root: a bucket, or a
prefix inside one. Production keeps one root per source generation in one bucket, so there the
day file above is
`gs://immix-prod-research-data/prod/20260930.1700/trades/BINANCE_SPOT/2026-10-16/BTC-USDT.e88dc5948aa3.csv.gz`.

Symbols are canonical, not venue spellings, and a key spells one as a single path component.
A readable symbol, one matching the contract's `key_parts.readable_symbol` pattern (a base and a quote,
each one or more ASCII letters or digits, joined by one `/`, then optionally `:` and one or
more ASCII letters, digits or `-`), writes `/` as `-` and `:` as `_`: `BTC/USDT` is
`BTC-USDT`, `AAVE/USD:USD-20310704` is `AAVE-USD_USD-20310704`. Any other symbol, canonical as
it is, percent-encodes every UTF-8 byte that is not an ASCII letter or digit, `-` and `_`
included: `BTC-PERP/USDT` is `BTC%2DPERP%2FUSDT`. Only a readable spelling contains `-`, so no
two symbols share a key, and a key's component reads back as its symbol: in one containing
`-`, the first `-` is `/` and `_` is `:`; percent-decode any other. CSV cells still contain the
canonical symbol: `BTC/USDT`.

`{sha12}` is the first 12 hex digits of the object's SHA-256. The manifest naming a key carries
all 64; verify those, and read keys from manifests rather than building them. Dictionary keys
keep all 64 digits. A file exists only if it has rows; a missing family in an **ok** manifest
means zero rows, subject to that manifest's gaps. An unlisted object is not published data.

That rule holds for a family the manifest's `contract_version` knows. The contract gives each
family a `since`, the first contract version whose manifests can list it: `2.1.0` for
`funding_rate`, `mark_price` and `open_interest`, and `2.2.0` for `incremental_book_L2`. An hour
manifest whose `contract_version` is earlier was committed by a publisher that did not write
the family, and it holds none of it whatever the venue sent. A day manifest carries the
version of the build that closed the day, which says nothing about its hours. It names its 24
hour manifests under `hours`: each one's `contract_version` says whether that hour could hold
the family, and the family's day file holds only the hours that could.

Every family begins with these columns, in this order:

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

Names use the last known live name at the UTC hour's start, or the first known name
inside the hour for a newly named id. Removal does not erase identity: in-flight facts
after a delisting, and facts between removal and relisting, retain that name. Renames
and relistings affect the next hour's path. Only facts with no live name at or before
the event are skipped with an `unknown_instrument` gap; future names are never borrowed. The dictionary preserves material name, term and removal changes, not redundant version-only
updates. Never mix source identities across stream resets; use a fresh destination.

## Family columns

The three readout families write one row per fact on the stream: a row is a reading as the
venue pushed it, not a change, so consecutive rows may be equal. Nothing is merged, sampled or
carried forward, and each family keeps its own clocks. To line a mark price up with the funding
rate or open interest in force at the time, join the families as of `global_sequence`. They
have rows only for instruments whose venue feed carries the readout, and each venue pushes on
its own clock: one sends a mark price several times a second per instrument, another far less
often.

A rate is the venue's own cut at the eighth fractional digit, toward zero, not rounded: venues
publish rates to sixteen places and more, and the stream holds eight. A reader reconciling a
rate against a venue's statement allows for that last digit.

Two limits of the stream hold for these families as they do for `trades` and `quotes`.
`global_sequence` is one total order over every exchange and family, but two facts from
different channels of one venue are ordered as they arrived: a venue does not promise that its
channels interleave in matching order, and a connector may read them on different sockets. And
a connector whose publishes have been refused for longer than its stall limit drops the trades,
quotes and readouts it could not publish, and counts them in its own metrics. Nothing on the
stream marks that loss, so no manifest gap names it. Books lose nothing that way: they are
restated.

Prices and amounts are exact decimal strings, including trailing fractional zeros. Root
values use their own wire scale; book levels use the existing book fold's exact holder
scale, which can widen after finer facts. Every rate of `funding_rate` has eight fractional
digits, the stream's fixed scale for rates, which the contract states as each rate column's
`scale`: `0.00010000` is one basis point. Refdata scales **never** render market data.
Precision may change between rows. In `incremental_book_L2` it changes only at a whole-book
group: a book's rows are all at the pair of scales the book holds, whatever scale the fact that
carried a level stated. Parse ns clocks and identifiers as integers, and money as decimals;
floating point does not preserve the contract.