Update an instance's document
Stages a new config document for the instance (algos:manage), legal in every state but DELETED — while it runs too. If-Match is the instance’s configSeq (required: absent is 428, * unconditional; stale is 412 with currentVersion). Answers 200 with the staged document; the engine’s verdict lands later on its documents. One document awaits a verdict at a time (409 CONFIG_PENDING).
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
The instance’s id — a positive 32-bit integer the platform minted; the value an algo’s orders carry as algoInstanceId.
Headers
Required on every write: a URL-safe string of 1 to 64 characters from [A-Za-z0-9._~-] (a UUID fits), scoped to you. It names one operation on one record, ever: a retry replays the stored outcome (Idempotent-Replay: true) or attaches to the live one, and reuse on another record refuses 409 IDEMPOTENCY_KEY_REUSED. Missing or malformed, 400.
Required on every entity write: the ETag the read minted, quoted or bare — the version this write was computed against — or * to write unconditionally on purpose. Absent is refused 428 PRECONDITION_REQUIRED; a weak validator 400 INVALID_IF_MATCH; a stale value 412 VERSION_CONFLICT (CONFIG_SEQ_CONFLICT on an algo’s config write) with currentVersion and a fresh ETag: re-read, reapply, retry. Every write restates the whole record: a * write overwrites every field from your copy, a colleague’s amend since your read included. State the version unless you mean the overwrite.
Your own id for the request: 8 to 128 of [A-Za-z0-9._-]. It becomes the request’s id and is echoed on the response. A value off that grammar is replaced with a fresh id, never refused.
Query parameters
A position you hold — an X-Immix-Global-Sequence you read, or a 202’s commandGlobalSequence: this member answers only once it has folded the platform’s stream through it, waiting up to its deadline, then 503 PROJECTION_BEHIND with Retry-After. Within that stream a read is never older than what you have seen; drop your positions after an announced stream cut. A retry stating its 202’s position attaches to or replays that operation while the journal holds its key, never publishing twice. Stated once: one to nineteen digits, at most 9223372036854775807; else 400 MALFORMED_REQUEST.
Request
The new config document: JSON with comments, one object the version’s params schema types whole, each reference an id or, through the trading gateway, a name the gateway replaces with its id before the command is sent, as on the create; at most 6144 bytes of UTF-8 as written and as sent, and its distinct references at most 1280 bytes, 4 an account and 8 an instrument.
The configSeq this write was computed against; 0 = unconditional. A mismatch is refused with the current configSeq in the detail.
Why — at most 256 bytes of UTF-8; empty when none is given. Optional in this body: absent or null reads as "" — no remark.
Response
The document as staged — STAGED; the engine’s verdict is a later change, read on GET /algos/instances/{id}/configs/{seq} — with the answering change’s position and, on a replayed key, Idempotent-Replay. No ETag: a document carries no version.
Every account the document references, once each, ascending — the accounts the instance may trade.
The write’s Idempotency-Key, as sent.
The document’s sequence number on its instance: 1 for the document the instance was created with, one more for every accepted write.
The engine’s reason where it refused the document; empty otherwise.
The document as authored, comments included — at most 6144 bytes of UTF-8.
The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included.
Every instrument the document references, once each, ascending — 64-bit ids as decimal strings.
STAGED until the engine answers, then APPLIED or REFUSED; PENDING_APPROVAL is reserved and never served today. The value set is append-only: read an unknown name as UNKNOWN.
The submitter’s remark; empty when none was given.
When it was submitted — epoch nanoseconds as a decimal string.
Who submitted it — a member or an API key.
When the engine’s verdict landed — epoch nanoseconds as a decimal string; null while staged.
Reserved; always null.