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

# Order Updates

> Authenticated channel for streaming real-time order status updates.

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

Request stream of Order updates. An Order update having a data field containing an array that has a similar structure to ExecutionReport.

## 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 Order stream configuration.

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

        <ParamField path="StartDate" type="string">
          If provided, the subscription will return orders that were submitted after this time. An ISO-8601 UTC string of the form 2019-02-13T05:17:32.000000Z.
        </ParamField>

        <ParamField path="EndDate" type="string">
          If provided, the subscription will return orders that were submitted before this time.
        </ParamField>

        <ParamField path="Symbol" type="string">
          If provided, Symbol of the security to get the orders for.
        </ParamField>

        <ParamField path="Statuses" type="array">
          If provided, comma-separated Statuses of orders to include e.g. New,Filled.
        </ParamField>

        <ParamField path="OrderID" type="string">
          If provided, filter by OrderID.
        </ParamField>

        <ParamField path="RFQID" type="string">
          If provided, filter by RFQID.
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>

  <Tab title="Example">
    ```json theme={null}
    {
      "reqid": 7,
      "type": "subscribe",
      "streams": [
        {
          "name": "Order",
          "StartDate": "2021-09-14T00:00:00.000000Z"
        }
      ]
    }
    ```
  </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 Order data with a similar structure to ExecutionReport.

      <Expandable title="properties">
        <ParamField path="Timestamp" type="string" required>
          Timestamp of the message.
        </ParamField>

        <ParamField path="Symbol" type="string" required>
          Symbol of the order security.
        </ParamField>

        <ParamField path="OrderID" type="string" required>
          Server assigned Order ID, will be a UUID.
        </ParamField>

        <ParamField path="ClOrdID" type="string" required>
          Client assigned Order ID for the last request.
        </ParamField>

        <ParamField path="Side" type="string" required>
          "Buy" or "Sell".
        </ParamField>

        <ParamField path="ExecType" type="string" required>
          Describes the specific execution.
        </ParamField>

        <ParamField path="OrdStatus" type="string" required>
          Identifies current status of order.
        </ParamField>

        <ParamField path="OrderQty" type="string" required>
          Order quantity.
        </ParamField>

        <ParamField path="OrdType" type="string" required>
          Order type.
        </ParamField>

        <ParamField path="Currency" type="string" required>
          Currency of Quantity.
        </ParamField>

        <ParamField path="CustomerUser" type="string">
          The customer user associated with this order.
        </ParamField>
      </Expandable>
    </ParamField>
  </Tab>

  <Tab title="Example">
    ```json theme={null}
    {
      "reqid": 7,
      "type": "Order",
      "ts": "2021-09-14T22:26:44.518538Z",
      "initial": false,
      "seqNum": 3,
      "data": [
        {
          "Timestamp": "2021-09-14T22:26:44.505519Z",
          "Symbol": "BTC-USD",
          "OrderID": "b35b1c3b-a304-4224-919f-9db1319de188",
          "ClOrdID": "d7635e40-15aa-11ec-b0a2-2554a9e1e7a4",
          "SubmitTime": "2021-09-14T22:26:44.457050Z",
          "ExecID": "c73fcf77-aaa1-46e7-9260-f625d6416646",
          "Side": "Buy",
          "ExecType": "New",
          "OrdStatus": "New",
          "OrderQty": "0.10000000",
          "OrdType": "Market",
          "Currency": "BTC",
          "LeavesQty": "0.10000000",
          "CumQty": "0",
          "AvgPx": "0",
          "TimeInForce": "FillOrKill",
          "LastPx": "0",
          "LastQty": "0",
          "LastAmt": "0",
          "LastFee": "0",
          "CumAmt": "0",
          "DecisionStatus": "Active",
          "AmountCurrency": "USD",
          "CustomerUser": "tom@company.com"
        }
      ]
    }
    ```
  </Tab>
</Tabs>
