Amend Order
REQUESTwss://ws-auth.kraken.com/v2
amend_orderAuthentication Required
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.
Request
- Request Schema
- Example: Basic
- Example: Advanced
MESSAGE BODY
amend_order
The Kraken identifier for the order to be amended. Either order_id
or cl_ord_id
is required.
The client identifier for the order to be amended. Either order_id
or cl_ord_id
is required.
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.
The new limit price restriction on the order, used in combination with the limit_price_type
parameter.
static
, pct
, quote
] 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.
true
, false
] false
If true
, the limit price change will be rejected if the order cannot be posted passively in the book.
The new trigger price to activate the order, used in combination with the trigger_price_type
parameter.
static
, pct
, quote
] static
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.
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.
Example: amend the limit price and the quantity on an order using a UUID client order identifier.
{
"method": "amend_order",
"params": {
"cl_ord_id": "2c6be801-1f53-4f79-a0bb-4ea1c95dfae9",
"limit_price": 490795,
"order_qty": 1.2,
"token": "PM5Qm0MDrS54l657aQAtb7AhrwN30e2LBg1nUYOd6vU"
}
Amends the price on an order using the Kraken order identifier.
post_only
indicates the transaction will be rejected if the new limit price will take liquidity immediately.deadline
indicates this amend request is latency sensitive, rejected the amend reject if not processed before the time.
{
"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"
}
}
Response
- Response Schema
- Example
A successful amend request will return the unique Kraken amend identifier.
MESSAGE BODY
amend_order
true
, false
] Example: response for an order successfully amended with a client order identifier.
{
"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"
}