Skip to main content

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

Body

required
    nonce int64required

    Nonce used in construction of API-Sign header

    timeout integerrequired

    Duration (in seconds) to set/extend the timer, it should be less than 86400 seconds.

Responses

Dead man's switch timer reset or disabled.

Schema
    result object
    currentTime string

    Timestamp (RFC3339 format) at which the request was received

    triggerTime string

    Timestamp (RFC3339 format) after which all orders will be cancelled, unless the timer is extended or disabled

    error string[]
Loading...