Cancel All Orders After X
CancelAllOrdersAfter provides a "Dead Man's Switch" mechanism to protect the client from network malfunction, extreme latency or unexpected matching engine downtime. The client can send a request with a timeout (in seconds), that will start a countdown timer which will cancel all client orders when the timer expires. The client has to keep sending new requests to push back the trigger time, or deactivate the mechanism by specifying a timeout of 0. If the timer expires, all orders are cancelled and then the timer remains disabled until the client provides a new (non-zero) timeout.
The recommended use is to make a call every 15 to 30 seconds, providing a timeout of 60 seconds. This allows the client to keep the orders in place in case of a brief disconnection or transient delay, while keeping them safe in case of a network breakdown. It is also recommended to disable the timer ahead of regularly scheduled trading engine maintenance (if the timer is enabled, all orders will be cancelled when the trading engine comes back from downtime - planned or otherwise).
API Key Permissions Required: Orders and trades - Create & modify orders or Orders and trades - Cancel & close orders
Request
- Base URL: https://api.kraken.com/0
- URL: https://api.kraken.com/0/private/CancelAllOrdersAfter
- Auth: API key in header API-Key and API key in header API-Sign
Request body
Example request
{
"nonce": 1695828490,
"timeout": 120
}Response
Dead man's switch timer reset or disabled.
Example response
{
"error": [],
"result": {
"currentTime": "2023-03-24T17:41:56Z",
"triggerTime": "2023-03-24T17:42:56Z"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.