> 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.

# List your preferences

GET https://api.immix.xyz/v1/me/preferences

Your preferences, the newest change first unless `sort` says otherwise, narrowed by `key` (exact, up to 100), `tag` (every tag named) and `tag.notIn`. Page with `limit` and `cursor`; `include=total` adds the exact count. Each row carries its `version`, so you can write from a page without a read per key. Read-your-writes: a page after a 200 shows the write.

Reference: https://docs.immix.xyz/trading/api-reference/rest-api/preferences/list

## Authentication

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

## Request

### Query parameters

- `key` (string, optional) — Only these keys, exact, at most 100; repeat the parameter or comma-separate; one off the key grammar is 400. A key you have not written is simply absent from the page.
- `tag` (string, optional) — Only preferences carrying every one of these tags, matched lower-cased: `tag=group:table&tag=page:trade` is the trade page's tables. One off the tag grammar is 400.
- `tag.notIn` (string, optional) — None of the preferences carrying any of these tags; one off the tag grammar is 400.
- `sort` (string, optional) — Comma-separated `updatedAtNs`, `createdAtNs` or `key`; prefix `-` for descending. Default `-updatedAtNs`. The key breaks every tie.
- `limit` (integer, optional) — Page size, 1-100; larger values are clamped. Default 50.
- `cursor` (string, optional) — `nextCursor` or `prevCursor` from a previous page, sent with the same filters and sort. A cursor is bound to you: sent by anyone else it is 400.
- `include` (enum, optional) — `total` adds the exact count.
  - Allowed values: `total`

### 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

A page of your preferences.

- `items` (list of Preference, required)
- `nextCursor` (string, required, nullable) — Pass as `cursor` for the next page. Null on the last page.
- `prevCursor` (string, required, nullable) — Pass as `cursor` for the previous page. Null on the first page.
- `total` (integer, required, nullable) — Exact count matching the filter. Null unless `include=total`.
- `asOfSeqTsNs` (string, required, nullable) — Always null: your preferences are read-your-writes and carry no sequencer position, so no `X-Immix-As-Of-Seq-Ts` is sent either.

## Errors

### 400 List Preferences Request Bad Request Error

The request is malformed, or its cursor is not valid for it.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 401 List Preferences Request Unauthorized Error

The bearer token is missing or not valid.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 501 List Preferences Request Not Implemented Error

`NOT_IMPLEMENTED`: this deployment runs no user-state store, so it serves no preferences.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 503 List Preferences Request Service Unavailable Error

`USER_STATE_UNAVAILABLE`: your preferences cannot be read or written now; retry. `USER_STATE_SCHEMA_BEHIND`: the store is behind this release; a retry does not help until the deployment catches up.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

## Types

### Preference

One of your preferences: a key-value document whose value is yours to shape, private to you in the organisation you are signed in to. The key is its identity.

- `key` (string, required) — The key: 1 to 128 characters of `[A-Za-z0-9._:-]`, starting with a letter or digit, matched exactly.
- `value` (any, required)
- `tags` (list of string, required) — Tags to list by: at most 50, each 1 to 64 characters of `[a-z0-9:._-]`, lower-cased on write and unique.
- `version` (string, required) — The row's version, the `ETag`'s value: send it as `If-Match` on a write of the key. A decimal string from one sequence shared by every row, so it never repeats for a key, not even across a delete and a re-create.
- `createdAtNs` (string, required) — When the key was first written, in epoch nanoseconds; microsecond-exact, so it ends in `000`.
- `updatedAtNs` (string, required) — When the key was last written, in epoch nanoseconds; microsecond-exact, so it ends in `000`.

### ErrorBody

- `code` (string, required) — Machine-readable, UPPER_SNAKE and append-only; tolerate codes you don't know. Branch on this, never on the message.
- `message` (string, required) — For display only; its wording may change at any time.
- `retryable` (boolean, required) — Whether sending the identical request again, after `Retry-After` or a short pause, can succeed with nothing else changed. `false` where something must change first: the request, the caller's standing, or the platform's own records or deployment.
- `requestId` (string, required) — The request's id, also sent as X-Request-Id; quote it to support.

## Examples

**Response**

```json
{
  "items": [
    {
      "key": "trade-page-chart-settings",
      "value": {
        "depth": 1.5,
        "interval": "1m",
        "overlays": [
          "ema",
          "vwap"
        ]
      },
      "tags": [
        "group:chart",
        "page:trade"
      ],
      "version": "4",
      "createdAtNs": "1761264000000000000",
      "updatedAtNs": "1761264000000000000"
    },
    {
      "key": "table-preferences:trade-page:orders:default",
      "value": {
        "columns": [
          "symbol",
          "side",
          "qty",
          "price"
        ],
        "density": "compact"
      },
      "tags": [
        "group:table",
        "page:trade"
      ],
      "version": "3",
      "createdAtNs": "1761263999999999000",
      "updatedAtNs": "1761263999999999000"
    }
  ],
  "total": 2
}
```

**SDK Code**

```python
import requests

url = "https://api.immix.xyz/v1/me/preferences"

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

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

print(response.json())
```

```javascript
const url = 'https://api.immix.xyz/v1/me/preferences';
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.immix.xyz/v1/me/preferences"

	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.immix.xyz/v1/me/preferences")

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.immix.xyz/v1/me/preferences")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.immix.xyz/v1/me/preferences', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.immix.xyz/v1/me/preferences");
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.immix.xyz/v1/me/preferences")! 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()
```