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

# Amend Order

> Modify order parameters in-place without cancelling and recreating

<div className="api-banner">
  <span className="api-protocol ws">WSS</span>
  <span className="api-detail">ws-auth.kraken.com</span>
  <span className="api-tag">amendOrder</span>
</div>

The amend request enables clients to modify order parameters in-place without the need to cancel the existing order and create a new one. The order identifiers assigned by Kraken and/or client will stay the same, and queue priority in the order book will be maintained where possible.

<Tabs>
  <Tab title="Request">
    <ResponseField name="event" type="string" required>
      Value: `amendOrder`
    </ResponseField>

    <ResponseField name="txid" type="string">
      <span className="field-attr">Example:</span> `OFGKYQ-FHPCQ-HUQFEK`

      The Kraken identifier for the order to be amended. Either `txid` or `cl_ord_id` is required.
    </ResponseField>

    <ResponseField name="cl_ord_id" type="string">
      <span className="field-attr">Example:</span> `6d1b345e-2821-40e2-ad83-4ecb18a06876`

      The client identifier for the order to be amended. Either `txid` or `cl_ord_id` is required.
    </ResponseField>

    <ResponseField name="volume" type="string">
      The new order quantity in terms of the base asset.
    </ResponseField>

    <ResponseField name="display_volume" type="string">
      <span className="field-attr">Condition:</span> iceberg orders only

      Defines the new quantity to show in the book while the rest of order quantity remains hidden. Minimum value is 1 / 15 of remaining order quantity.
    </ResponseField>

    <ResponseField name="limit_price" type="string">
      <span className="field-attr">Condition:</span> For order types that support limit price only

      The new limit price restriction on the order.

      To specify a relative price, this field can be prefixed by `+` or `-` to specify the order price as an offset relative to the market price.

      * `+` prefix: adds the amount to the reference price.
      * `-` prefix: subtracts the amount from the reference price.
      * `%` suffix: signifies the relative amount as a percentage, i.e., for a limit price 2% from last price use `"+2%"`.
    </ResponseField>

    <ResponseField name="post_only" type="boolean">
      <span className="field-attr">One of:</span> `true`, `false`<br />
      <span className="field-attr">Default:</span> `false`<br />
      <span className="field-attr">Condition:</span> Optional parameter for limit price changes

      Applies to `limit_price` changes in this amend transaction. If `true`, the limit price change will be rejected if the order cannot be posted passively in the book.
    </ResponseField>

    <ResponseField name="trigger_price" type="string">
      <span className="field-attr">Condition:</span> For triggered order types only

      The new trigger price to activate the order.

      To specify a relative price, this field can be prefixed by `+` or `-` to specify the order price as an offset relative to the market price.

      * `+` prefix: adds the amount to the reference price.
      * `-` prefix: subtracts the amount from the reference price.
      * `%` suffix: signifies the relative amount as a percentage, i.e., for a limit price 2% from last price use `"+2%"`.
    </ResponseField>

    <ResponseField name="pair" type="string">
      <span className="field-attr">Example:</span> `TSLAx/USD`

      The `symbol` is required on amends for non-crypto pairs, i.e. provide the pair symbol for xstocks.
    </ResponseField>

    <ResponseField name="deadline" type="string">
      <span className="field-attr">Format:</span> RFC3339<br />
      <span className="field-attr">Example:</span> `2022-12-25T09:30:59.123Z`

      Range of valid offsets (from current time) is 500 milliseconds to 60 seconds, default is 5 seconds. The precision of this parameter is to the millisecond. The engine will prevent this order from matching after this time, it provides protection against latency on time sensitive orders.
    </ResponseField>

    <ResponseField name="reqid" type="integer">
      Optional client originated request identifier sent as acknowledgment in the response.
    </ResponseField>

    <ResponseField name="token" type="string" required>
      Session token from the [GetWebSocketsToken](/api-reference/trading/get-websockets-token) REST endpoint.
    </ResponseField>
  </Tab>

  <Tab title="Response">
    <ResponseField name="event" type="string">
      Value: `amendOrderStatus`
    </ResponseField>

    <ResponseField name="amend_id" type="string">
      The unique Kraken identifier generated for this amend transaction.
    </ResponseField>

    <ResponseField name="txid" type="string">
      The Kraken identifier, if populated in the request.
    </ResponseField>

    <ResponseField name="cl_ord_id" type="string">
      The client identifier, if populated in the request.
    </ResponseField>

    <ResponseField name="status" type="string">
      <span className="field-attr">One of:</span> `ok`, `error`
    </ResponseField>

    <ResponseField name="reqid" type="integer">
      Client originated identifier for the request that initiated this response.
    </ResponseField>

    <ResponseField name="errorMessage" type="string">
      Error message for unsuccessful requests.
    </ResponseField>
  </Tab>
</Tabs>

<Panel>
  <CodeGroup>
    ```json Request: Trigger Price theme={null}
    {
        "event": "amendOrder",
        "token": "AxBH/MuD3MyJWjkiViDd1FLPoinFBC8MHQg0/952jKE",
        "cl_ord_id": "906bcc85-1866-4b4b-9d0d-880bbcbe7447",
        "trigger_price": "61036.4"
    }
    ```

    ```json Request: Volume theme={null}
    {
        "event": "amendOrder",
        "token": "AxBH/MuD3MyJWjkiViDd1FLPoinFBC8MHQg0/952jKE",
        "txid": "OB54AL-OBWL7-YOYRZI",
        "volume": "0.011"
    }
    ```

    ```json Response theme={null}
    {
        "amend_id": "TGS4UP-DP6E3-YO3KFN",
        "cl_ord_id": "906bcc85-1866-4b4b-9d0d-880bbcbe7447",
        "event": "amendOrderStatus",
        "status": "ok"
    }
    ```
  </CodeGroup>
</Panel>
