Amend Order
REQUESTwss://ws-auth.kraken.com
amendOrderAuthentication 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: Trigger price
- Example: Volume
MESSAGE BODY
amendOrder
The Kraken identifier for the order to be amended. Either txid
or cl_ord_id
is required.
The client identifier for the order to be amended. Either txid
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.
To specify a relative price, this field can be prefixed by + or - to specify the order price as an offset relative to the market price.+
prefix: adds the amount to the reference price.-
prefix: subtracts the amount from the reference price.%
suffix: signifies the relative amount as a percentage, i.e., for a limit price 2% from last price use"+2%"
.
true
, false
] false
Applies to limit_price
changes in this amend transaction. 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.
To specify a relative price, this field can be prefixed by + or - to specify the order price as an offset relative to the market price.+
prefix: adds the amount to the reference price.-
prefix: subtracts the amount from the reference price.%
suffix: signifies the relative amount as a percentage, i.e., for a limit price 2% from last price use"+2%"
.
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 trigger price on an stop-loss order using the client order identifier.
{
"event": "amendOrder",
"token": "AxBH/MuD3MyJWjkiViDd1FLPoinFBC8MHQg0/952jKE",
"cl_ord_id": "906bcc85-1866-4b4b-9d0d-880bbcbe7447",
"trigger_price": "61036.4"
}
Example: amend the order quantity using the Kraken order identifier.
{
"event": "amendOrder",
"token": "AxBH/MuD3MyJWjkiViDd1FLPoinFBC8MHQg0/952jKE",
"txid": "OB54AL-OBWL7-YOYRZI",
"volume": "0.011"
}
Response
- Response Schema
- Example
MESSAGE BODY
amendOrderStatus
ok
, error
] Example: a successful amend using the client order identifier.
{
"amend_id": "TGS4UP-DP6E3-YO3KFN",
"cl_ord_id": "906bcc85-1866-4b4b-9d0d-880bbcbe7447",
"event": "amendOrderStatus",
"status": "ok"
}