> This page is for Trading.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.immix.xyz/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.immix.xyz/_mcp/server.

# Get an adjustment

GET /risk/adjustments/{id}

Serves one adjustment of the organisation; any other id is 404. A member without the surface is 503 `RISK_UNAVAILABLE`. Needs `risk:read` or any `risk` capability.

Reference: https://docs.immix.xyz/trading/api-reference/rest-api/risk/get-adjustment

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `id` (string, required) — The adjustment's id — a positive 64-bit integer as decimal digits.

### Query parameters

- `minGlobalSequence` (string, optional) — 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`.

### Headers

- `X-Request-Id` (string, optional) — 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.

## Response

### 200

The adjustment, with the position header and body field and the `ETag`.

- `adjustmentId` (string, required) — The adjustment's id, a 64-bit integer as decimal digits.
- `version` (string, required) — The adjustment's version as a decimal string: 1 when proposed, one more for each approval and for the withdrawal; its `ETag`.
- `accountId` (integer, required) — The account adjusted (`GET /accounts`).
- `instrumentId` (string, required, nullable) — The derivative position's instrument (`GET /positions`); `null` when the adjustment is of an inventory.
- `assetId` (integer, required, nullable) — The inventory's asset (`GET /risk/exposures`); `null` when the adjustment is of a position.
- `status` (enum, required) — `PENDING_APPROVAL`: proposed, moving nothing until approved. `APPLIED`: in the position or the inventory, as of `effectiveSeq`. `WITHDRAWN`: withdrawn, never applied. The value set is append-only: read an unknown value as `UNKNOWN`.
  - Allowed values: `UNKNOWN`, `PENDING_APPROVAL`, `APPLIED`, `WITHDRAWN`
- `reason` (enum, required) — Why it was made. The value set is append-only: read an unknown value as `UNKNOWN`.
  - Allowed values: `UNKNOWN`, `BASIS_CORRECTION`, `FEE_ASSET_CORRECTION`, `OTHER`
- `costMode` (enum, required) — How the cost arm applies to the position's cost basis in its settle asset, or the inventory's cost basis in USD: `SET` replaces it, `DELTA` adds to it, `NONE` leaves it.
  - Allowed values: `NONE`, `SET`, `DELTA`
- `cost` (string, required, nullable) — money (an exact decimal string at the scale the proposal stated it): the cost arm's value; `null` when its mode is `NONE`.
- `realizedPnlMode` (enum, required) — How the realizedPnl arm applies to the position's realized PnL in its settle asset, or the inventory's realized PnL in USD: `SET` replaces it, `DELTA` adds to it, `NONE` leaves it.
  - Allowed values: `NONE`, `SET`, `DELTA`
- `realizedPnl` (string, required, nullable) — money (an exact decimal string at the scale the proposal stated it): the realizedPnl arm's value; `null` when its mode is `NONE`.
- `feeAssetId` (integer, required, nullable) — The asset the fee arm is in; `null` when the fee is not adjusted.
- `feeMode` (enum, required) — How the fee arm applies to a position's fees paid in `feeAssetId`: `SET`, `DELTA` or `NONE`.
  - Allowed values: `NONE`, `SET`, `DELTA`
- `fee` (string, required, nullable) — money (an exact decimal string at the scale the proposal stated it): the fee arm's value; `null` when its mode is `NONE`.
- `fundingMode` (enum, required) — How the funding arm applies to the position's cumulative funding in its settle asset: `SET` replaces it, `DELTA` adds to it, `NONE` leaves it.
  - Allowed values: `NONE`, `SET`, `DELTA`
- `funding` (string, required, nullable) — money (an exact decimal string at the scale the proposal stated it): the funding arm's value, in the position's settle asset; `null` when its mode is `NONE`.
- `effectiveSeq` (string, required) — The stream position the adjustment takes effect at — its proposal's: an applied adjustment moves the position or the inventory as it stood then, and every fill since is replayed through it.
- `proposedBy` (Actor, required) — The maker — an actor, always a member's: only members write risk.
- `proposedAtNs` (string, required) — When it was proposed, epoch nanoseconds.
- `approvals` (list of RiskAdjustmentRowApprovalsItem, required) — Who approved it and when, in approval order; empty until the first approval. It applies when they number the organisation's `risk` rule in force at that approval, and at least one (`GET /approval-rules?family=RISK`).
- `appliedAtNs` (string, required, nullable) — When it was applied, epoch nanoseconds; `null` until then.
- `withdrawnBy` (Actor, required, nullable) — Who withdrew it; `null` unless withdrawn.
- `updatedBy` (Actor, required) — Who produced this state: the maker on the proposal, an approver on an approval, the withdrawer on the withdrawal.
- `withdrawalReason` (string, required) — Why it was withdrawn; empty unless withdrawn.
- `remark` (string, required) — What it corrects, as its maker wrote it.
- `globalSequence` (string, optional) — The position as a decimal string — the last change this member had applied, orders, balance readings and algo instances included.

## Errors

### 400 Get Adjustment Risk Request Bad Request Error

The request's shape is wrong: a non-positive id, an unknown `view` or filter value, a query string that does not decode, a query parameter the operation does not take, or a cursor that does not decode or came from another query (`INVALID_CURSOR`). No position rides a refusal that consulted no state.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `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 Get Adjustment Risk Request Unauthorized Error

