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

# Ticker

**`Request — sent`**

```json title="Request — sent"
{
  "op": "subscribe",
  "params": {
    "topics": [
      "ticker.{symbol}"
    ]
  }
}
```

**`Response — received`**

```json title="Response — received"
{
  "op": "subscribe",
  "success": true,
  "topics": [
    {
      "topic": "ticker.{symbol}",
      "state": "live"
    }
  ]
}
```

**`Push data — received`**

```json title="Push data — received"
{
  "event": "ticker",
  "topic": "ticker.{symbol}",
  "seq": "<string>",
  "seqTs": "<string>",
  "data": {
    "lastPx": "<string>",
    "pctChange1h": "<string>",
    "pctChange24h": "<string>",
    "volume1h": "<string>",
    "volume24h": "<string>",
    "turnover1h": "<string>",
    "turnover24h": "<string>",
    "high24h": "<string>",
    "low24h": "<string>",
    "windowComplete": true,
    "asOf": "<string>"
  }
}
```

Each frame is its shape, read off the contract: `<string>` stands for a value, and a union shows its first form.

**URL** `wss://marketdata.immix.xyz/`

**Topic** `ticker.{symbol}`

| Topic parameter | Description                                    |
| --------------- | ---------------------------------------------- |
| `symbol`        | refdata's canonical symbol, e.g. OKX\@BTC/USDT |

## Request parameters

| Parameter  | Type             | Required | Description                                                                                      |
| ---------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------ |
| `op`       | string           | Yes      | `subscribe`                                                                                      |
| `reqId`    | string           | No       | client correlation id, echoed verbatim on the ack                                                |
| `params`   | object           | Yes      |                                                                                                  |
| > `topics` | array of strings | Yes      | the dotted topic string, e.g. trade.OKX\@BTC/USDT or candlestick.OKX\@BTC/USDT.ONE\_MINUTE.250ms |

## Response parameters

| Parameter      | Type             | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| -------------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `op`           | string           | Yes      | One of `auth`, `subscribe`, `unsubscribe`, `error`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `reqId`        | string           | No       |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `success`      | boolean          | Yes      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `error`        | string           | No       | One of `auth_required`, `invalid_token`, `unknown_op`, `malformed`, `too_many_topics`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `topics`       | array of objects | No       | answers ride in request order — the correlator for entries whose topic could not compose (error rows echo the composed topic best-effort, absent parts empty)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| > `topic`      | string           | Yes      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| > `state`      | string           | Yes      | live: data flows now (latest-image lanes — tob, mark, funding, oi, ticker — answer live whether or not an image is held yet; the first image flows on arrival). syncing (book topics): the gateway holds no synced book yet — the snapshot is pushed unprompted the moment it syncs, at latest one connector restate interval. error on a plain (string-topic) row, no code: the topic composed nothing, and it never arms retroactively. Either the channel is outside the vocabulary or the tier suffix is outside the configured set (an unrecognized suffix reads as part of the symbol) — correct the topic — or the symbol is unknown to the gateway's refdata fold (derivative symbols are refdata's ccxt spelling BASE/QUOTE:SETTLE, e.g. OKX\@BTC/USDT:USDT — there is no :SWAP form) — resubscribe once refdata holds the instrument. Composite rows: live iff every enabled source book is synced, stated within the topic's output scales, AND every required FX pair is current (the full image pushes immediately); syncing otherwise, kept by the first tick at which the composite becomes computable — a source out for precision is named by a degraded frame at that tick, since syncing alone does not say it; a composite error row carries code. One of `live`, `syncing`, `error`, `unsubscribed`, `not_subscribed`. |
| > `priceScale` | integer          | No       | composite live/syncing rows only — the resolved output price scale (max over all configured sources' reference records, disabled included), bounding the fractional digits any price on the topic can carry; never padding. It holds until a status rescaled frame on the topic restates it                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| > `qtyScale`   | integer          | No       | composite rows only — the resolved output qty scale; as priceScale                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| > `code`       | string           | No       | composite error rows only — the closed vocabulary clients parse; every validation failure maps to exactly one code. One of `unknown_channel`, `bad_name`, `bad_tier`, `tier_required`, `name_in_use`, `unknown_instrument`, `duplicate_source`, `mixed_base_asset`, `unit_mismatch`, `bad_normalisation`, `bad_depth`, `bad_ladder`, `too_many_sources`, `budget_exceeded`, `malformed`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| > `message`    | string           | No       | supplementary human text naming the offending source or field — never something a client parses                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

## Push data parameters

| Parameter          | Type             | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------ | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `event`            | string           | Yes      | `ticker`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `topic`            | string           | Yes      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `seq`              | string           | Yes      | provenance global sequence, as a decimal string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `seqTs`            | string           | Yes      | provenance sequencerTs, epoch-ns as a decimal string                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `data`             | object           | Yes      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| > `lastPx`         | string           | Yes      | the last traded price ever folded, an exact decimal string in shortest form at the scale the read-out holds it at — carried across quiet windows                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| > `pctChange1h`    | string, nullable | Yes      | (lastPx − window open) / window open as an exact ratio at 4 decimals (-0.0132 = -1.32%), half-up, never through floating point; "0" for a warm window with no in-window trades; null while the window warms                                                                                                                                                                                                                                                                                                                                                                          |
| > `pctChange24h`   | string, nullable | Yes      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| > `volume1h`       | string, nullable | Yes      | base units, an exact decimal string in shortest form at the read-out's quantity scale; null while the window warms                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| > `volume24h`      | string, nullable | Yes      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| > `turnover1h`     | string, nullable | Yes      | the window's quote notional in quote units, an exact decimal string at priceScale + qtyScale — 128-bit sums, never through floating point. Contract-aware: spot is the price × quantity sum verbatim; a linear contract (FUTURES, PERPETUAL\_SWAP, QUANTO\_\*) is that sum times the instrument's contractMultiplier, rounded half-even at the same scale; an inverse contract is volume × contractValue. Null while the window warms, and null — never 0, never the raw sum — when the rule cannot value the shape (an unstated multiplier or contract value, an option, an index). |
| > `turnover24h`    | string, nullable | Yes      | the same rule over the 24h window                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| > `high24h`        | string, nullable | Yes      | the 24h in-window high, an exact decimal string in shortest form at the read-out's price scale; the carried last price when the warm window has no trades; null while warming                                                                                                                                                                                                                                                                                                                                                                                                        |
| > `low24h`         | string, nullable | Yes      |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| > `windowComplete` | boolean          | Yes      | the 24h window's completeness flag                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| > `asOf`           | string           | Yes      | the consumed event-time frontier at render, epoch-ns as a decimal string — advances on decay re-renders while seq/seqTs stand still                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

## Behaviour

Per-window completeness rides nullability (each window's derived fields are null until that window's history exists post-cold-start; windowComplete is the 24h flag); a warm window with no in-window trades is flat — zero sums, ratio "0", extremes carried from the last trade.