> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.immix.xyz/api-reference/rest-api/algos/list-instance-orders/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.immix.xyz/_mcp/server. # List an instance's orders GET /algos/instances/{id}/orders Lists exactly the orders the instance placed, live and terminal — the same rows `GET /orders` serves, each carrying `algoInstanceId` and a `userId` of `0`. Any other instance is 404. Reference: https://docs.immix.xyz/api-reference/rest-api/algos/list-instance-orders ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `id` (integer, required) — The instance's id — a positive 32-bit integer the platform minted; the value an algo's orders carry as `algoInstanceId`. ## Response ### 200 Every order the instance placed, id ascending; the projection position rides the body and the header. - `globalSequence` (string, required) — The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included. - `items` (list of OrderUpdated, required) ## Errors ### 400 List Instance Orders Algos Request Bad Request Error The request's shape is wrong: a non-positive id, an unknown `view` or filter value. No position rides a refusal that consulted no state. - `error` (ErrorError, required) - `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ### 401 List Instance Orders Algos Request Unauthorized Error No bearer token, or one that does not verify. - `error` (ErrorError, required) - `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ### 403 List Instance Orders Algos Request Forbidden Error Authenticated, but not admitted. `FORBIDDEN_PRINCIPAL`: a token with no `org_id`, a non-ASCII `org_id` or `sub`, a disabled user, or a local binding with no user. `AWAITING_ADMISSION`: your user is not yet admitted — every route but `GET /me` answers this until an administrator admits you. `ORG_NOT_ACTIVE`: your organisation is suspended, pending activation, retired or unregistered. The record owners' 403s (`CAPABILITY_DENIED`, `SELF_APPROVAL`, `NOT_PROPOSER`, …) are refusals on the platform's stream: they carry the position header, and a retried key replays them with `Idempotent-Replay`. - `error` (ErrorError, required) - `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ### 404 List Instance Orders Algos Request Not Found Error No such row in your organisation — another organisation's row is indistinguishable from an absent one. The position header says as of when. - `error` (ErrorError, required) - `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ### 503 List Instance Orders Algos Request Service Unavailable Error This member cannot serve the algos surface now: `NOT_PRIMED` — it is still catching up; retry shortly — or `ALGOS_UNAVAILABLE` — it is deployed without the surface, because the algos owner is not released into its environment yet, so no instance is readable or commandable here and a retry changes nothing; every other route is unaffected. On a write also `NOT_SERVING`, `OWNER_ABSENT`, or the platform's own outcome for a command lost in transit — nothing journaled; retry against a serving member. - `error` (ErrorError, required) - `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`, or `CONFIG_SEQ_CONFLICT` on an algo instance's config write: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ## Types ### OrderUpdated - `orderId` (string, required) — int64 as a decimal JSON string - `version` (string, required) — Per-order, monotonic, bumped on every row; a restored snapshot restates the last version. int64 as a decimal JSON string - `orgId` (integer, required) — Owner-stamped. - `userId` (integer, required) — The submitting user; actors of later commands ride those commands and the envelope's causation, never restamped here. 0 = machine flow, algoInstanceId naming the instance. - `accountId` (integer, required) - `credentialId` (integer, required) — The oe credential the owner RESOLVED at submit — the org's live canTrade credential for the account's venue, not the account's own read-only credential. The connector's fold filter is credentialId ∈ mine. - `instrumentId` (string, required) — int64 as a decimal JSON string - `side` (enum, required) — UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict - Allowed values: `UNKNOWN`, `BUY`, `SELL` - `orderType` (enum, required) — UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict - Allowed values: `UNKNOWN`, `LIMIT`, `MARKET` - `timeInForce` (enum, required) — UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict - Allowed values: `UNKNOWN`, `GTC`, `IOC`, `FOK`, `GTD` - `qty` (string, required) — money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw - `status` (enum, required) — UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict - Allowed values: `UNKNOWN`, `QUEUED`, `INSTRUCTED`, `OPEN`, `PARTIALLY_FILLED`, `FILLED`, `CANCELED`, `REJECTED`, `EXPIRED`, `INSTRUCTION_EXPIRED`, `EXPIRED_UNCONFIRMED`, `NOT_FOUND_AT_VENUE` - `transition` (enum, required) — UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict - Allowed values: `UNKNOWN`, `SUBMITTED`, `INSTRUCTED`, `ACKNOWLEDGED`, `OPENED`, `TRADE`, `CANCEL_REQUESTED`, `CANCEL_REJECTED`, `CANCELED`, `REJECTED`, `EXPIRED`, `INSTRUCTION_EXPIRED`, `EXPIRED_UNCONFIRMED`, `NOT_FOUND_AT_VENUE`, `RECONCILE_REQUESTED`, `RESTATED`, `SNAPSHOT` - `provenance` (enum, required) — UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict - Allowed values: `UNKNOWN`, `OWNER`, `CONNECTOR`, `ACK`, `PUSH`, `QUERY`, `SWEEP` - `reason` (enum, required) — The transition's cause when one applies (UNKNOWN otherwise); the raw venue leg rides venueCode/venueText. UNKNOWN is the unset sentinel: outputs only — as input, omit the field instead; explicit UNKNOWN refuses 400. The value set is append-only: a consumer READING this field treats an unknown name as UNKNOWN, never as an error; as input an unknown name refuses 400 — the parse is strict - Allowed values: `UNKNOWN`, `USER_REQUESTED`, `VENUE_INITIATED`, `POST_ONLY_WOULD_CROSS`, `MMP`, `SELF_TRADE_PREVENTED`, `IOC_REMAINDER`, `FOK_UNFILLED`, `UNSUPPORTED_AT_VENUE`, `VENUE_REJECTED`, `INSTRUCTION_FRESHNESS_EXPIRED`, `RECONCILE_PROOF`, `OWNER_TIMEOUT`, `VENUE_REFERENCE_MISSING` - `cumQty` (string, required) — Derived from the deduplicated execution set — never from the venue's cumulative; rounded by the owner. money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw - `leavesQty` (string, required) — qty - cumQty at a live status; 0 at any terminal. money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw - `acceptedAtNs` (string, required) — The accept's consensus time, stamped by the owner — the anchor instructFreshnessNs measures from; carried on the record so a restored snapshot keeps the window. int64 as a decimal JSON string - `tradingPolicyId` (integer, required) — Which trading policy row — the organisation-wide default or a per-instrument one — the validation ran against. - `tradingPolicyVersion` (string, required) — The attribution pin's version half. int64 as a decimal JSON string - `clientOrderId` (string, required) — The edge key echoed; never the venue key. - `externalRef` (string, required) — The venue order id once bound (ACKNOWLEDGED or first evidence carrying it); empty until then. - `venueText` (string, required) — The last reason triple's text leg; empty when none. - `bookId` (string, optional, nullable) — int64 as a decimal JSON string - `isPostOnly` (boolean, optional) — a boolean; absent reads false - `isReduceOnly` (boolean, optional) — a boolean; absent reads false - `price` (string, optional, nullable) — money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the 0 sentinel means unset - `venueCode` (integer, optional, nullable) - `avgPx` (string, optional, nullable) — Derived from the deduplicated execution set (half-even rounding); 0 = no fills. money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the 0 sentinel means unset - `lastFillQty` (string, optional, nullable) — The most recent leg reported for this order, for a merged FIX-style rendering (LastQty/LastPx); 0 = none. On a bust or correction it describes the referenced trade, not the surviving fill, and a report about no leg carries the previous value forward — read cumQty/avgPx, never this pair, for what the set currently stands behind. money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the 0 sentinel means unset - `lastFillPx` (string, optional, nullable) — money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the 0 sentinel means unset - `venueCumQty` (string, optional, nullable) — The venue's claimed cumulative — the cross-check watermark behind isExecutionsComplete; -1 = never reported. money (a Decimal on the wire: a scaled integer with its own scale), served as an exact decimal string at the value's own scale — every fractional digit that scale states, trailing zeros included; never raw; null when the -1 sentinel means unset - `isExecutionsComplete` (boolean, optional) — Accounting closure: true if and only if the deduplicated execution set reconciles against the lifecycle (FILLED: the set equals qty; other terminals: the set equals venueCumQty where reported). False keeps the reconcile lane chasing fills — a venue's terminal status stands while this is false. a boolean; absent reads false - `instructedAtNs` (string, optional, nullable) — First INSTRUCTED evidence time; 0 until instructed. int64 as a decimal JSON string - `cancelRequestedAtNs` (string, optional, nullable) — The venue-async cancel window's base: set by CANCEL_REQUESTED, cleared (0) by CANCEL_REJECTED, mooted by terminals; feeds the pending-cancel backstop timer. Consumers answer 'is a cancel in flight' as live status AND nonzero here — there is no PENDING_CANCEL status to watch for. int64 as a decimal JSON string - `venueTsNs` (string, optional, nullable) — The per-order venue-time watermark; 0 = no venue evidence yet. int64 as a decimal JSON string - `reconcileRequestedAtNs` (string, optional, nullable) — The base of the venue-side reconcile window, the sibling of cancelRequestedAtNs: set by RECONCILE_REQUESTED, cleared (0) by the venue evidence that answers it. Stored rather than derived from the transition, because a restored snapshot restates every row as SNAPSHOT and a derived window would differ on a warm-started member. Consumers answer 'is a reconcile outstanding' as non-zero here — never by watching for a transition. int64 as a decimal JSON string - `algoInstanceId` (integer, optional, nullable) — The algo instance the order belongs to, on every row of a machine-flow order and never restamped; 0 = a human's order, userId naming the submitter. ### ErrorError - `code` (string, required) — The code to branch on — stable and append-only: treat one you do not know by its HTTP status. The gateway's own: - 400: `MALFORMED_REQUEST`, `MISSING_IDEMPOTENCY_KEY`, `INVALID_IDEMPOTENCY_KEY`, `INVALID_IF_MATCH` - 401: `UNAUTHENTICATED` - 403: `FORBIDDEN_PRINCIPAL`, `AWAITING_ADMISSION`, `ORG_NOT_ACTIVE`, `CAPABILITY_DENIED` (the credential intake) - 404: `NOT_FOUND`, `UNKNOWN_OPERATION` - 409: `IDEMPOTENCY_KEY_REUSED`, `INTAKE_KEY_REUSED` - 413: `TOO_LARGE`, `PAYLOAD_TOO_LARGE`, `DOCUMENT_TOO_LARGE` - 422: a name nothing here holds: `INSTRUMENT_NOT_LIVE`, `ACCOUNT_NOT_ACTIVE` (`POST /orders`), `REFERENCE_UNKNOWN_INSTRUMENT`, `REFERENCE_UNKNOWN_ACCOUNT` (an algo document); `VENUE_UNSUPPORTED`; `SCALE_UNKNOWN` (retired at `0.3.4`) - 429: `INBOX_FULL`, `IN_FLIGHT_FULL`, `RATE_LIMITED` - 500: `INTERRUPTED`, `INTERNAL_ERROR`, `PROJECTION_MISS` - 503: `NOT_PRIMED`, `NOT_SERVING`, `OWNER_ABSENT`, `INTAKE_UNAVAILABLE`, `BALANCES_UNAVAILABLE`, `ALGOS_UNAVAILABLE`, `LOST`, `REJECTED_NOT_REGISTERED`, `REJECTED_NOT_ACTIVE` The record owners' refusals ride verbatim — `OrgRegisterRejected.reason`, `OrderRejected.reason` and `AlgoRejected.reason` list them; the guide maps each to its status. - `message` (string, optional) — Free text for humans; may change without notice — never parse it. ## Examples **Response** ```json { "globalSequence": "globalSequence", "items": [ { "orderId": "orderId", "version": "version", "orgId": 1, "userId": 1, "accountId": 1, "credentialId": 1, "instrumentId": "instrumentId", "side": "UNKNOWN", "orderType": "UNKNOWN", "timeInForce": "UNKNOWN", "qty": "qty", "status": "UNKNOWN", "transition": "UNKNOWN", "provenance": "UNKNOWN", "reason": "UNKNOWN", "cumQty": "cumQty", "leavesQty": "leavesQty", "acceptedAtNs": "acceptedAtNs", "tradingPolicyId": 1, "tradingPolicyVersion": "tradingPolicyVersion", "clientOrderId": "clientOrderId", "externalRef": "externalRef", "venueText": "venueText", "bookId": "bookId", "isPostOnly": true, "isReduceOnly": true, "price": "price", "venueCode": 1, "avgPx": "avgPx", "lastFillQty": "lastFillQty", "lastFillPx": "lastFillPx", "venueCumQty": "venueCumQty", "isExecutionsComplete": true, "instructedAtNs": "instructedAtNs", "cancelRequestedAtNs": "cancelRequestedAtNs", "venueTsNs": "venueTsNs", "reconcileRequestedAtNs": "reconcileRequestedAtNs", "algoInstanceId": 1 } ] } ``` **SDK Code** ```python import requests url = "https://api.example.com/algos/instances/1/orders" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.example.com/algos/instances/1/orders'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.example.com/algos/instances/1/orders" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.example.com/algos/instances/1/orders") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.example.com/algos/instances/1/orders") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.example.com/algos/instances/1/orders', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.example.com/algos/instances/1/orders"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/algos/instances/1/orders")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```