Skip to navigation

Start an algo instance

Starts a STOPPED instance whose document the engine has applied and whose version is still loaded on its pool (algos:manage); otherwise 409 ILLEGAL_TRANSITION, 422 NO_APPLIED_CONFIG or 422 VERSION_NOT_ON_POOL. Takes no If-Match (one refuses 400). Answers the row, STARTED.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

idintegerRequired

The instance's id — a positive 32-bit integer the platform minted; the value an algo's orders carry as algoInstanceId.

Headers

Idempotency-KeystringRequired

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.

Request

This endpoint expects an object.
remarkstringRequired

Why — required on every change, at most 256 bytes of UTF-8.

instanceIdintegerOptional
The instance to start.
commandKeystringOptional

The command's idempotency key, 1 to 64 characters of letters, digits, dot, underscore, tilde and hyphen; a replay restates the earlier answer.

Response

The instance as the platform now holds it after the write — the same row the read serves, with the answering change's position, the row's ETag and, on a replayed key, Idempotent-Replay.

algoVersionIdinteger

The catalog version the instance runs (GET /algos/versions).

appliedConfigSeqinteger

The document in force; 0 while none has been applied.

configSeqinteger

The latest staged document's sequence number — the ETag, and what If-Match takes on a config write.

createdAtNsstringformat: "^-?[0-9]+$"

When it was created — epoch nanoseconds as a decimal string.

displayNamestring
The instance's display name, as created.
globalSequencestringformat: "^[0-9]+$"

The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included.

instanceIdinteger

The instance's id — the value its orders carry as algoInstanceId.

lastCauseenum

Why it last moved: a command, the organisation's halt, its first document applied, the engine's fault trip, or the engine's divergence check. The value set is append-only: read an unknown name as UNKNOWN.

lastCommandKindenum

The command behind the last move — a desk's, or the engine's report that moved it. The value set is append-only: read an unknown name as UNKNOWN.

lastUpdatedAtNsstringformat: "^-?[0-9]+$"

When it last moved — epoch nanoseconds as a decimal string.

orgIdinteger
The organisation that owns the instance.
poolstring
The engine pool the instance runs on, fixed at creation.
statusenum

Where the instance stands: CREATED until its first document is applied, STOPPED or STARTED under the desk, ERROR after the engine's fault trip (left only by a stop), DELETED terminal. PENDING_APPROVAL and DISABLED are reserved and never served today. The value set is append-only: read an unknown name as UNKNOWN.

transitionSeqinteger

The instance's transition number: 1 at creation, one more on every move.

createdByUserIdinteger or nullOptional
The user who created the instance.
lastUpdatedByUserIdinteger or nullOptional

The user whose command last moved the instance; null when the engine or the platform's own rule did — lastCause says which.

pendingByUserIdinteger or nullOptional

Reserved; always null.

unscaledbooleanOptionalDeprecated

Never present since 0.3.3: every money value on this API states its own scale on the wire — a policy amount or cap since 0.3.3, an order's and an execution's since 0.3.2, a balance's since 0.3.1 — so a row is never served raw, whether or not this member holds the asset or instrument it references. Kept, deprecated, so a client generated from 0.3.2 still compiles; it goes at the next major.

Errors

400
Start Instance Algos Request Bad Request Error
401
Start Instance Algos Request Unauthorized Error
403
Start Instance Algos Request Forbidden Error
404
Start Instance Algos Request Not Found Error
409
Start Instance Algos Request Conflict Error
413
Start Instance Algos Request Content Too Large Error
422
Start Instance Algos Request Unprocessable Entity Error
429
Start Instance Algos Request Too Many Requests Error
500
Start Instance Algos Request Internal Server Error
503
Start Instance Algos Request Service Unavailable Error