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

# Execution Report

> Authenticated channel for streaming all order responses and lifecycle updates.

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

Request stream of Execution Reports. All order responses and updates are sent as ExecutionReport messages.

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

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

        <ParamField path="StartDate" type="string">
          If provided, the subscription will return execution reports that were published at or 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 execution reports that were published before this time.
        </ParamField>

        <ParamField path="Symbol" type="string">
          If provided, Symbol of the security to get the executions 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": 5,
      "type": "subscribe",
      "streams": [
        {
          "name": "ExecutionReport",
          "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 ExecutionReport data.

      <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="OrigClOrdID" type="string">
          Original client assigned Order ID.
        </ParamField>

        <ParamField path="SubmitTime" type="string" required>
          Time of original order submission.
        </ParamField>

        <ParamField path="ExecID" type="string" required>
          Server assigned ID of this update, will be a UUID.
        </ParamField>

        <ParamField path="Side" type="string" required>
          Order side. Possible values: `Buy`, `Sell`
        </ParamField>

        <ParamField path="TransactTime" type="string">
          Transaction time.
        </ParamField>

        <ParamField path="ExecType" type="string" required>
          Describes the specific execution. Possible values: `New`, `Trade`, `Canceled`, `Replaced`, `PendingCancel`, `Stopped`, `Rejected`, `PendingNew`, `Restated`, `PendingReplace`, `CancelRejected`, `ReplaceRejected`, `PendingResume`, `Resumed`, `PendingPause`, `Paused`, `Triggered`, `Started`
        </ParamField>

        <ParamField path="OrdStatus" type="string" required>
          Identifies current status of order. Possible values: `New`, `PartiallyFilled`, `Filled`, `Canceled`, `PendingCancel`, `Rejected`, `PendingNew`, `PendingReplace`
        </ParamField>

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

        <ParamField path="OrdType" type="string" required>
          Order type. Possible values: `Market`, `Limit`, `RFQ`
        </ParamField>

        <ParamField path="Price" type="string">
          Order limit price, required when OrdType=Limit.
        </ParamField>

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

        <ParamField path="LeavesQty" type="string" required>
          Quantity open for further execution.
        </ParamField>

        <ParamField path="CumQty" type="string" required>
          Total quantity filled. Always in Currency units.
        </ParamField>

        <ParamField path="AvgPx" type="string">
          Average filled price of the order. Only valid if CumQty > 0. Does not include fees.
        </ParamField>

        <ParamField path="TimeInForce" type="string" required>
          Specifies how long the order remains in effect. Possible values: `GoodTillCancel`, `FillAndKill`, `FillOrKill`
        </ParamField>

        <ParamField path="LastPx" type="string">
          Last price, specified when ExecType=Trade.
        </ParamField>

        <ParamField path="LastQty" type="string">
          Last qty, specified when ExecType=Trade.
        </ParamField>

        <ParamField path="LastAmt" type="string">
          Last amount, specified when ExecType=Trade.
        </ParamField>

        <ParamField path="LastFee" type="string">
          Last fee, specified when ExecType=Trade.
        </ParamField>

        <ParamField path="CumAmt" type="string">
          Total amount filled. Always in Amount currency.
        </ParamField>

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

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

  <Tab title="Example">
    ```json theme={null}
    {
      "reqid": 6,
      "type": "ExecutionReport",
      "ts": "2021-09-14T22:23:11.920903Z",
      "initial": false,
      "seqNum": 2,
      "data": [
        {
          "Timestamp": "2021-09-14T22:23:11.903074Z",
          "Symbol": "BTC-USD",
          "OrderID": "1b6b882b-e2fc-4774-ad2d-9db4df536f29",
          "ClOrdID": "58b9adb0-15aa-11ec-b0a2-2554a9e1e7a4",
          "SubmitTime": "2021-09-14T22:23:11.903074Z",
          "ExecID": "4b423f54-4a54-4679-9ee7-1f5f417ec5f5",
          "Side": "Buy",
          "TransactTime": "2021-09-14T22:23:11.883000Z",
          "ExecType": "PendingNew",
          "OrdStatus": "PendingNew",
          "OrderQty": "0.20000000",
          "OrdType": "Market",
          "Currency": "BTC",
          "LeavesQty": "0.20000000",
          "CumQty": "0",
          "AvgPx": "0",
          "TimeInForce": "FillOrKill",
          "LastPx": "0",
          "LastQty": "0",
          "LastAmt": "0",
          "LastFee": "0",
          "CumAmt": "0",
          "AmountCurrency": "USD",
          "CustomerUser": "tom@company.com"
        }
      ]
    }
    ```
  </Tab>
</Tabs>
