> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kraken.com/llms.txt
> Use this file to discover all available pages before exploring further.

# User

> Authenticated channel for streaming updates for the current customer user.

<Note>Authenticated channel. Connect to: `wss://wss.prime.kraken.com/ws/v1`</Note>

Request for updates for this customer user. No subscription parameters required.

## Subscribe Request

<Tabs>
  <Tab title="Subscribe Schema">
    <ParamField path="reqid" type="number" required>
      Request ID - will be echoed back in the response structure.
    </ParamField>

    <ParamField path="type" type="string" required>
      Request type. Value: `subscribe`
    </ParamField>

    <ParamField path="streams" type="array" required>
      Array containing the User stream configuration.

      <Expandable title="properties">
        <ParamField path="name" type="string" required>
          Subscription name. Value: `User`
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>

  <Tab title="Example">
    ```json theme={null}
    {
      "reqid": 10,
      "type": "subscribe",
      "streams": [
        {
          "name": "User"
        }
      ]
    }
    ```
  </Tab>
</Tabs>

## Response

<Tabs>
  <Tab title="Response Schema">
    <ParamField path="reqid" type="number" required>
      A number that relates this response to a request.
    </ParamField>

    <ParamField path="type" type="string" required>
      The type of message sent.
    </ParamField>

    <ParamField path="ts" type="string" required>
      An ISO-8601 UTC string of the form `2019-02-13T05:17:32.000000Z`.
    </ParamField>

    <ParamField path="initial" type="boolean">
      If this is initial data for a request, the initial flag will be set.
    </ParamField>

    <ParamField path="seqNum" type="number" required>
      The sequence number for this response per request.
    </ParamField>

    <ParamField path="action" type="string">
      "Update" or "Remove" - tells the client if the given entity should be removed or added/updated.
    </ParamField>

    <ParamField path="data" type="array" required>
      Array of User data.

      <Expandable title="properties">
        <ParamField path="CustomerUserID" type="string" required>
          Server assigned ID of this Customer User.
        </ParamField>

        <ParamField path="Email" type="string" required>
          Email of Customer User.
        </ParamField>

        <ParamField path="DisplayName" type="string" required>
          Friendly name for customer user.
        </ParamField>

        <ParamField path="Config" type="array" required>
          List of user config settings.

          <Expandable title="properties">
            <ParamField path="Timestamp" type="string" required>
              Timestamp of config setting update.
            </ParamField>

            <ParamField path="CustomerUserID" type="string" required>
              Customer User for this config setting.
            </ParamField>

            <ParamField path="Mode" type="string">
              Setting whether config is enabled, values Enabled or Disabled.
            </ParamField>

            <ParamField path="Key" type="string" required>
              User config key.
            </ParamField>

            <ParamField path="Value" type="string" required>
              Configuration value, JSON-serialized and transmitted as a string. Escaped characters in the wire format are normal JSON encoding.
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField path="Permissions" type="array">
          List of permissions for the customer user.
        </ParamField>

        <ParamField path="MarketAccountAuthorizations" type="object">
          Market account authorizations mapping market accounts to their respective permissions.
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>

  <Tab title="Example">
    ```json theme={null}
    {
      "reqid": 10,
      "type": "User",
      "ts": "2021-09-15T03:33:07.545223Z",
      "initial": true,
      "seqNum": 1,
      "data": [
        {
          "CustomerUserID": "174K1Q9GC0C00",
          "Email": "tom@company.com",
          "DisplayName": "Tom",
          "Config": [
            {
              "Timestamp": 1628004805337309202,
              "CustomerUserID": "174K1Q9GC0C00",
              "Key": "recentSymbols",
              "Value": "{\"BTC-USD\":[1626111502357],\"ADA-USD\":[1626732116743],\"BCH-USD\":[1628004751665]}"
            },
            {
              "Timestamp": 1628004805377207692,
              "CustomerUserID": "174K1Q9GC0C00",
              "Key": "symbol",
              "Value": "\"BTC-USD\""
            }
          ],
          "Permissions": [
            "read::orders",
            "write::orders",
            "read::marketdata",
            "read::entity"
          ],
          "MarketAccountAuthorizations": {
            "market-account-1": [
              "read::orders",
              "read::marketdata",
              "read::entity"
            ],
            "market-account-2": ["read::orders", "read::marketdata", "read::entity"]
          }
        }
      ]
    }
    ```
  </Tab>
</Tabs>
