Skip to navigation

Trading WebSocket changelog

Consumer-facing history of the trading edge’s WebSocket contract (asyncapi.yaml is the contract itself; this file says what changed, for the people who parse it). Every client-visible change has its section here, newest first, each stating what each side of the deploy window sees, headed by the info.version it lands with and its date (## <version> — <YYYY-MM-DD> — …).

How to get this document. It ships in every release’s contract bundle — immix-contracts-<tag>.tar.gz, attached to the release with its .sha256 — as asyncapi.yaml beside this file, with manifest.json naming the version and a digest per file. info.version and the sections below say what the contract is.

8.0.2 — 2026-11-05 — A refused handshake, as a browser sees it

Documentation only: nothing on the wire changes. The description listed the HTTP statuses that answer a refused handshake as if every client could read them; a browser cannot. Its WebSocket reports every failed handshake the same way — an error event, then close with code 1006 — whatever the status. A new paragraph, A refused handshake, in a browser, gives a browser its rule: stop on a 401 or 403 from POST /ws-tickets, where its refusals are readable, and treat a handshake that fails on a ticket you have just created as the 503 — a back-off, then a new ticket used at once, and a cap on the attempts. The ticket scheme’s note on creating one, and the Origin header, say the same.

During the deploy window an 8.0.1 member and an 8.0.2 member behave identically.

8.0.1 — 2026-11-04 — Every schema has a title, so generated models are named

Every schema a code generator turns into a type now carries a title, so a generator names its models from them instead of emitting AnonymousSchema_<n>. The <n> was a position counter, so any edit to this document renumbered every model after it. The names follow one rule:

  • a schema under components.schemas is its key in PascalCase: orderRow → OrderRow, orderDelta → OrderDelta;
  • a message’s payload is its key under components.messages in PascalCase: submitOrder → SubmitOrder, order → Order (the union of OrderSnapshotPart and OrderDelta);
  • an inline object or enum is its parent’s title followed by the property name in PascalCase, with Item for an array’s items: SubmitOrderParams, SubmitOrderParamsSide, OrderRowTimeInForce, CredentialRowHealth;
  • two exceptions: the riskPosture enum (NORMAL, HEDGE_ONLY, BLOCKED) is RiskPostureLevel, because RiskPosture names the riskPosture message; and the branches of submitOrder’s parameter rules are SubmitOrderAccountAlias, SubmitOrderInstrumentAlias, SubmitOrderPriceRule, SubmitOrderLimitPrice and SubmitOrderMarketNoPrice.

Titles are unique within the document. Regenerate your types to pick up the names. The generated types differ from before only in their names.

Deploy window: nothing on the socket changes. Both sides of the deploy send and accept the same frames.

8.0.0 — 2026-11-02 — ! riskRecord gains marginEquityUsd; the posture arm NLV_FLOOR is MARGIN_EQUITY_FLOOR

A break (!): an enum value renamed.

  • riskRecord rows gain marginEquityUsd: the net liquidation value of the account’s margin wallets alone — at OKX the trading account, at Bybit the unified account, at Binance the spot and USD-M wallets together (Binance margins USD-M on its own wallet, so its figure also counts the spot wallet). The eight leverage figures are now ratios to it, and the WithSpot figures count only the holdings in those wallets; nlvUsd stays everything the account owns. A row also publishes when marginEquityUsd moves by the 1 % NLV step.
  • riskPosture rows’ arm NLV_FLOOR is now MARGIN_EQUITY_FLOOR, its observed the margin equity in USD.
  • Order admission’s exposure test reads the margin wallets. It applies under a HEDGE_ONLY or BLOCKED posture set by GROSS_LEVERAGE_WITH_SPOT or MARGIN_EQUITY_FLOOR (the floor is hard only, so it sets BLOCKED alone) from a breach on complete data: the posture’s arm has an observed value and its rateQuality is PRIMARY. There the exposure an order must shrink (a hedge under HEDGE_ONLY, a cut under BLOCKED) is the derivatives together with the holdings in the venue’s margin wallets alone; coins in another wallet (OKX funding) no longer count. An order that shrank only coins held outside the margin wallets passed before and is now refused, RISK_HEDGE_ONLY under HEDGE_ONLY and RISK_LIMIT_BREACHED under BLOCKED. Conversely, an order that shrinks the margin-wallet exposure now passes even where those outside coins once made it look like growth. With the data in doubt, only a cut passes, as before — the same rule as the REST surface’s 0.74.0.

During the deploy: the release rolls with a reset. riskRecordRow is a closed schema (additionalProperties: false), so a client validating against the previous version rejects a row that carries marginEquityUsd: move such a client with the reset. A client that does not validate and ignores the field still reads leverage figures over a different denominator — the margin equity, not NLV — so a figure can rise with no trade. An arm value it does not know reads as UNKNOWN, as the document has always said — but a client validating against the previous version rejects a riskPosture row carrying MARGIN_EQUITY_FLOOR before it can map it: move such a client with the reset too. A client moved to this version before the server is meets riskRecord rows without marginEquityUsd, which this version requires: validate against it once the server runs this release.

7.2.0 — 2026-11-02 — A position’s funding

One field and one enum value added to a row; nothing removed or renamed.

  • position rows gain funding: the funding paid or received on the position since it first opened, in the settle asset, positive when the account received it. Cash beside realizedPnl, kept when the position returns to zero; null for UNSUPPORTED. A payment moves the row, so it arrives again as an update.
  • position rows’ lastCause gains FUNDING for that update. It names no execution, so lastExecutionId still names the last fill.
  • The riskRecord row’s fundingUsd moves with each payment, under cause FUNDING, at the payment’s own rate. A payment in an asset with no USD rate yet is left out of fundingUsd until its first rate converts it, and the row reads isPartial meanwhile.

During the deploy: the release rolls with a reset. positionRow is a closed schema (additionalProperties: false), so a client validating against the previous version rejects a row that carries funding: move such a client with the reset. A lastCause it does not know is read as UNKNOWN, as the enum’s description says — but a client that validates enums strictly against the previous document rejects FUNDING before it can map it, even one that ignores funding: move such a client with the reset too. A client moved to this version before the server is meets position rows without funding, which this version requires: validate against it once the server runs this release.

7.1.0 — 2026-11-02 — An execution’s provenance; manual executions on the execution channel

One field added to a row; nothing removed or renamed.

  • execution rows gain provenance: where the execution came from — the venue connector’s evidence (ACK, PUSH, QUERY, SWEEP) or MANUAL, a trade the platform never received from a venue, booked by hand through the REST API and approved under the organisation’s risk rule. A manual execution’s orderId is null — no order placed it — and its credentialId 0; its venueTradeId is the reference it was booked under. orderId is null on a leg awaiting attribution too: provenance tells the two apart. A row recorded before this release reads UNKNOWN. Its actor is null, as on any row no order placed: the REST API’s manual-execution record names who drafted and approved it.
  • A manual execution moves the account’s position and riskRecord rows as any fill does, with cause FILL.

During the deploy: a member of the previous release serves execution rows without provenance; ignore a field you do not know and treat its absence as UNKNOWN.

7.0.0 — 2026-10-31 — ! API keys: a second bearer on the handshake; actor replaces userId on order frames; execution rows name the actor

A break (!): two row shapes rename a field, one gains a field, one nullable, and the handshake takes a second credential.

  • A second bearer on the handshake. Authorization: Bearer immix_<keyId>_<secret> — an API key the REST API’s POST /api-keys issued — opens a session as a member’s access token does, and a key can create a ticket at POST /ws-tickets and open the socket with it. A key’s session states no expiry: sessionOpened.data.expiresAtNs (and the op: auth answer’s) is null on it, sessionExpiring never fires for it, and it ends when the key is disabled or deleted (sessionClosing PRINCIPAL_REVOKED, 4003), when the key is rotated (SESSION_EXPIRED, 4001 — reconnect with the current secret), or when you close it. A member’s session is unchanged: expiresAtNs is the token’s expiry, as before.
  • The first frame can be sessionClosing SESSION_EXPIRED (4001, retryable). The 1.4.0 section named PRINCIPAL_REVOKED (4003, not retryable) as the only alternative to sessionOpened, and that was never the whole list: a session announced too late to be served — rare, and only under load — closes 4001 before its first frame, before this release and after it. From this release a key’s session closes so too when the key was rotated between the handshake and that frame. Treat a first-frame 4001 as any 4001: reconnect, with a fresh token or the key’s current secret. The document now names both closes.
  • The identity provider’s client path ends. An M2M client’s token (sub <client_id>@clients, bound to a SERVICE user row on the REST API) opens no session from this release — no such row exists after the wipe, and none can be made: a machine’s credential is an API key’s bearer, above.
  • orderUpdate and orderRejected rows: actor replaces userId. The field is an object {kind, id} — USER with a user id, API_KEY with a key id, or MACHINE with id 0 beside the algoInstanceId that acted (the schema actor). Where you read userId to match your own orders or refusals, read actor; where you read userId == 0 for a strategy’s, you were asked not to — read algoInstanceId, which is unchanged.
  • execution rows gain actor: the principal behind the order the fill belongs to, read off the order row — null while the leg is unattributed (orderId null) or when the order is no longer held here. Nothing else on the row moves.

Deploy window: the register and the orders domain are wiped with this release, so a session on 7.0.0 never meets a row an earlier version wrote. A client generated against 6.x meets actor where it expects userId on order frames and a null expiresAtNs only on a key’s session; a key’s bearer is refused 401 by a socket member below 7.0.0, so a client that is a key starts once the members it reaches serve 7.0.0.

6.0.0 — 2026-10-30 — ! session.capabilities lists no venue-keys:propose or venue-keys:approve

A break (!) on the capability vocabulary: venue-keys:propose and venue-keys:approve leave capabilityScope — a change to a key is a proposal on its account now, made and approved under accounts:propose and accounts:approve — and so leave session.capabilities. venue-keys:read stays the credential channel’s read grant. Nothing else on the wire moves.

Deploy window: the register is wiped with this release and every user row re-minted, so a session on the new version never carries either value; a client on the old version reading a new session’s capabilities meets neither value — show nothing for a grant it does not see, as the document has always said.

5.0.3 — 2026-10-30 — expiresAtNs is always the token’s expiry

sessionOpened and the op: auth answer describe expiresAtNs as the credential’s expiry without the old exception: no session reads "0" any more, because every environment authenticates with a token that states one. A client that treated "0" as “never expires” can keep that branch or drop it — nothing sends it. The wire is unchanged on both sides of the deploy window.

5.0.2 — 2026-10-30 — The ticket is minted at POST /ws-tickets

The REST API’s ticket route is now POST /ws-tickets, relative to the REST API’s base URL like every other path; this document named it POST /v1/ws-tickets. Behind https://api.immix.xyz/v1 the full URL is https://api.immix.xyz/v1/ws-tickets. Nothing on this socket changes. Deploy window: a REST member below contract 0.63.0 mints at /v1/ws-tickets and answers /ws-tickets with a 404; from 0.63.0 it is the other way round. Mint at the path the member you reach serves.

5.0.1 — 2026-10-28 — venueCapability serves Binance USD-M; a credential’s health.trading covers every market its key trades

The venueCapability channel now carries rows for binance_usd-m (Binance USD-M futures): on its perpetuals (PERPETUAL_SWAP) and quarterlies (FUTURES), LIMIT with GTC, IOC or FOK, LIMIT GTC with postOnly, and MARKET with GTC or IOC. Every one of those rows has reduceOnly: true. There are no spot rows: Binance spot is the separate exchange binance_spot. The exchange value was already listed among the examples, and the set is open, so the schema does not change. The two reduceOnly descriptions now name Binance USD-M beside OKX and Bybit.

A Binance account’s one key trades both Binance markets, through one order-entry connector each, and each connector reports its own health. On the credential channel, health.trading is now the worst of those readings (DOWN before DEGRADED before CONNECTED): a Binance key whose USD-M connector is down reads DOWN even while spot trades. For OKX and Bybit keys, which trade one market each, nothing changes. Its description says so.

Across the deploy window. The rows appear once the WebSocket gateway runs 5.0.1, whatever version the orders service runs. The rows say what the venue can take, not that an order is admitted today: a Binance USD-M order goes through a Binance account (binance_spot) whose key trades and has Enable Futures ticked at Binance, and needs an orders service on this release — one on the previous release refuses it CREDENTIAL_UNAVAILABLE. Until a deployment runs the USD-M order-entry connector, an admitted order waits and is never sent.

What to do. Nothing, if your client treats an unknown exchange value as an opaque key, as the contract asks. Regenerating changes only three descriptions. A client that shows a Binance key’s health.trading as “spot is down” should say “trading is down on one of the key’s markets” instead.

5.0.0 — 2026-10-27 — ! accountBalance rows keyed by wallet; account rows lose their key slots; credential rows name their account

A break (!) on three row shapes.

  • accountBalance — a row is one wallet’s readout: the upsert key is (accountId, wallet, assetId), three coordinates where it was two, and the row carries wallet ("trading", "funding", "unified", "spot" — the venue’s own word). A holding an account owns is the sum of its wallets; what it can trade is the venue’s order wallet alone.
  • account — the row loses credentialId, tradingCredentialId and transferCredentialId (the keys are the credential rows naming it) and externalRef; it gains venueAccountRef (the venue’s own id, as the key probe stated it, null until then), parentExternalRef (the parent’s venue id on a sub-account, null on a master account) and parentAccountId (the organisation’s row for that parent, resolved at the render, else null). exchange is the account’s own venue now. status lists DRAFT and no DISCOVERED.
  • credential — the row gains accountId, the account the key is beneath. The channel needs venue-keys:read (credentials:read before 5.0.0: the same bit, respelled), or any venue-keys capability.

Deploy window: the register and custody are wiped with this release, so a session on the new version never meets a pre-5.0.0 row; a client on the old version meets rows with members it does not know and without the slots — treat the upsert key of accountBalance as the three fields from this version on.

4.5.2 — 2026-10-27 — The ticket’s mint from a browser on a listed origin

The ticket scheme’s description is corrected: a browser page on another origin can now mint its ticket at POST /v1/ws-tickets directly, where the REST API’s deployment lists that origin — each deployment grants cross-origin access (CORS) to the exact origins it lists. From an origin it does not list the browser still refuses the call, so mint through your backend there. Nothing on this socket changes. Deploy window: the REST API grants origins from its contract 0.59.1; a REST member before it grants none, so a page on another origin mints only once the members it reaches serve 0.59.1.

4.5.1 — 2026-10-24 — session.capabilities: the platform’s one value

The platform’s own organisation now grants its staff one value listed on the internal platform API alone, internal-platform:manage, where it granted two before (internal-platform:propose, internal-platform:approve). Nothing in this document’s capabilityScope enum changes. A platform staffer’s session.capabilities may carry the new value — served like any other, and to be treated as a name you do not know, exactly as the two were. Deploy window: a session acknowledged by a member on the old version may still show the two old values, one on the new version shows the one new value; a client that ignores names it does not know needs no change.

4.5.0 — 2026-10-23 — Positions and risk rows move for hand-made adjustments

One enum value appended; nothing removed or renamed.

  • riskRecord and exposure rows can now carry cause MANUAL_ADJUSTMENT (already in riskCause, never produced before), with causeRef the adjustment’s id, when an approved hand-made correction of the account’s books (a cost basis, realized PnL or fee) applies. The record’s adjustments counter counts them.
  • position rows’ lastCause gains MANUAL_ADJUSTMENT — the row’s cost, realized PnL or fees corrected by hand; lastExecutionId still names the last execution, which the adjustment is not. A client that switches over the values reads one it does not know as UNKNOWN.

During the deploy: nothing changes for a client until an organisation approves an adjustment through the REST API.

4.4.0 — 2026-10-23 — Orders obey the risk posture; reduceOnly on derivatives

Two refusal reasons appended and one field widened; nothing removed or renamed. Orders that were admitted before can now be refused, by the account’s risk posture.

What changed

  • submitOrder obeys the account’s riskPosture, checked right after the order’s fields. NORMAL, or no posture yet, changes nothing. Under HEDGE_ONLY an order is admitted only if it reduces the account’s risk, else orderRejected with reason RISK_HEDGE_ONLY: from a breach on complete data (arm a leverage limit or NLV_FLOOR with observed, rateQuality PRIMARY, no positionDrift) an order on any instrument that leaves the account’s exposure smaller in size, in each coin it touches other than cash, counting its live orders on the same side — the exposure the breached arm measures, derivative positions alone for the two *_NO_SPOT arms, where a spot order never passes; when the data is in doubt, only a cut — a derivative order with reduceOnly where the venue takes it, a spot sell within the available balance, or a spot buy that repays a borrowed short. Under BLOCKED only a cut — never a hedge, and from a breach a cut that also shrinks the exposure, unless the risk figures cannot value its instrument — else RISK_LIMIT_BREACHED. Both state the posture’s observed and threshold as observedValue and limitValue, with unit null (a leverage multiple, or USD for the NLV floor — the riskPosture row’s arm says which); DATA_QUALITY and UNEVALUABLE state no pair. cancelOrder is never refused for the posture.
  • submitOrder.params.reduceOnly may be true — it was const: false. Where venueCapabilityRow.reduceOnly is true (OKX’s and Bybit’s linear perpetuals and futures) the order passes to the venue, which holds it to the position it reduces; elsewhere it is refused UNSUPPORTED_AT_VENUE, where it was INVALID_FIELD before.
  • venueCapabilityRow.reduceOnly is true on those derivative rows, as the field was put on the wire to become; spot rows stay false. orderRow.reduceOnly says how the order was placed.
  • orderRejectReason gains RISK_LIMIT_BREACHED and RISK_HEDGE_ONLY, appended.

Across the deploy window. Until the orders service runs this release no order is refused for its posture and reduceOnly: true is still refused INVALID_FIELD. A member still on 4.3.x renders either new reason as UNKNOWN, with the message “refused for a reason this build cannot read”, and still publishes reduceOnly: false on every capability row. A client that generated its types from 4.3.0 gains two enum values and loses the reduceOnly constant; one that validates submitOrder against 4.3.0 refuses its own reduceOnly: true until it is regenerated.

4.3.0 — 2026-10-23 — riskPosture: each account’s posture, and a record’s LIMIT cause

Additive: one new channel and two enum schemas behind it; nothing removed or renamed.

What changed

  • riskPosture — new — one row per account (riskPostureRow): its posture, the latest risk record judged against the risk limits in force, the worst limit winning — NORMAL, HEDGE_ONLY (it may only reduce its risk) or BLOCKED (it may only cut). This release publishes the posture; order admission enforces it from a later release, announced in its own section. arm says what set it: a leverage limit or NLV_FLOOR, with observed (the reading when the posture changed — a ratio to NLV, or NLV in USD for the floor) and threshold (the limit it reached), each a decimal string at eight places; DATA_QUALITY or UNEVALUABLE, which measure nothing, with both null; UNKNOWN on NORMAL. riskLimitId and riskLimitVersion name the limit row the arm came from (null when none); recordPricedAtNs the account’s latest riskRecord published on that channel before the posture, which states the same verdict, its figures possibly moved on from observed (null before the account’s first record); previous, rateQuality, positionDrift, changedAtNs. A row moves only when the posture changes — the posture, its arm, the row it names, or under HEDGE_ONLY and BLOCKED the rate quality or drift — so observed is the reading at the change; the live figures are riskRecord’s. Every active account has a row from its first moment active. Needs risk:read, or any risk capability; exactly one snapshot per subscribe, a delta per change.
  • riskRecord may now arrive with cause LIMIT — already a value of riskCause — when a change to the risk limits in force moved the account’s posture (causeRef the limit row); a record is also published whenever a valuation or an order event moves the posture. The riskRecord description and riskRecordRow.causeRef’s say so.

Across the deploy window. A client on 4.2.x that does not subscribe to riskPosture sees nothing change but records that may carry cause LIMIT, a value its enum already holds. A subscribe to riskPosture meets UNKNOWN_TOPIC from a member still on 4.2.x — the name is new there — and TOPIC_NOT_ACTIVE from a member on 4.3.0 whose environment has not switched the risk channels on: wait for the release and the environment, never read either as an account with no posture. A client that generated its types from 4.2.0 gains one message, its row and two enums; an older parser routing on msgType ignores the new frames until it is regenerated.

4.2.0 — 2026-10-23 — riskRecord and exposure: each account’s risk, and the risk capabilities

Additive: two new channels, three new capability values, one more grant that reads position; nothing removed or renamed.

What changed

  • riskRecord — new — one row per account the platform has valued (riskRecordRow): nlvUsd (net liquidation value), unrealizedPnlUsd, realizedPnlUsd, feesUsd, fundingUsd, transfersUsd, the eight leverage figures (grossActualNoSpot … netTotalWithSpot), the data quality (isPartial, worstSource, seven counters, positionDrift), balancesAsOfNs, and what last moved it (pricedAtNs, cause, causeRef). Every USD amount is a decimal string at eight places; each leverage figure is a ratio to NLV as a decimal string at eight places — "0.42000000" is 0.42× NLV; over an NLV barely above zero it saturates at "92233720368.54775807", the largest the wire holds — read that as at least, never as an exact ratio. A figure the platform could not evaluate is null, never 0. The seventh counter, inventoryRefusals, counts the balances and fill legs refused because their quantity was too large to hold at the asset’s scale: each moved nothing, the record stays partial, and the count never resets. A row moves at the record’s publish cadence — a business event, a data-quality change, a 0.1× leverage or 1 % NLV step, or a heartbeat — never on every price tick.
  • exposure — new — one row per (accountId, assetId) (exposureRow): actualExposure (the holding plus every derivative position’s leg in the asset), inventoryQty — each never finer than the asset’s unit scale (eight places for an asset without one) — costBasisUsd and realizedPnlUsd on the holding (null for a cash asset), rateQuality, unvalued. A row moves on a business event touching its asset, or when its rateQuality or unvalued changes (cause VALUATION), never on a price move within a tier.
  • Both need risk:read, or any risk capability; orders:read alone is refused FORBIDDEN_CAPABILITY at its failedTopicIndex. Each subscribe gets exactly one snapshot — one empty part when there is nothing yet — then a delta per move; data is always an array and every row names its key. A member whose deployment has not switched the risk channels on answers TOPIC_NOT_ACTIVE, as position did before its knob.
  • position also reads with risk:read (or any risk capability), beside orders:read.
  • capabilityScope gains risk:read, risk:propose and risk:approve — the risk family’s read and its two verbs, the values sessionOpened’s grant and the HTTP lane spell.

Across the deploy window. A client on 4.1.x that subscribes to neither channel sees nothing change but a grant that may name the three new capability values — treat one you do not know as a grant you cannot use. A subscribe to riskRecord or exposure meets UNKNOWN_TOPIC from a member still on 4.1.x — the names are new there, not reserved — and TOPIC_NOT_ACTIVE from a member on 4.2.0 whose environment has not switched the risk channels on yet: in both cases wait for the release and the environment, never read either as an account with no risk. A risk:read-only principal subscribing to position meets FORBIDDEN_CAPABILITY from a member still on 4.1.x. A client that generated its types from 4.1.0 gains two messages and the schemas behind them; an older parser routing on msgType ignores the new frames until it is regenerated.

4.1.0 — 2026-10-23 — position is served: the organization’s derivative positions

Additive: one channel served that was reserved, nothing removed or renamed.

What changed

  • position — reserved until now, answered TOPIC_NOT_ACTIVE — is served: one row per (accountId, instrumentId) a fill has opened on your organization’s accounts, the platform’s own derivation from the fills the execution channel carries. Subscribing needs orders:read, or any orders capability; without one the subscribe is refused FORBIDDEN_CAPABILITY at its failedTopicIndex, as for order and execution. The image is account then instrument ascending, one snapshot per subscribe — one empty part when your organization holds no position — and every move after it is a delta on the same channel.
  • The row (positionRow) states family (LINEAR, INVERSE, UNSUPPORTED), the signed qty — coins for a linear contract, USD face value for an inverse one — and contracts, derived from qty at the instrument’s current definition (after a venue changes a contract’s size the count follows the venue and qty does not move); cost and realizedPnl (gross of fees) in settleAssetId/settleAsset; avgPx; fees, one entry per fee asset; and the last move — lastCause, lastExecutionId, lastFillTsNs, lastSeq. A position that returns to zero keeps its row, its realized PnL and its fees; a row never leaves. An UNSUPPORTED row states its raw contract count and null for every figure the platform does not compute for it. No mark and no unrealized PnL are served.
  • A row moves on a definition change too, not only on a fill. contracts, an INVERSE row’s avgPx and the instrument name are read at the instrument’s current definition, so a venue’s change of contract size, an inverse instrument’s change of price scale, or this member gaining or losing the definition re-sends each row on which it moves any of the three, one delta per row — the same row a fresh subscribe shows, its lastSeq still the last move’s and the frame’s seq the definition change’s. A change that moves none of them sends nothing. An image you hold stays current even on a position no fill touches.
  • The topic description says which names are reserved (ledgerBalance, transfer, reconciliation) and that position is served only by a member whose deployment has switched positions on.

Across the deploy window. A client on 4.0.x that never subscribes to position sees nothing change. One that does keeps meeting TOPIC_NOT_ACTIVE from every member still on 4.0.x, and from a member on 4.1.0 whose environment has not switched positions on yet — the same refusal, the same response: wait, never correct yourself. Once a member serves it, its first image already holds every position the platform has counted. A client that generated its types from 4.0.0 gains one message and four schemas (positionSnapshotPart, positionDelta, positionRow, positionFee); an older parser that routes on msgType ignores position frames until it is regenerated.

4.0.0 — 2026-10-23 — accountBalance rows: venueTsNs is now venueUpdatedAtNs, the venue’s own stamp and never freshness

One property renamed, nothing else — and because a required property a typed client reads changes its spelling, this is a major: regenerate from 4.0.0 before a member serving it is in front of you.

What changed

  • accountBalance rows: venueTsNs is now spelled venueUpdatedAtNs. Same position, same type (a string or null), same value: the venue’s own stamp on the balance as it stood at the latest observation of the pool — the holding’s change time where the venue stamps that (OKX), the account’s update time where it stamps that (Binance), the answer’s time where it stamps only that (Bybit) — null where the venue stated none.
  • What the name says. It is the venue’s as-of for the state it reported, never freshness on this platform: it can move without the holding moving and stand still while the platform reads the holding every 30 s, so a client that aged venueTsNs called an idle OKX account stale. The clock to age is on the HTTP lane: every account row there now carries readAtNs (trading-gateway 0.49.0), when the account was last read at its venue, null while nothing reads it. observedAtNs is unchanged — the platform time of the reading, moved by every change and by every heartbeat restatement while the connector serves the key, the venue answering or not: the row’s clock, not the account’s.
  • Generated clients. accountBalanceRow.venueTsNs is accountBalanceRow.venueUpdatedAtNs. Nothing else in the document moves.

Both sides of the deploy window. A member below 4.0.0 pushes venueTsNs; a member at 4.0.0 pushes venueUpdatedAtNs in its place, never both. A client built from 4.0.0 meets an older member’s rows with the new name absent — read absent as null, the venue’s stamp unstated — and a client built from 3.0.0 meets a new member the same way round; the keys, the amounts and observedAtNs read the same on both sides. There is one member per environment, so the window is the restart itself.

3.0.0 — 2026-10-23 — capabilityScope respelled: org:manage; the platform’s two bits leave the enum

A major, by this document’s rule that a renamed enum member is one: capabilityScope’s orgs:manage is org:manage — the same bit, your organisation’s own settings — and the platform’s two lifecycle bits, orgs:propose and orgs:approve, leave the enum under their new names, internal-platform:propose and internal-platform:approve: they are the internal platform API’s, served on its own document. A platform member’s row still carries them, and a client may meet one as a capabilityScope value this document does not list — treat it as a name you do not know, as the description says. No channel, message or other field changes. A client generated from 2.0.0 meets org:manage where it expects orgs:manage once a member serves 3.0.0; regenerate.

2.0.0 — 2026-10-16 — one lifecycle vocabulary: DISABLED and DELETED on every row

Two enum members renamed, nothing else — and because a value a typed client switches on changes its spelling, this is a major: regenerate from 2.0.0 before a member serving it is in front of you.

What changed

  • account.status: FROZEN is now spelled DISABLED and RETIRED DELETED. The enum is UNKNOWN, DISCOVERED, PENDING_APPROVAL, ACTIVE, DISABLED, DELETED, each value at the position it held.
  • credential.status: SUSPENDED is now spelled DISABLED and REVOKED DELETED. The enum is UNKNOWN, DRAFT, PENDING_APPROVAL, ACTIVE, DISABLED, DELETED.
  • The meaning of each value is what it was: DISABLED is the reversible stop — the row does not operate until an enable is approved — and DELETED is the end. One word for each, on every row the platform serves, where an account said frozen and a credential suspended for the same state.
  • Deleted rows stay in your image. This contract’s rule stands: a row never leaves, status is the signal, never absence, because a client that dropped a deleted account would lose the name an old order still refers to. Filter on status for what a picker should offer.
  • No op, channel, frame, close code or other field changes. The health readings on a credential are untouched.

During the deploy window the two sides spell one row two ways: a 1.8.x member serves FROZEN / RETIRED on an account and SUSPENDED / REVOKED on a credential, a 2.0.0 member DISABLED / DELETED on both. The row’s position and every other field are the same from either side. Until the fleet is level, switch on both spellings — treat FROZEN and SUSPENDED as DISABLED, RETIRED and REVOKED as DELETED — and afterwards a client regenerated from 2.0.0 types the enums with the new members only.

1.8.1 — 2026-10-16 — a credential’s account health detail spells its symbols in ASCII

Behaviour only: nothing in the shapes changes. The credential message’s health.account.detail — the account connector’s reading — is ASCII, and until now every character outside ASCII that the connector or the venue wrote arrived as ?: §4.3 — denied read ?4.3 ? denied. The connector serving the credential now spells those characters in ASCII before the text is recorded, so the same text reads section 4.3 - denied — a dash or a minus sign as -, § as section, an ellipsis as ..., curly quotes as straight ones, no-break and thin spaces as a space, × as x and → as ->. Any other character outside ASCII still reads ?, one per character. Display the text; do not parse it.

During the deploy window a 1.8.0 member and a 1.8.1 member send the same bytes: a credential carries what its connector last reported. A detail reported before that connector was upgraded keeps its ? until the connector reports again — at the next change of status or reason, or at its restatement, at least every 30 seconds.

1.8.0 — 2026-10-13 — capabilityScope gains orgs:manage

The platform’s capability vocabulary gains one value, orgs:manage, and this document follows: one value added to the capabilityScope enum — the auth ack’s and sessionOpened’s session.capabilities — which is why this is a minor (regenerate: a typed client’s scope enum gains a member). No op, channel, message or code of yours changes.

What changed

  • session.capabilities may carry orgs:manage, served in declared order after algos:read. It is the organisation’s own settings — on the HTTP lane, the approval policy (PUT /org/approval-policy) and the second approval of a lowering — and organisation administrators hold it from this release. No channel reads it and no op on this socket is admitted by it, so it is shown here, never acted on. The rule the field’s description already states holds: a value you do not know is a grant you cannot use — show nothing for it, never treat it as an error.
  • info.version moves from 1.7.0 to 1.8.0.

Each side of the deploy window

A 1.7.0 member never serves the scope — the ack renders the scopes its build names, so a bit it cannot name is dropped from the array; a 1.8.0 member serves it on every principal granted it. A client generated from 1.7.0 whose scope enum is closed regenerates before it authenticates a principal holding the new scope; a client that does not validate the enum keeps working against either. Nothing on this socket is granted or refused by the value, so a mixed fleet differs only in whether the array shows it.

1.7.0 — 2026-10-12 — a subscribe needs the channel’s read grant, and a session loses its socket when a grant it watches on is withdrawn (FORBIDDEN_CAPABILITY on subscribe; close code 4005)

Until now any admitted session watched every channel of its organization. From this release a subscribe needs the channel’s read grant — the ten <family>:read capabilities 1.6.0 appended to capabilityScope, which this edge now reads them for.

  • subscribe is refused FORBIDDEN_CAPABILITY for a channel the session’s principal may not read — order and execution need orders:read, account and accountBalance accounts:read, credential credentials:read — with failedTopicIndex naming the entry, as a typo is named, and the whole frame arming nothing: all or nothing is what makes a retry safe. venueCapability is no organization’s data and needs no grant. The code is the one the writes already answer; a client that routes on it meets it on a new op.
  • A capability reads its own family. Holding any <family>:<verb> reads that family: orders:trade reads order and execution, accounts:propose reads account and accountBalance, credentials:approve reads credential. Nothing crosses a family — a trader watches account only with accounts:read, which the Trader preset now carries — and session.capabilities on sessionOpened and the auth ack lists what the session may subscribe to. The gate reads the register’s row at the frame, never that list: a grant cleared after the session opened refuses the next subscribe.
  • Close code 4005 GRANT_WITHDRAWN (retryable: true), a new member of the closed sessionClosing enums: a read grant one of the session’s subscriptions depended on was withdrawn while the session watched — a read is a push, so there is no next frame to refuse, and the close is what stops the data, as 4003 is for a revoked membership. Reconnect: sessionOpened states the grant that remains, and subscribe to what it covers. A grant that still covers every subscription closes nothing. A typed client’s close-code enum gains a member: regenerate, or keep the default arm.
  • unsubscribe needs no grant, as before.

Both sides of the deploy window. A 1.6.0 member serves every channel to every admitted session and never sends 4005; a 1.7.0 member refuses a subscribe the principal’s capabilities do not cover and closes a session whose grant moves under it. A client of 1.6.0 meeting a 1.7.0 member reads FORBIDDEN_CAPABILITY on a subscribe — the code it already knows from the writes, retryable: false: the client needs a grant, not a retry — and 4005 as a close code outside its generated sessionClosing enum — 1.6.0 stated no rule for a close code it did not list, so a client that routes the four it knows and treats the rest as final stays down after a grant is withdrawn, though it is still a member. Add the arm now: a close code you do not know is retryable — reconnect, and subscribe to what the row still reads — which is what 4005 means (this document says so on sessionClosing.code). Grant the reads first, then roll: a principal holding a verb bit in every family it watches loses nothing; one watching a family it holds no bit of (an accounts:approve holder watching order) needs that family’s :read grant on its row before a 1.7.0 member answers its subscribe.

1.6.0 — 2026-10-12 — the account and credential rows follow the register’s re-cut: health reads per connector, transferCredentialId arrives, location, temperature and appGroup leave

Regenerate before the deploy reaches you. Three members leave and one changes type, so a client generated against 1.5.0 that requires location, temperature or appGroup, or reads health as one report, breaks on a 1.6.0 frame. Nothing else changes: the frame grammar, the ops and the refusal vocabulary are as in 1.5.0.

The register’s rows were re-cut, and the two channels that serve them follow:

  • credentialRow.health is one reading per connector. health is now an object with account — the venue’s account connector’s reading — and trading — its order-entry connector’s — each a connectionHealth or null. One key is served by both when it reads balances and trades; a balances-only key never has a trading reading. A client that read health.status reads health.account.status or health.trading.status, whichever role it depends on. An order-entry connector reports on a key once an ACTIVE account trades through it, so a trading key’s trading is null until then.
  • credentialRow.appGroup is gone. Which connectors serve a key follows from its venue and its flags (canReadBalances, canTrade), both already on the row.
  • accountRow.transferCredentialId arrives — the OTHER credential transfers out of the account ride, null when the account moves funds through its own pipe: the tradingCredentialId rule.
  • accountRow.location and accountRow.temperature are gone — the register no longer records them; ownership and purpose stay.
  • capabilityScope gains ten read grants — users:read, credentials:read, accounts:read, account-addresses:read, portfolios:read, asset-policies:read, chain-policies:read, trading-policies:read, orders:read and algos:read, appended after algos:manage — the register’s own vocabulary, which session.capabilities may now carry. The list’s rule stands: a grant you do not know is one you cannot use, never an error.

Both sides of the deploy window. A 1.5.0 member sends location, temperature, appGroup and a single health (a connectionHealth or null); a 1.6.0 member sends the shapes above. A 1.5.0 client reading a 1.6.0 frame finds health an object where it expected a report or null, and three required members absent: it must be regenerated first. A client generated against 1.6.0 meets the three departed members on a 1.5.0 frame and ignores them, as the document asks of every unknown property, but reads health there as one report or null — treat that as the account connector’s reading until every member serves 1.6.0. It also finds transferCredentialId, which 1.6.0 requires, absent on a 1.5.0 account frame: read it as optional, or hold the regeneration, until every member serves 1.6.0.

1.5.0 — 2026-10-07 — an unregistered principal is refused NOT_REGISTERED (a refusalCode value appended)

  • refusalCode gains NOT_REGISTERED (retryable: false) — a minor, as 1.2.0 was for capabilityScope: a typed client’s refusalCode enum gains a member, so regenerate, or keep the default arm the enum’s description asks for. The register holds no claimed row for the principal: the token’s organization is not registered on the platform, its subject binds no row and no open invitation at its verified address can be claimed here, or its row is one nobody has claimed yet (an INVITED or a DISCOVERED row). This socket claims nothing — a person’s first sign-in claims their invitation on the HTTP lane (GET /me, or the POST /v1/ws-tickets mint the socket needs), after which every edge admits them. A client that opens the socket first is refused at the upgrade with 403 (counted under trading_ws_gw_upgrades_total{outcome="notRegistered"}), and an in-band auth naming such a principal is acked NOT_REGISTERED.
  • AWAITING_ADMISSION is no longer emitted. The value stays in the closed enum, so a client built against 1.4.1 keeps its branch; the situation it named — a row discovered at the door and awaiting an administrator’s admission — no longer arises, since the door discovers nobody. An organization the register has not met, which answered ORG_NOT_ACTIVE (“awaiting activation”) before, answers NOT_REGISTERED now: nothing a sign-in does registers an organization — a platform member does, on the HTTP lane.
  • The ticket’s upgrade and the in-band auth answer the same ladder as before for every other principal; nothing else on the wire changes.

During the deploy window a 1.4.1 member answers an unregistered principal AWAITING_ADMISSION or ORG_NOT_ACTIVE where a 1.5.0 member answers NOT_REGISTERED; both are retryable: false, and a client’s default arm treats either as “not admitted — sign in on the HTTP lane first”.

1.4.1 — 2026-10-07 — the ticket states its own rules

Documentation only: nothing on the wire changes. The ticket security scheme now states the ticket’s whole flow and its rules, which the REST API guide stated until now: how to create one with the REST API’s POST /v1/ws-tickets and open the socket with it, that it opens one session once and soon, that it is a credential, how long the session it opens lasts, how creating one is admitted and rate-limited, TICKETS_UNAVAILABLE, and CORS.

During the deploy window a 1.4.0 member and a 1.4.1 member behave identically.

1.4.0 — 2026-10-05 — authenticate on the handshake: a ticket or a bearer token, and sessionOpened

What changed

The WebSocket handshake carries the credential, so a session is authenticated before it exists — and a refused one never exists at all.

  • Two credentials, exactly one per handshake (the contract’s new ticket and bearer security schemes, and the channel’s WebSocket binding):

    • a browser puts a ticket in the URL: wss://…/?ticket=<ticket>. It comes from the REST API’s POST /v1/ws-tickets, just before you connect: single-use, valid for about 10 seconds, never past your token’s expiry. Create one per connection attempt.
    • any other client sends Authorization: Bearer <access token> on the handshake. The token must state an expiry.
  • Accepted: the session’s first frame is sessionOpened, sent before you say anything: {"event":"sessionOpened","msgType":"sessionOpened","data":{"capabilities":[…],"expiresAtNs":"…"}}. data is the same grant authAck carries (now the shared sessionGrant schema). Subscribe straight away. In the rare case your access is revoked between the handshake and that first frame, you receive sessionClosing with PRINCIPAL_REVOKED and close code 4003 instead — not retryable, as for any revoked session.

  • Refused: no session; the handshake is answered with an HTTP status —

    • 400 a ticket and a bearer both, or a malformed handshake;
    • 401 no credential at all, or one that does not verify, has expired, or was already used;
    • 403 a disallowed Origin, or a principal the platform refuses;
    • 503 this member is not ready yet, or is too busy to check the credential now — retry with a new ticket (most refusals spend the one you presented).

    A browser cannot read the status of a failed WebSocket handshake, only that it failed: on any failure, create a new ticket and retry with backoff.

  • op: auth is now only the re-auth. The 1.0–1.3 flow — open the socket without a credential, then send op: auth first — is refused: the handshake answers 401. op: auth renews the credential of an open session for the same principal, as before (answer sessionExpiring with it), and its answer is still authAck. UNAUTHENTICATED is no longer emitted, since no op can arrive before authentication.

During the deploy window: there is none to bridge. No release of this edge before 1.4.0 carried client sessions, so a client is written against 1.4.0 from the start: credential on the handshake, sessionOpened first, op: auth only to renew.

1.3.1 — 2026-10-02 — the opening handshake: split and larger upgrades connect, malformed targets are refused, every refusal is a status

What changed

Only the WebSocket opening handshake: the HTTP GET that upgrades to a socket. Nothing after the 101 changes. The handshake changes in both directions — some upgrades that used to fail now connect, and one kind that used to connect is now refused:

  • Upgrades that used to go unanswered now complete. Before, three well-formed kinds were never answered and were dropped after 10 seconds: a request split across TCP segments, one larger than about 1 KB (up to the 8 KB cap below), and one with a : anywhere in its request line (a query value such as ?at=12:00). All three now get their 101.
  • The upgrade request is limited to 8 KB, request line and headers together — a wider limit than the effective 1 KB before. A larger one is answered 431 Request Header Fields Too Large, with no socket.
  • A malformed request target is now refused, where it used to connect. A target holding a space, a control character or an unencoded non-ASCII byte, or one beginning //, used to complete the upgrade; it is now answered 400 Bad Request, with no socket. Percent-encode the target, and never begin it with //.
  • A request that is not a valid upgrade is answered 400 Bad Request at once — a non-GET method, or a missing Upgrade, Connection or Sec-WebSocket-Key header. Before, it was held for 10 seconds and dropped without a response.
  • An upgrade that never completes is answered 408 Request Timeout after 10 seconds, instead of being dropped silently.
  • No message from a client is lost or reordered at connect. A frame sent immediately after the 101 is delivered only after the session is open, and is never dropped.

Each side of the deploy window

Both directions, so state them both. Against a 1.3.0 member, a split, larger-than-1 KB or :-bearing upgrade is dropped without a response, a non-upgrade request is held and dropped, and a malformed target connects; against a 1.3.1 member, the first three connect, the non-upgrade is 400, and the malformed target is refused 400. While members roll, such a client connects or fails depending on the member it reaches. A well-formed upgrade that arrives in one segment, under 1 KB and with no : in its request line, sees no difference on either side. A browser cannot read these statuses (a failed upgrade reaches the page only as an error event); a non-browser client can, and should treat 4xx as “fix the request” and 408 as “retry”.

  • info.version moves from 1.3.0 to 1.3.1.

1.3.0 — 2026-10-01 — order rows name the algo instance

Every order and refusal on the order channel now says who placed it — a user or one of your organization’s algo strategies: one field added to both order row shapes, algoInstanceId, which is why this is a minor (a typed client’s row gains a member; the deploy window below says when to regenerate). No op, channel, code or existing field of yours changes. A strategy’s orders reach this channel only once an algo engine runs on the platform; until then the field is null on every row.

What changed

  • orderRow.algoInstanceId — the algo instance that placed the order, or null on an order a user placed. A strategy’s order carries userId: 0 beside it; exactly one of the two names the submitter. Tell a strategy’s order from a user’s by this field, never by userId == 0.
  • orderRejectedRow.algoInstanceId — the same for a refusal: the instance whose command was refused, or null when a user acted.
  • userId’s description on both rows now says it is 0 when an instance acted. Its value is what it always was: 0 has not appeared on this wire, because no strategy has placed an order — the first can only once an algo engine runs on a platform from this release on.
  • info.version moves from 1.2.0 to 1.3.0.

Each side of the deploy window

A 1.2.0 member never serves the field; a 1.3.0 member serves it on every row, null on every user’s order — so the rows you already see differ only by "algoInstanceId": null. A client that ignores properties it does not know (the standing rule above every payload) works against either member unchanged; a client that refuses them breaks on the first 1.3.0 row. A client regenerated from 1.3.0 meets rows without the key while any 1.2.0 member still serves it: until every gateway it reaches serves 1.3.0, read an absent algoInstanceId as null — a user’s order, unless userId is 0 — and never regenerate a client that enforces required ahead of its gateway. The first strategy order can exist only once the platform side of this release is deployed and an algo engine runs, and a 1.2.0 member that renders one shows userId: 0 with no instance — so deploy the gateway with the platform, and read a userId of 0 on a row without the field as “a strategy placed this”, never as a user.

1.2.0 — 2026-10-01 — capabilityScope gains algos:manage

The platform’s capability vocabulary gains one value, algos:manage, and this document follows: one value added to the capabilityScope enum — the auth ack’s session.capabilities array — which is why this is a minor (regenerate: a typed client’s scope enum gains a member). No op, channel, message or code of yours changes. This version is the scope append and nothing else.

What changed

  • session.capabilities may carry algos:manage, served in declared order after orgs:approve. It is the bit that admits every command of the algos surface on the HTTP lane (create, configure, start, stop, delete, halt — that lane’s changelog describes the routes as they arrive) and the organisation’s authority for its robots to trade. Nothing on this session reads it: submitOrder and cancelOrder are admitted by orders:trade exactly as in 1.1.1, and this scope is shown here, never acted on. The rule the field’s description already states holds — a value you do not know is a grant you cannot use: show nothing for it, never treat it as an error.
  • info.version moves from 1.1.1 to 1.2.0.

Each side of the deploy window

A 1.1.1 member never serves the scope — the ack renders the scopes its build names, so a bit it cannot name is dropped from the array; a 1.2.0 member serves it on every principal granted it. A client generated from 1.1.1 whose scope enum is closed regenerates before it authenticates a principal holding the new scope; a client that does not validate the enum keeps working against either. Deploy order is register → gateway, as on the HTTP lane: a member that names the scope reads it off a register that recognises it. Nothing on this session is granted or refused by the value, so a mixed fleet differs only in whether the array shows it.

1.1.1 — 2026-09-25 — every boolean constant states its type

The contract’s boolean constants now state their type: success on every acknowledgement and refusal, isSnapshot on every snapshot part, delta and orderRejected, and reduceOnly on submitOrder. 1.1.0 gave their values (const: true, const: false) without type: boolean, and a generator that reads an untyped constant as a string builds a client that expects a string where the frame carries a JSON boolean. Such a client parses no acknowledgement, refusal, snapshot or delta. 1.1.1 states type: boolean beside each value. Nothing else in the document changes.

Both sides of the deploy window. The wire does not change: a member on 1.1.0 and a member on 1.1.1 send byte-identical frames, carrying exactly the values 1.1.0 documented. A client generated from 1.1.1 types these fields as booleans. A client generated from 1.1.0 keeps whatever its generator made of them; if it made strings, regenerate from 1.1.1.

1.1.0 — 2026-09-25 — the door

submitOrder and cancelOrder are served. 1.0.0 published them as prose and answered UNKNOWN_OP; this version publishes their messages and answers them for real.

Both sides of the deploy window. A client generated against 1.0.0 keeps working unchanged: nothing it reads moved, and the six channels’ row schemas are byte-identical. A client that starts sending submitOrder sees UNKNOWN_OP from a member still on 1.0.0 — which is the same answer 1.0.0 documented — and a real answer from one on 1.1.0. There is no frame a 1.0.0 client can receive from a 1.1.0 member that it could not receive before, except on the order channel: see the msgType note below.

What is new

  • submitOrder → submitOrderAck. A success is an offer, not an acceptance: the command reached the stream, and nothing about admission is known yet. There is no orderId on the ack and there cannot be — the owner mints one when it admits the command. Correlate on the clientOrderId you chose.
  • cancelOrder → cancelOrderAck, echoing the orderId this edge resolved. orderId is null when you named a clientOrderId whose order has not reached this member yet; the owner resolves it from its own pending book. A null is not a failure.
  • orderRejected on the order channel — the owner’s refusal, carrying reason, message, the observedValue/limitValue detail pair and the unit that pair is measured in. Read the pair’s own nullness: whether a refusal states one is a property of the check that fired, not of the reason, and the same reason can arrive bare on one refusal and with two numbers on the next (a connection refused hard states nothing; one refused for exceeding its degraded grace states the duration and the grace, in NS). unit is null whenever the pair is null, and also for INVALID_FIELD, whose checks measure a price on one path and a quantity on another — take a null unit beside a stated pair as unlabelled, not as a default unit.

Two things to change in your client

  1. Switch on msgType on the order channel. It now carries two shapes: orderUpdate (the applied image, as before) and orderRejected. Both are event: order / topic: order because they are one subscription. A client that upserts every order frame into its blotter map without reading msgType will insert refusals as if they were orders. msgType was a required const in 1.0.0 for exactly this moment.
  2. Do not key a map on orderRejected. It is never in a snapshot — isSnapshot is pinned false on that message — because a refusal is a fact no fold holds: nothing was minted, so there is no row to retain or restore. Refusals are live-only. A blotter rebuilt on last: true will not get them back, and that is the contract, not a gap.

Money and ids on the way in

  • price and qty are decimal strings, exact at the instrument’s own scale. A value that does not fit that scale exactly is refused, never rounded: submitting a quantity you did not write is worse than refusing the one you did. Trailing zeros are free — "0.0350" and "0.035" are the same number at scale 4.

  • cancelOrder.orderId is a decimal string, the same form this API renders it in. A JSON number is refused. An int64 does not survive a JSON number in a JavaScript client, which is why orderRow.orderId has always been type: string; accepting a number on the way in would have made the wire asymmetric in the one direction where the round-trip matters.

  • Name the account by account or by accountId, and the instrument by instrument or by instrumentId — at least one of each pair, and both stated must agree. Sending both is fine, and is what an interface holding the id it resolved and the name a trader typed will do; only a disagreement refuses (MALFORMED). The HTTP lane states the identical rule for the identical body, for both pairs.

    Prefer the ids where you hold them. A symbol is reference data’s to change and an id is not, so a rename between your read and your submit turns a symbol into UNKNOWN_INSTRUMENT while the id still resolves.

  • Sizing and precision come from reference data, and that API is not published yet. price is exact at the instrument’s priceScale and qty at its qtyScale, and the owner further refuses TICK_SIZE_VIOLATION, QTY_STEP_VIOLATION, QTY_BOUND_BREACH and MIN_NOTIONAL_BREACH against its tick, step, bounds and minimum notional. Those live on the refdata instrument row — and a scale is not a tick: a venue’s tick can be coarser than the scale, so scales alone will not tell you whether a price is placeable. A reference-data API serving that row is planned and not yet available; until it ships you cannot pre-validate sizing, and a miss costs a round trip whose refusal names the observed value against the limit it breached. The contract will name that endpoint once it exists.

  • The schema now states the rules the door enforces, so a generated validator agrees with the server: price and qty carry the decimal-string pattern, cancelOrder.orderId and instrumentId carry theirs, price is required for LIMIT and refused on MARKET as a oneOf, and reduceOnly is const: false because v1 refuses it outright. Nothing the server accepted before is refused now — these describe behaviour 1.1.0 already had.

  • Name the order by orderId or by clientOrderId, exactly one. This one really is either/or: neither is refused because nothing is addressed, and both is refused too, because unlike the account pair there is no lookup that could tell you they agree.

Your idempotency key, and how to recover an outcome you never saw

  • clientOrderId deduplicates against (organization, clientOrderId) for the platform’s whole retention window — not merely while the order is live. Re-sending a submit under a key you already used restates the existing order’s outcome and never places a second order.
  • CLIENT_ORDER_ID_CONFLICT does not mean “you reused your own key.” It means another user of your organization holds that key. (1.1.0’s first cut said “already in use by a live order” — that text was wrong on both counts and is corrected.)
  • So the recovery is: re-send the identical submit under the same clientOrderId. If the socket drops after an ack and the order is absent from the order image — which reads the same for “refused” and “not folded here yet” — re-sending is safe and is the procedure. Minting a new key instead is what risks two orders.
  • A refusal answer to a write guarantees nothing reached the stream, so re-sending after one is always safe.
  • Correlate on command, not on clientOrderId alone. A refused cancel arrives as orderRejected carrying the order’s clientOrderId — the same key a refused submit carries — so matching on the key alone shows a cancel’s refusal as though the order was never placed. A cancel can also fail a second way: the venue rejects it, which arrives as an orderUpdate with transition: CANCEL_REJECTED, not as an orderRejected.

What a subscription delivers, and what it is needed for

  • order carries the ORGANIZATION’s orders — every principal’s, and the HTTP lane’s as well as this one. Filter to what you sent before you show a refusal to a trader.
  • Subscribe to order before you write. A session that writes without holding it is acked and then never told what happened; the ack says the command reached the stream and nothing more.
  • A write’s ack precedes its outcome, so you never see an outcome for a command you have not seen acknowledged.

The refusal codes the door needs

INVALID_FIELD, INVALID_PRICE, INVALID_QTY, INVALID_CLIENT_ORDER_ID, UNKNOWN_INSTRUMENT, UNKNOWN_ACCOUNT, UNKNOWN_ORDER, NOT_SERVING, OWNER_ABSENT and BACKPRESSURE join refusalCode in this version, beside the ops that write. They are the only additions to that enum, and a client generated against 1.0.0 meets them the first time it sends a write — which is why the enum has always said to tolerate a value it does not know and to read retryable instead.

One of the ten is reserved: OWNER_ABSENT is published but not emitted by 1.1.0. When the orders owner is not established, a write refuses NOT_SERVING in this version. Handle OWNER_ABSENT as you would any other retryable refusal so that nothing has to change when a later version starts sending it, but do not expect to observe it yet.

A NOT_SERVING or BACKPRESSURE refusal is retryable: true and is a statement about this member, never about your capabilities: retry, or reconnect to another member.

1.0.0 — 2026-09-25 — the read edge

The first version. One WebSocket session on which an organization’s principals watch their trading state: authenticate, subscribe to any of six channels, receive a complete image and then every change to it.

This version is read-only, and says so. There is no write op in the document and none is served: a frame naming one is answered UNKNOWN_OP, like any other op this build does not have. An earlier draft of this document claimed submitOrder and cancelOrder were “documented here but not yet served” while carrying neither — a sentence a client could act on and nothing could deliver. Order entry lands in 1.1.0, with its envelopes published before it is served.

What this version states that a client must read

The behaviour below was always the behaviour; none of it changed. It was in the platform’s plans rather than in the contract, which meant a consumer had to derive it — and a derived store model is the class of bug this document exists to prevent.

  • Per channel: what the image holds, and how a row leaves it. Each of the six messages now states its snapshot scope, its retention, and the signal that a row is gone. The answers differ and the differences matter: order serves every live order whatever its age plus terminal orders inside a served window (24 h by default); execution has no window and follows its orders; accountBalance, account and credential never remove a row — an emptied pool is reported as zero, and a retired account or a revoked credential is served with its status. Where a row can leave (order, execution, by the platform’s own retention), the release rides no wire: there is no tombstone, and a resync is how a client learns.
  • Ordering. A subscribe ack precedes the first part of every topic it named; a topic’s parts are contiguous, with no delta of that topic between them; every delta that follows carries a seq at or past the part’s. Topics named in one subscribe are imaged in the order named. Across topics nothing is guaranteed and nothing needs to be.
  • The inbound budget and the heartbeat. 50 frames per second refuses, 500 closes with 4004, both over a tumbling one-second window per session; a refused frame is applied to nothing and answers on its own op. The heartbeat is every 5 seconds by default, and streamAgeMs is how long ago this member applied a platform fact — pick a dead-socket timeout from the interval, never from that number.
  • additionalProperties: false is about the producer, not you. It is how this gateway’s tests refuse to serve an undocumented field. Ignore properties you do not know: fields are added in minors and a client that refuses one will break on the first.

orderRow gains message — the platform’s words for its reason

reason is a stable enum name, and for the reasons the platform decides — OWNER_TIMEOUT, INSTRUCTION_FRESHNESS_EXPIRED, RECONCILE_PROOF — no venue ever said anything, so venueText was null and a client had no sentence to show a human. The only route to one was a code-to-text table of its own: the hand-held table v2.0.0 removed, arriving back through the side door.

message is the platform’s voice; venueText is the venue’s. They are not alternatives, and a client shows both:

the row saysmessagevenueText
reason: OWNER_TIMEOUT”the platform gave up waiting for the venue to answer”null — no venue spoke
reason: VENUE_REJECTED”the venue rejected this order""insufficient margin”
no reason (the ordinary path)nullnull

Render message, then venueText after it when present. A rule that rendered one instead of the other would hide the informative half exactly where it mattered most — on VENUE_REJECTED, where the venue’s own words are the whole point.

Nothing on the platform’s wire moved: message is derived at this edge from the reason the row already carries, from a table that is exhaustive by construction — a reason appended to the platform’s schema fails our build until someone writes what it says. It is display only: branch on reason, never on this string, which may be reworded in any release.

Three vocabularies are published instead of promised

  • exchange is one $ref shared by accountRow, credentialRow and venueCapabilityRow, so the whole-string joins an order form makes are sound by construction. It is deliberately not a closed enum — the platform lists a venue by carrying a reference-data row, not by cutting a release, so a closed enum would make every new listing a breaking change. Today’s members are published as examples. The market-type split is part of the name: binance_spot and binance_usd-m are two venues, not one with an attribute.
  • capabilities on the auth ack is the HTTP lane’s seventeen scope strings, published as an enum and held equal to the platform’s own by a lockstep test. Append-only: treat an unknown scope as a grant you cannot use, never as an error.
  • instrumentId is one $ref across orderRow and executionRow, and the description answers the cutover question outright: it is the platform’s own reference-data key, an int64 as a decimal string, and it does not equal an immix-api v2 Instrument.id. Join through instrument, the platform symbol, once.

A snapshot part and a delta are two named shapes

Each of the six topic messages is a oneOf of <channel>SnapshotPart and <channel>Delta, discriminated by a const on isSnapshot. The part requires snapshotId, part and last; the delta does not carry them at all — not as optional fields, not at all.

A generated client gets two types to switch on instead of one with three optionals to null-check. Named variants rather than a JSON-Schema conditional deliberately: if/then is stripped before generation by the toolchain the consumer generates with, so a conditional would reach their types as exactly the loose optionals it was meant to remove. submitOrder.params is built the same way, for the same reason.

No frame changed by this.

What a client does

  1. op: auth with a bearer token. The answer carries the grant, not the grantee: capabilities and expiresAtNs, with no identifier in it. Read your own identity from the HTTP lane’s GET /me.
  2. op: subscribe with topic names from the closed set. The ack arrives first, then a complete image as numbered snapshot parts.
  3. Upsert by key into a map that part: 1 cleared. Snapshot parts and deltas are the same shape and are applied the same way; the image is complete at last: true.

A repeat subscribe for a held topic re-pushes the image — that is the resync, and there is no separate op for it.

The v2 → v3 map

For immix-control-centre, which vendors the v2 spec at 5.0.0. The things it isolates in one place (channel names, topic shape, store keys) change freely; the things it depends on structurally (the {op, reqId, params} envelope, the auth flow, string numerics, account and instrument display names on rows) are kept; the things it works around (snapshot chunking, payload sniffing, flat frames, uncorrelated errors) are fixed so the workaround is deleted.

v2v3What it costs the client
{op, params:{token}, reqId} authunchanged; the answer adds session{capabilities, expiresAtNs}none — identity comes from GET /me, never from the ack
topics as {channel, account} objects or dotted stringsbare channel-name strings from a closed set; no account or bookbuildApiTopic returns a string; the per-account subscription managers collapse to one subscribe per channel
op-less errorEvent (+ 429/503 on the op)every failure is an op-response with code + retryable; op: "error" only for a frame whose op could not be readthe errorEvent bridge is deleted; add retryable-driven backoff, which is the 429 handling that was missing
integer code (open) + messagestring RefusalCode (closed, tolerated-unknown) + message + retryablekey on BACKPRESSURE rather than 503
order: orderUpdate / orderCancelReject / orderAmendReject, msgType sniffedorder: orderUpdate / orderRejected, msgType required on every messagedelete the payload heuristics. v2’s single orderCancelReject splits in two, because v2 conflated two events: the platform refusing the cancel command (unknown or already-terminal order) arrives as orderRejected command: CANCEL, correlated by orderId or by the clientOrderId the cancel named; the venue refusing a cancel already instructed arrives as an orderUpdate with cancelRequested: false and transition: CANCEL_REJECTED, folded into the row it describes, so applying a status stays a plain upsert
fillsexecution, rows keyed executionIdrename the channel; row key fillId → executionId; the fill-echo fields on the order row are gone — join by orderId
externalBalance (locked)accountBalance (held)rename; column locked → held
accountStatus (accounts + connection status in one)account + credential, two channelsthe directory reads account, health reads credential, joined by credentialId
venueCapability nested per classvenueCapability flat rows, timeInForce as the accepted setnone — the order form can finally read it
gatewayTimeNs, keyIdseq, seqTsnone (declared, never read)
snapshot: one frame, silently split past a capisSnapshot + part + lastdelete the two defect docblocks; accumulate until last
PENDING_NEW / NEW / PENDING_CANCELED / …the platform’s status lattice plus live, terminal, cancelRequestedTERMINAL_STATUSES becomes terminal; the PENDING_* docblocks go
rejectReason (100+ values) + rejectSource + rejectMessage on the order rowadmission refusals are orderRejected; venue refusals are orderUpdate{reason, venueCode, venueText}read message/venueText; no client-side reject registry
unsolicited: true ordersexecution with orderId: nullthe “unknown order” rendering goes; a discovered-execution row instead
internalBalance, accountRisk, bookRisk, externalPositionreserved or absentno v3 target in this version — see Reserved names below
executionOrder, strategy, bookName, TWAP/PEG/ICE paramsabsentno v3 target until the algo platform; the flat-frame router branch is deleted

Money is served at the scale each value states

Every money value is a decimal string rendered from the scale the value itself carries, not from reference data. Parse it as a decimal and compare numerically.

Do not read meaning into the digit count. The same amount recorded at different precisions serves different strings — "2.5" and "2.500000" are the same number — because each states the precision its own fact carried. The string depends on the value alone, so it does not change as reference data catches up, and the HTTP lane serves the identical string for the same value.

Reserved names

position, ledgerBalance, transfer and reconciliation are real names whose domains have not landed. Subscribing to one answers TOPIC_NOT_ACTIVE, which is deliberately different from UNKNOWN_TOPIC: the first means wait for a release, the second means fix your spelling. They are activated additively, with a minor version bump and a section here.

Known gap in this version

execution.feeUsd is always null. The fee’s USD conversion needs signed wide-integer rendering that is not in place yet; null is inside the field’s contract — it never means the un-converted amount — so a client that treats null as “no value” is already correct and will keep working when the number arrives. notionalUsd and fxSource are populated.

Session lifetime

A session is closed when its credential lapses, when the register withdraws the principal’s membership, or when it floods the inbound budget. A sessionClosing frame naming the reason precedes the close, and sessionExpiring warns one lead time before a lapse so a client can re-authenticate over the open socket and keep its subscriptions.

The reason arrives twice, on purpose. The sessionClosing frame carries it with the retryable flag; the WebSocket close frame that follows carries the same number as its close code (RFC 6455’s private-use range — 4001 SESSION_EXPIRED, 4002 AUTH_FAILED, 4003 PRINCIPAL_REVOKED, 4004 RATE_LIMITED). Read whichever suits your client. A browser reads event.code off the close event whether or not it processed the last message, so a client that only ever sees the close still knows to mint a fresh credential rather than retry the same one — which is the difference between recovering and reconnect-looping.

The identity is immutable for the life of the socket: re-authenticating with a credential for a different principal is refused, and the session keeps the one it was opened with.