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

> Amend the parameters of a live order in-place

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

The amend request enables clients to modify the 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.
* Queue priority in the order book will be maintained where possible.
* If an amend request will reduce the order quantity below the existing filled quantity, the remaining quantity will be cancelled.

For more detail, see [amend transaction guide](/exchange/guides/general/amends).

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

    <ResponseField name="params" type="object">
      <Expandable title="properties" defaultOpen>
        <ResponseField name="order_id" type="string" required>
          <span className="field-attr">Example:</span> `OFGKYQ-FHPCQ-HUQFEK`

          The Kraken identifier for the order to be amended. Either `order_id` 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 `order_id` or `cl_ord_id` is required.
        </ResponseField>

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

        <ResponseField name="display_qty" type="float">
          <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="float">
          <span className="field-attr">Condition:</span> For order types that support limit price only

          The new limit price restriction on the order, used in combination with the `limit_price_type` parameter.
        </ResponseField>

        <ResponseField name="limit_price_type" type="string">
          <span className="field-attr">One of:</span> `static`, `pct`, `quote`<br />
          <span className="field-attr">Condition:</span> Currently only available on trailing-stop-limit orders

          The units for `limit_price`.

          * `static`: a static market price for the asset, i.e. limit price at 29000.5 BTC/USD, use price=29000.5 and price\_type=static.
          * `pct`: a percentage offset from the reference price, i.e. limit price when market rises by 5%, use price=5 and price\_type=pct.
          * `quote`: a notional offset from the reference price in the quote currency, i.e, limit price when market drops by 150 USD, use price=-150 and price\_type=quote.

          `static` is the default for all order types except for `trailing-stop-limit` which has the default `quote` offset.
        </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 amends

          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="float">
          <span className="field-attr">Condition:</span> For triggered order types only

          The new trigger price to activate the order, used in combination with the `trigger_price_type` parameter.
        </ResponseField>

        <ResponseField name="trigger_price_type" type="string">
          <span className="field-attr">One of:</span> `static`, `pct`, `quote`<br />
          <span className="field-attr">Default:</span> `static`<br />
          <span className="field-attr">Condition:</span> For triggered order types only

          The units for `trigger_price`.

          * `static`: a static market price for the asset, i.e. to trigger at 29000.5 BTC/USD, use price=29000.5 and price\_type=static.
          * `pct`: a percentage offset from the reference price, i.e. to trigger when price rises by 5%, use price=5 and price\_type=pct.
          * `quote`: a notional offset from the reference price in the quote currency, i.e, to trigger when price drops by 150 USD, use price=-150 and price\_type=quote.
        </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="symbol" 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="token" type="string" required>
          Authentication token. See [authentication guide](/exchange/guides/websockets/authentication) for details.
        </ResponseField>
      </Expandable>
    </ResponseField>

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

  <Tab title="Response">
    A successful amend request will return the unique Kraken amend identifier.

    <ResponseField name="method" type="string">
      Value: `amend_order`
    </ResponseField>

    <ResponseField name="result" type="object">
      <span className="field-attr">Condition:</span> if `success` is `true`

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

        <ResponseField name="order_id" 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="warnings" type="array of string">
          Non-fatal warnings about the amend, if any.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="error" type="string">
      Error message. Condition: if `success` is `false`.
    </ResponseField>

    <ResponseField name="success" type="boolean">
      Indicates if the request was successfully processed by the engine. One of: `true`, `false`
    </ResponseField>

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

    <ResponseField name="time_in" type="string">
      The timestamp when the request was received on the wire, just prior to parsing data. Format: RFC3339. Example: `2022-12-25T09:30:59.123456Z`
    </ResponseField>

    <ResponseField name="time_out" type="string">
      The timestamp when the response was sent on the wire, just prior to transmitting data. Format: RFC3339. Example: `2022-12-25T09:30:59.123456Z`
    </ResponseField>
  </Tab>
</Tabs>

<Panel>
  <CodeGroup>
    ```json Basic theme={null}
    {
      "method": "amend_order",
      "params": {
          "cl_ord_id": "2c6be801-1f53-4f79-a0bb-4ea1c95dfae9",
          "limit_price": 490795,
          "order_qty": 1.2,
          "token": "PM5Qm0MDrS54l657aQAtb7AhrwN30e2LBg1nUYOd6vU"
      }
    }
    ```

    ```json Advanced theme={null}
    {
        "method": "amend_order",
        "params": {
            "order_id": "OAIYAU-LGI3M-PFM5VW",
            "limit_price": 61031.3,
            "deadline": "2024-07-21T09:53:59.050Z",
            "post_only": true,
            "token": "DGB00LiKlPlLI/amQaSKUUr8niqXDb+1zwvtjp34nzk"
        }
    }
    ```

    ```json Response theme={null}
    {
        "method": "amend_order",
        "result": {
            "amend_id": "TTW6PD-RC36L-ZZSWNU",
            "cl_ord_id": "2c6be801-1f53-4f79-a0bb-4ea1c95dfae9"
        },
        "success": true,
        "time_in": "2024-07-26T13:39:04.922699Z",
        "time_out": "2024-07-26T13:39:04.924912Z"
    }
    ```
  </CodeGroup>
</Panel>
