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

# Instruments file

**Key** `instruments/{exchange}/{yyyy-MM-dd}.{sha12}.csv`

## Columns

| Column                     | Type       | May be empty | Notes                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| -------------------------- | ---------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `instrument_id`            |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `exchange`                 |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `symbol`                   |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `instrument`               |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `exchange_symbol`          |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `display_price_scale`      |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `display_qty_scale`        |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `version`                  |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `valid_from`               |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `global_sequence`          |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `removed`                  |            |              |                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `instrument_type`          | `enum`     | No           | One of `unknown`, `spot`, `futures`, `inverse_futures`, `quanto_futures`, `perpetual_swap`, `inverse_perpetual_swap`, `quanto_perpetual_swap`, `option`, `inverse_option`, `index`. Since contract `2.3.0`. unknown is also what a type this publisher's build does not name reads as.                                                                                                                                                                            |
| `tick_size`                | `decimal`  | Yes          | As many fractional digits as the row's `display_price_scale`. Since contract `2.3.0`. Price increment. Empty only where the row's display_price_scale is outside 0 to 18, which no decimal cell can state.                                                                                                                                                                                                                                                        |
| `step_size`                | `decimal`  | Yes          | As many fractional digits as the row's `display_qty_scale`. Since contract `2.3.0`. Quantity increment, in the instrument's own size unit: contracts for an instrument sized in contracts. Empty only where the row's display_qty_scale is outside 0 to 18.                                                                                                                                                                                                       |
| `contract_multiplier`      | `decimal`  | Yes          | 8 fractional digits. Since contract `2.3.0`. Units of the underlying per contract, where refdata states it: a quantity times it is an amount of the underlying. Empty where refdata states none, which is not 1: a spot instrument's quantities are already amounts of its base asset, whether its cell is empty or 1; an inverse instrument is sized by contract_value instead; and on any other instrument an empty cell leaves the size of a contract unknown. |
| `contract_value`           | `decimal`  | Yes          | As many fractional digits as the row's `display_price_scale`. Since contract `2.3.0`. Notional of one contract in the quote asset, for inverse and quanto instruments. Empty where refdata states none.                                                                                                                                                                                                                                                           |
| `underlying_instrument_id` | `int64`    | Yes          | Since contract `2.3.0`. The instrument_id of a derivative's underlying. Empty where there is none.                                                                                                                                                                                                                                                                                                                                                                |
| `expires_at`               | `epoch_ns` | Yes          | Since contract `2.3.0`. Expiry of a dated instrument. Empty for a perpetual and for spot.                                                                                                                                                                                                                                                                                                                                                                         |
| `settles_at`               | `epoch_ns` | Yes          | Since contract `2.3.0`. Settlement instant of a dated instrument. Empty where there is none.                                                                                                                                                                                                                                                                                                                                                                      |

The instrument columns after removed: what an instrument is and how it trades, as refdata stated them in the record that began the row's version. A row holds from its valid_from until the instrument's next row, and a change to any term is a new row, as a change of name is. Rows that share a valid_from, and a row and a fact that share an instant, are ordered by global_sequence, the stream's own order: a fact's terms are those of the instrument's last row whose global_sequence is not above the fact's. A removed row repeats the terms of the row before it. Each column names the contract version it is written since: an instruments file holds the columns up to its day manifest's contract_version, in instrument_columns order. A column marked always_stated is one refdata states on every record: its type is optional only because its cell is empty in the one case encoding.decimal names, a scale no cell can state.

## Naming

Use the last known live name at hour start, or first known name in the hour for a new id. Removal preserves identity for later facts; only never-named facts are skipped. Never borrow future names.

## Instrument terms

The day's instruments file, `instruments/{exchange}/{yyyy-MM-dd}.{sha12}.csv`, is plain CSV
with a row for each version of each instrument the day knows: the last version from before the
day, and every version that began inside it. After the name columns come the terms the
instrument trades on, as refdata stated them in the record that began the version:

* `instrument_type`: `spot`, `futures`, `inverse_futures`, `quanto_futures`, `perpetual_swap`,
  `inverse_perpetual_swap`, `quanto_perpetual_swap`, `option`, `inverse_option` or `index`.
  It is `unknown` where refdata does not say, and for a type this publisher does not
  recognise.
* `tick_size`: the price increment, an exact decimal with `display_price_scale` fractional
  digits.
* `step_size`: the quantity increment in the instrument's own size unit, with
  `display_qty_scale` fractional digits.
* `contract_multiplier`: units of the underlying per contract, with eight fractional digits.
  Empty where refdata states none, which is not 1: a spot instrument's quantities are already
  amounts of its base asset, whether its cell is empty or `1.00000000`; an inverse instrument
  is sized by `contract_value` instead; and on any other instrument an empty cell means the
  size of a contract is not known.
* `contract_value`: the notional of one contract in the quote asset, for inverse and quanto
  instruments, with `display_price_scale` fractional digits. Empty where refdata states none.
* `underlying_instrument_id`: the `instrument_id` of a derivative's underlying. Empty where
  there is none.
* `expires_at` and `settles_at`: the expiry and the settlement instant of a dated instrument,
  in epoch nanoseconds. Empty for a perpetual and for spot.

A row holds from its `valid_from` until the instrument's next row, so a fact's terms are those
of the instrument's last row at or before the fact's `timestamp`. Two rows of an instrument can
share a `valid_from`, and a row can share it with a fact's `timestamp`. `global_sequence` is the
stream's own order and settles both: the exact rule is the instrument's last row whose
`global_sequence` is not above the fact's. A change to any term is a new row, as a change of
name is: a tick size that moves leaves the old row and adds one. A `removed` row repeats the
terms of the row before it.

The terms are what a quantity in contracts needs. `open_interest` is in the instrument's own
size unit: times `contract_multiplier` it is an amount of the underlying, where a multiplier is
stated, and times `contract_value` it is quote notional, where a contract value is.

`display_price_scale` and `display_qty_scale` are the scales of this row's own `tick_size`,
`contract_value` and `step_size`, and of nothing else: every price and amount in a data file
states its own. `tick_size` and `step_size` are always stated, with one exception that holds for
`contract_value` too: a row whose scale lies outside 0 to 18, which no decimal cell can state,
leaves the cell empty, and the scale column beside it says so. That one case is why the contract
types the two as optional, and it marks them `always_stated` so that a checker still refuses an
empty one anywhere else.

A day manifest's `contract_version` says which of these columns its instruments file has: all
eight from `2.3.0`, none before. The contract states that per column, as each term's `since`.