Cancel All Orders

This endpoint allows cancelling orders which are associated with a future's contract or a margin account. If no arguments are specified all open orders will be cancelled.

Authentication is required.

Endpoint

Request Type Permissible API Keys
/api/v3/cancelallorders
POST Read-write, Master
Argument Type Required Description
symbol
string No margin account or future product to cancel all open orders
Sample Call

https://futures.kraken.com/derivatives/api/v3/cancelallorders

https://futures.kraken.com/derivatives/api/v3/cancelallorders?symbol=fi_xbtusd_180629

https://futures.kraken.com/derivatives/api/v3/cancelallorders?symbol=fi_xbtusd

Sample Return if Successful

{  
   "result":"success",
   "cancelStatus":
      "receivedTime":"2018-06-26T18:54:57.098Z",
      "cancelOnly":"all",

      "status":"cancelled",
      "cancelledOrders":[  
         {  
            "order_id":"241f0190-8b03-4baf-8e93-00c1b6941111",
            "cliOrdId":"83d6068c-b3af-4381-8f57-39a9f9fd71ec"
         },
         {  
            "order_id":"2421e4d9-0fe4-4be5-9752-968298237e05",
            "cliOrdId":"980586ae-2a9d-4e62-bab2-b47a817c2142"
         },
         {  
            "order_id":"abf71c9d-ea2a-44f7-a9d0-b7d7b77c7702"
         }
      ]
   },
   "serverTime":"2018-06-26T18:54:57.123Z"
}

{  
   "result":"success",
   "cancelStatus":
      "receivedTime":"2018-06-26T18:48:10.802Z"

      "cancelOnly":"fi_xbtusd_180629",
      "status":"cancelled",
      "cancelledOrders":[  
         {  
            "order_id":"099d4e8a-6807-4dcb-a182-c06c0e601e7b",
            "cliOrdId":"980586ae-2a9d-4e62-bab2-b47a817c2142"
         },
         {  
            "order_id":"ac18df25-65ac-46d7-b014-a753927c4612",
         }
      ]
   },
   "serverTime":"2018-06-26T18:48:10.855Z"
}

{  
   "result":"success",
   "cancelStatus":
      "receivedTime":"2018-06-26T18:43:53.301Z",

      "cancelOnly":"fi_xbtusd",
      "status":"noOrdersToCancel",
      "cancelledOrders": []

   },
   "serverTime":"2018-06-26T18:43:53.320Z"
}

Field

Type Description
result
String Always success
serverTime
ISO8601 datetime The server date and time
cancelStatus
structure  A structure containing information on the cancellation request, see below
receivedTime ISO8601 datetime The date and time the order cancellation was received
cancelOnly string The symbol of the futures or the margin account to cancel or all.  
status string The status of the order cancellation, either of:
  • cancelled: successful cancellation
  • noOrdersToCancel: no open orders for cancellation
cancelledOrders list of structures A list of structures containing all the successfully cancelled orders
order_id string The cancelled order id
cliOrdId string The client order id. Returned only if client specified one

 

 

Sample Return if Unsuccessful
 {  
   "result":"error",
   "serverTime":"2016-02-25T09:45:53.818Z",
   "error":"apiLimitExceeded"
}

Field

Type Description
result
String Always error
serverTime
ISO8601 datetime The server date and time
error
string

The reason the API call failed, either of:

  • apiLimitExceeded: the API limit for the calling IP address has been exceeded
  • authenticationError: the request could not be authenticated
  • invalidArgument: the specified future symbol is invalid
  • nonceBelowThreshold: <threshold> the provided nonce is below the <threshold>
  • nonceDuplicate: <duplicate> the provided nonce is a duplicate as it has been used in a previous request