Cancel All Orders After X
POST/private/CancelAllOrdersAfter
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
- application/json
Body
required
Nonce used in construction of API-Sign
header
Duration (in seconds) to set/extend the timer, it should be less than 86400 seconds.
Responses
- 200
Dead man's switch timer reset or disabled.
- application/json
- Schema
- Example (from schema)
Schema
result object
Timestamp (RFC3339 format) at which the request was received
Timestamp (RFC3339 format) after which all orders will be cancelled, unless the timer is extended or disabled
{
"error": [],
"result": {
"currentTime": "2023-03-24T17:41:56Z",
"triggerTime": "2023-03-24T17:42:56Z"
}
}