Skip to main content
POST
/
private
/
EditOrder
Edit Order
curl --request POST \
  --url https://api.kraken.com/0/private/EditOrder \
  --header 'API-Key: <api-key>' \
  --header 'API-Sign: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "nonce": 1695828490,
  "pair": "XBTUSD",
  "txid": "OHYO67-6LP66-HMQ437",
  "volume": "1.25",
  "price": "27500",
  "price2": "26500"
}
'
{
  "error": [],
  "result": {
    "status": "ok",
    "txid": "OFVXHJ-KPQ3B-VS7ELA",
    "originaltxid": "OHYO67-6LP66-HMQ437",
    "volume": "0.00030000",
    "price": "19500.0",
    "price2": "32500.0",
    "orders_cancelled": 1,
    "descr": {
      "order": "buy 0.00030000 XXBTZGBP @ limit 19500.0"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://kraken-sandbox.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

API-Key
string
header
required

The "API-Key" header should contain your API key.

API-Sign
string
header
required

Authenticated requests should be signed with the "API-Sign" header, using a signature generated with your private key, nonce, encoded payload, and URI path.

Body

application/json
nonce
integer<int64>
required

Nonce used in construction of API-Sign header

txid
required

Original Order ID or User Reference Id (userref) which is user-specified integer id used with the original order. If userref is not unique and was used with multiple order, edit request is denied with an error.

pair
string
required

Asset pair id or altname

userref
integer<int32>

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.

volume
string

Order quantity in terms of the base asset.

displayvol
string

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.

asset_class
enum<string>

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

Available options:
tokenized_asset
price
string

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.
price2
string

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.
oflags
any

Comma delimited list of order flags. Only these flags can be changed: - post post-only order (available when ordertype = limit). All the flags from the parent order are retained except post-only. post-only needs to be explicitly mentioned on edit request.

deadline
string

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_response
boolean

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

validate
boolean
default:false

Validate inputs only. Do not submit order.

Response

200 - application/json

Order edited.

result
OrderEdited · object
error
string[][]

Kraken API error