Cancel all orders
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/cancelallorders \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/cancelallorders"
headers = {
"APIKey": "<api-key>",
"Authent": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {APIKey: '<api-key>', Authent: '<api-key>'}};
fetch('https://futures.kraken.com/derivatives/api/v3/cancelallorders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://futures.kraken.com/derivatives/api/v3/cancelallorders"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("APIKey", "<api-key>")
req.Header.Add("Authent", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"result": "success",
"cancelStatus": {
"receivedTime": "2019-08-01T15:57:37.518Z",
"cancelOnly": "all",
"status": "cancelled",
"cancelledOrders": [
{
"order_id": "6180adfa-e4b1-4a52-adac-ea5417620dbd"
},
{
"order_id": "89e3edbe-d739-4c52-b866-6f5a8407ff6e"
},
{
"order_id": "0cd37a77-1644-4960-a7fb-9a1f6e0e46f7"
}
],
"orderEvents": [
{
"type": "CANCEL",
"uid": "89e3edbe-d739-4c52-b866-6f5a8407ff6e",
"order": {
"orderId": "89e3edbe-d739-4c52-b866-6f5a8407ff6e",
"cliOrdId": null,
"type": "post",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 890,
"filled": 0,
"limitPrice": 10040,
"reduceOnly": false,
"timestamp": "2019-08-01T15:57:08.508Z",
"lastUpdateTimestamp": "2019-08-01T15:57:08.508Z"
}
},
{
"type": "CANCEL",
"uid": "0cd37a77-1644-4960-a7fb-9a1f6e0e46f7",
"order": {
"orderId": "0cd37a77-1644-4960-a7fb-9a1f6e0e46f7",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "sell",
"quantity": 900,
"filled": 0,
"limitPrice": 10145,
"reduceOnly": true,
"timestamp": "2019-08-01T15:57:14.003Z",
"lastUpdateTimestamp": "2019-08-01T15:57:14.003Z"
}
}
]
},
"serverTime": "2019-08-01T15:57:37.520Z"
}Order Management
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.
POST
/
cancelallorders
Cancel all orders
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/cancelallorders \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/cancelallorders"
headers = {
"APIKey": "<api-key>",
"Authent": "<api-key>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {APIKey: '<api-key>', Authent: '<api-key>'}};
fetch('https://futures.kraken.com/derivatives/api/v3/cancelallorders', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://futures.kraken.com/derivatives/api/v3/cancelallorders"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("APIKey", "<api-key>")
req.Header.Add("Authent", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"result": "success",
"cancelStatus": {
"receivedTime": "2019-08-01T15:57:37.518Z",
"cancelOnly": "all",
"status": "cancelled",
"cancelledOrders": [
{
"order_id": "6180adfa-e4b1-4a52-adac-ea5417620dbd"
},
{
"order_id": "89e3edbe-d739-4c52-b866-6f5a8407ff6e"
},
{
"order_id": "0cd37a77-1644-4960-a7fb-9a1f6e0e46f7"
}
],
"orderEvents": [
{
"type": "CANCEL",
"uid": "89e3edbe-d739-4c52-b866-6f5a8407ff6e",
"order": {
"orderId": "89e3edbe-d739-4c52-b866-6f5a8407ff6e",
"cliOrdId": null,
"type": "post",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 890,
"filled": 0,
"limitPrice": 10040,
"reduceOnly": false,
"timestamp": "2019-08-01T15:57:08.508Z",
"lastUpdateTimestamp": "2019-08-01T15:57:08.508Z"
}
},
{
"type": "CANCEL",
"uid": "0cd37a77-1644-4960-a7fb-9a1f6e0e46f7",
"order": {
"orderId": "0cd37a77-1644-4960-a7fb-9a1f6e0e46f7",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "sell",
"quantity": 900,
"filled": 0,
"limitPrice": 10145,
"reduceOnly": true,
"timestamp": "2019-08-01T15:57:14.003Z",
"lastUpdateTimestamp": "2019-08-01T15:57:14.003Z"
}
}
]
},
"serverTime": "2019-08-01T15:57:37.520Z"
}Authorizations
General API key with full access
Authentication string
Headers
ID of the algorithm that is making the request.
Query Parameters
A futures product to cancel all open orders.
Response
200 - application/json
- Success Response
- Errors
Was this page helpful?
⌘I