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:
cl_ord_id is not supported.API Key Permissions Required: Orders and trades - Create & modify orders and Orders and trades - Cancel & close orders
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.
The "API-Key" header should contain your API key.
Authenticated requests should be signed with the "API-Sign" header, using a signature generated with your private key, nonce, encoded payload, and URI path.
Nonce used in construction of API-Sign header
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.
Asset pair id or altname
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.
Order quantity in terms of the base asset.
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.
This parameter is required on requests for non-crypto pairs, i.e. use tokenized_asset for xstocks.
tokenized_asset Price:
limit and iceberg ordersstop-loss, stop-loss-limit, take-profit, take-profit-limit, trailing-stop and trailing-stop-limit ordersNotes:
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.+ 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.Secondary Price:
stop-loss-limit, take-profit-limit and trailing-stop-limit orders
Note:+ 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.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.
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.
Used to interpret if client wants to receive pending replace, before the order is completely replaced
Validate inputs only. Do not submit 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"
}
}
}