> ## Documentation Index
> Fetch the complete documentation index at: https://docs.varchev.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 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).




## OpenAPI

````yaml Crypto post /cancelAllOrdersAfter
openapi: 3.0.1
info:
  title: Crypto
  description: crypto
  version: 1.0.0
servers:
  - url: https://gateway.varchev.com/crypto
security:
  - apikeyAuth: []
tags:
  - name: public
  - name: private
paths:
  /cancelAllOrdersAfter:
    post:
      tags:
        - private
      summary: Cancel All Orders After X
      description: >
        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).
      parameters:
        - name: tenantId
          in: header
          description: Tenant/Owner id
          required: true
          style: simple
          explode: false
          schema:
            type: string
        - name: Content-Type
          in: header
          required: false
          style: simple
          explode: false
          schema:
            type: string
          example: application/json
      requestBody:
        content:
          application/json:
            schema:
              properties:
                nonce:
                  type: string
                  description: '(Required) '
                  example: '-45794462'
                timeout:
                  type: integer
                  description: (Required) Duration (in seconds) to set/extend the timer by
                  example: 75237636
      responses:
        '200':
          description: OK
          headers:
            Content-Type:
              style: simple
              explode: false
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                type: object
              example:
                error: []
                result:
                  currentTime: '2021-03-24T17:41:56Z'
                  triggerTime: '2021-03-24T17:42:56Z'
      security:
        - default: []
components:
  securitySchemes:
    apikeyAuth:
      type: http
      scheme: apikey
    default:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://test.com
          scopes: {}

````