No bearer token, or one that does not verify.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `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 Get Adjustment Risk Request Forbidden Error

`CAPABILITY_DENIED`: a read your capabilities do not cover, or a staging route without its propose bit (`accounts:propose`). `NOT_REGISTERED`: no row or open invitation at your verified address, an unknown organisation, or an unclaimed row (an administrator admits it). `EMAIL_UNVERIFIED`: verify, then sign in again. `INVITATION_EXPIRED`: an administrator re-invites. `FORBIDDEN_PRINCIPAL`: no `org_id`, a non-ASCII ref, a disabled user, a binding with no user. `ORG_NOT_ACTIVE`: disabled, pending or deleted. Owners' 403s carry the position header and `Idempotent-Replay`.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `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 Get Adjustment Risk 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` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `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 Get Adjustment Risk Request Service Unavailable Error

This member cannot serve the risk reads now: `NOT_PRIMED` — still catching up; retry shortly — `PROJECTION_BEHIND` — behind your `minGlobalSequence`; retry after `Retry-After` — or `RISK_UNAVAILABLE` — deployed without the reads the route serves (the limits, the postures or the adjustments), so a retry here changes nothing; every other route is unaffected. A limit or adjustment write can also meet the door's 503s every write can: `NOT_SERVING`, `OWNER_ABSENT`, or a command lost in transit — nothing was journaled; retry against a serving member.

