> 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/account-balances/list/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.immix.xyz/_mcp/server. # List account balances GET /account-balances Lists the organisation's account balances — the latest reading per account and asset, as the venue last stated it; `accountId` narrows to one account's. A `DISCOVERED` account's balances are served while it is being classified. Rows are ordered by `accountId` then `assetId`; a `view` other than `latest` is 400. A member deployed without the surface answers 503 `BALANCES_UNAVAILABLE`. Reference: https://docs.immix.xyz/api-reference/rest-api/account-balances/list ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Query parameters - `accountId` (integer, optional) — Only one account's balances — the `accountId` its rows carry and `GET /accounts` serves. An account outside your organisation, or one this member does not hold, yields an empty collection, like an account with no reading; `0`, a negative or a non-integer refuses 400. ## Response ### 200 Every reading inside the principal's org, account then asset 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 and balance readings included. - `items` (list of AccountBalanceRow, required) - `unscaled` (boolean, optional, deprecated) — Never present since 0.3.1: a balance states its own scale, so no item is ever served raw. Kept, deprecated, so a client generated from 0.3.0 still compiles. ## Errors ### 400 List Account Balances 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`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ### 401 List Account Balances Request Unauthorized Error No bearer token, or one that does not verify. - `error` (ErrorError, required) - `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ### 403 List Account Balances 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`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ### 503 List Account Balances Request Service Unavailable Error This member cannot serve balances now: `NOT_PRIMED` — it is still catching up; retry shortly — or `BALANCES_UNAVAILABLE` — it is deployed without the balance surface, because no account connector publishes readings into its environment yet, so no balance is readable here and a retry changes nothing; every other route is unaffected. - `error` (ErrorError, required) - `currentVersion` (string, optional) — On 412 `VERSION_CONFLICT`: the row's current version (the `ETag` carries the same token) — re-read, reapply, retry. ## Types ### AccountBalanceRow One account's latest balance in one asset as the API serves it: the `AccountBalance` reading plus `observedAtNs`, the platform time of the reading (the deprecated `unscaled` is never present: a balance states its own scale). `total`, `available` and `held` are the venue's partition of the holding: `available` is what the venue would let move now, `held` what it has locked, `total` the whole. Zero is a reading: every amount is a decimal, never null. Rows carry no version — a reading supersedes the last — so there is no `ETag` and no entity route. - `accountId` (integer, required) — The account this reading belongs to. - `assetId` (integer, required) — The asset the amounts are stated in. - `available` (string, required) — What the venue would let move now — a withdrawal or transfer amount, never what is usable as margin: collateral eligibility and haircuts are the venue's own gates. 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 - `credentialId` (integer, required) — The credential the reading was taken through — the account's own. - `held` (string, required) — What the venue itself has locked — order margin, pending withdrawals, venue-side freezes. total is available plus held only where the venue's own model is additive. 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 - `observedAtNs` (string, required) — The platform time of this reading — epoch nanoseconds as a decimal string, never null. A changed reading and a restatement on the connector's heartbeat both move it, so a row whose `observedAtNs` stops advancing is an account the venue has stopped reporting. Judge freshness from it, not from `venueTsNs`, the venue's own clock. - `total` (string, required) — The venue's stated total holding in this asset. 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 - `venueRevision` (string, optional, nullable) — The venue's own sequence or revision number where it has one; 0 = none. A revision bump republishes the reading even when the amounts are unchanged. int64 as a decimal JSON string - `venueTsNs` (string, optional, nullable) — The venue's own clock for this reading; 0 = the venue stated none, and the platform's time of the reading is the clock to read. int64 as a decimal JSON string - `unscaled` (boolean, optional, deprecated) — Never present since 0.3.1: each amount carries its own scale on the wire, so this row's amounts are exact decimals whether or not this member holds the asset — nothing about it needs distrusting. Kept, deprecated, so a client generated from 0.3.0 still compiles. ### 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` - 422: `INSTRUMENT_NOT_LIVE` and `ACCOUNT_NOT_ACTIVE` (`POST /orders`: a symbol or an account name nothing here holds — the orders owner answers the same codes to an unheld id), `VENUE_UNSUPPORTED`; `SCALE_UNKNOWN` (retired: only a member below `0.3.4` answers it) - 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`, `LOST`, `REJECTED_NOT_REGISTERED`, `REJECTED_NOT_ACTIVE` The record owners' refusals ride verbatim — `OrgRegisterRejected.reason` and `OrderRejected.reason` list them, and the guide's Errors section 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": [ { "accountId": 1, "assetId": 1, "available": "available", "credentialId": 1, "held": "held", "observedAtNs": "observedAtNs", "total": "total", "venueRevision": "venueRevision", "venueTsNs": "venueTsNs" } ] } ``` **SDK Code** ```python import requests url = "https://api.example.com/account-balances" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.example.com/account-balances'; 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/account-balances" 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/account-balances") 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/account-balances") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.example.com/account-balances', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.example.com/account-balances"); 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/account-balances")! 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() ```