Trading

Edit Order

Sends a request to edit the order parameters of a live order. When an order has been successfully modified, the original order will be cancelled and a new order will be created with the adjusted parameters a new txid will be returned in the response.

Note: The new AmendOrder endpoint resolves the caveats listed below and has additional performance gains.

Caveats for EditOrder:

  • Triggered stop loss or take profit orders are not supported.
  • Orders with conditional close terms attached are not supported.
  • Orders where the executed volume is greater than the newly supplied volume will be rejected.
  • cl_ord_id is not supported.
  • Existing executions are associated with the original order and not copied to the amended order.
  • Queue position will not be maintained.

API Key Permissions Required: Orders and trades - Create & modify orders and Orders and trades - Cancel & close orders

post/private/EditOrder

Request

  • Base URL: https://api.kraken.com/0
  • URL: https://api.kraken.com/0/private/EditOrder
  • Auth: API key in header API-Key and API key in header API-Sign

Request body

nonceinteger required

Nonce used in construction of API-Sign header

userrefinteger

User reference id

userref is an optional user-specified integer id associated with edit request.

Note: userref from parent order will not be retained on the new order after edit.

volumestring

Order quantity in terms of the base asset.

displayvolstring

For iceberg orders only, it defines the quantity to show in the book while the rest of order quantity remains hidden. Minimum value is 1 / 15 of volume.

pairstring required

Asset pair id or altname

asset_class'tokenized_asset'

This parameter is required on requests for non-crypto pairs, i.e. use tokenized_asset for xStocks.

pricestring

Price:

  • Limit price for limit and iceberg orders
  • Trigger price for stop-loss, stop-loss-limit, take-profit, take-profit-limit, trailing-stop and trailing-stop-limit orders

Notes:

  • Relative Prices: Either price or price2 can be preceded by +, -, or # to specify the order price as an offset relative to the last traded price. + adds the amount to, and - subtracts the amount from the last traded price. # will either add or subtract the amount to the last traded price, depending on the direction and order type used. Prices can also be suffixed with a % to signify the relative amount as a percentage, rather than an absolute price difference.
  • Trailing Stops: Must use a relative price for this field, namely the + prefix, from which the direction will be automatic based on if the original order is a buy or sell (no need to use - or #). The % suffix also works for these order types to use a relative percentage price.
price2string

Secondary Price:

  • Limit price for stop-loss-limit, take-profit-limit and trailing-stop-limit orders Note:
  • Trailing Stops: Must use a relative price for this field, namely one of the + or - prefixes. This will provide the offset from the trigger price to the limit price, i.e. +0 would set the limit price equal to the trigger price. The % suffix also works for this field to use a relative percentage limit price.
oflagsunknown
deadlinestring

RFC3339 timestamp (e.g. 2021-04-01T00:18:45Z) after which the matching engine should reject the new order request, in presence of latency or order queueing. min now() + 2 seconds, max now() + 60 seconds.

cancel_responseboolean

Used to interpret if client wants to receive pending replace, before the order is completely replaced

validateboolean

Validate inputs only. Do not submit order.

Example request

{
  "nonce": 1695828490,
  "pair": "XBTUSD",
  "txid": "OHYO67-6LP66-HMQ437",
  "volume": "1.25",
  "price": "27500",
  "price2": "26500"
}

Response

Order edited.

Example response

{
  "error": [],
  "result": {
    "descr": {
      "order": "buy 1.25000000 XBTUSD @ limit 27500.0"
    },
    "txid": "OU22CG-KLAF2-FWUDD7"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.