- `error` (ErrorBody, required) — What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.
- `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

### Actor

Who acted — the principal behind a command, a row's maker or its concluder: a member (USER, id = the user id), an API key the organisation issued (API_KEY, id = the API key id), or the platform itself (MACHINE, id 0 — a connector's report, an algo instance's order, the door's own write). The kind's value set is append-only: a consumer READING an unknown kind treats the actor as unknown, never as an error.

- `kind` (enum, required) — The kind of principal; which id space `id` names.
  - Allowed values: `USER`, `API_KEY`, `MACHINE`
- `id` (integer, required) — The principal's id in its kind's space: a user id, an API key id, or 0 for the platform itself.

### RiskAdjustmentRowApprovalsItem

- `userId` (integer, required) — An approving user.
- `approvedAtNs` (string, required) — When this approval was given, platform time in epoch nanoseconds as a decimal string.

### ErrorBody

What a refusal states. Since `0.12.0` every refusal carries all four members; a member below it sends `code`, sometimes `message`, and neither of the others.

- `code` (string, required) — The code to branch on — stable and open (before 1.0.0 a minor may remove one, its changelog naming it): treat one you do not know by its HTTP status. The gateway's: - 400: `MALFORMED_REQUEST`, `MISSING_IDEMPOTENCY_KEY`, `INVALID_IDEMPOTENCY_KEY`, `INVALID_IF_MATCH`, `INVALID_CURSOR` - 401: `UNAUTHENTICATED` - 403: `FORBIDDEN_PRINCIPAL`, `NOT_REGISTERED`, `INVITATION_EXPIRED`, `EMAIL_UNVERIFIED`, `ORG_NOT_ACTIVE`, `CAPABILITY_DENIED` - 404: `NOT_FOUND`, `UNKNOWN_OPERATION`, `ROUTE_NOT_FOUND` (no route answers the path) - 405: `METHOD_NOT_ALLOWED` - 409: `IDEMPOTENCY_KEY_REUSED`, `INTAKE_KEY_REUSED`, `KEY_ALREADY_REGISTERED`, `CONNECTION_DOWN` (`POST /transfers`), `EXCEEDS_MARGIN_HEADROOM`, `HEADROOM_UNKNOWN` (a transfer's submit and its approval) - 413: `TOO_LARGE`, `PAYLOAD_TOO_LARGE`, `DOCUMENT_TOO_LARGE` - 422: a reference this member will not send: `INSTRUMENT_NOT_LIVE`, `ACCOUNT_NOT_ACTIVE` (`POST /orders`), `REFERENCE_UNKNOWN_INSTRUMENT`, `REFERENCE_INSTRUMENT_NOT_LIVE`, `REFERENCE_UNKNOWN_ACCOUNT` (an algo document); `VENUE_UNSUPPORTED`, `DEDICATED_KEY`, `DESTINATION_NOT_ALLOWED` - 428: `PRECONDITION_REQUIRED` - 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`, `POSITIONS_UNAVAILABLE`, `RISK_UNAVAILABLE`, `TRANSFERS_UNAVAILABLE`, `ALGOS_UNAVAILABLE`, `NOTIFICATIONS_UNAVAILABLE`, `TICKETS_UNAVAILABLE`, `REGISTRATION_PENDING`, `PROJECTION_BEHIND`, `LOST`, `REJECTED_NOT_REGISTERED`, `REJECTED_NOT_ACTIVE` The record owners' refusals ride verbatim — `OrgRegisterRejected.reason`, `OrderRejected.reason`, `AlgoRejected.reason`, `RiskLimitRejectReason`, `RiskAdjustmentRejectReason`, `ManualExecutionRejectReason`, `TransferRejectReason` and `NotificationEndpointRejected.reason` list them; the guide maps each to its status.
- `message` (string, required) — For display only; its wording may change at any time.
- `requestId` (string, required) — The request's id, also sent as X-Request-Id; quote it to support.
- `retryable` (boolean, required) — Whether sending the identical request again, its `Idempotency-Key` included, after `Retry-After` or a short pause, can succeed with nothing else changed. `false` where something must change first: the request, its key, its precondition, the caller's standing, or the platform's own records or deployment. A refusal the record owner judged is always `false`: it is the recorded answer to its key, which replays it.

## Examples

**Response**

```json
{
  "adjustmentId": "adjustmentId",
  "version": "version",
  "accountId": 1,
  "instrumentId": "instrumentId",
  "assetId": 1,
  "status": "UNKNOWN",
  "reason": "UNKNOWN",
  "costMode": "NONE",
  "cost": "cost",
  "realizedPnlMode": "NONE",
  "realizedPnl": "realizedPnl",
  "feeAssetId": 1,
  "feeMode": "NONE",
  "fee": "fee",
  "fundingMode": "NONE",
  "funding": "funding",
  "effectiveSeq": "effectiveSeq",
  "proposedBy": {
    "kind": "USER",
    "id": 1
  },
  "proposedAtNs": "proposedAtNs",
  "approvals": [
    {
      "userId": 1,
      "approvedAtNs": "approvedAtNs"
    }
  ],
  "appliedAtNs": "appliedAtNs",
  "withdrawnBy": {
    "kind": "USER",
    "id": 1
  },
  "updatedBy": {
    "kind": "USER",
    "id": 1
  },
  "withdrawalReason": "withdrawalReason",
  "remark": "remark",
  "globalSequence": "globalSequence"
}
```

**SDK Code**

```python
import requests

url = "https://api.example.com/risk/adjustments/id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.example.com/risk/adjustments/id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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/risk/adjustments/id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	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/risk/adjustments/id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.example.com/risk/adjustments/id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.example.com/risk/adjustments/id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.example.com/risk/adjustments/id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/risk/adjustments/id")! 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()
```