Skip to main content
POST
/
cancelorder
Cancel order
curl --request POST \
  --url https://futures.kraken.com/derivatives/api/v3/cancelorder \
  --header 'APIKey: <api-key>' \
  --header 'Authent: <api-key>'
import requests

url = "https://futures.kraken.com/derivatives/api/v3/cancelorder"

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/cancelorder', 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/cancelorder"

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": {
    "status": "cancelled",
    "order_id": "cb4e34f6-4eb3-4d4b-9724-4c3035b99d47",
    "receivedTime": "2020-07-22T13:26:20.806Z",
    "orderEvents": [
      {
        "type": "CANCEL",
        "uid": "cb4e34f6-4eb3-4d4b-9724-4c3035b99d47",
        "order": {
          "orderId": "cb4e34f6-4eb3-4d4b-9724-4c3035b99d47",
          "cliOrdId": "1234568",
          "type": "lmt",
          "symbol": "PI_XBTUSD",
          "side": "buy",
          "quantity": 5500,
          "filled": 0,
          "limitPrice": 8000,
          "reduceOnly": false,
          "timestamp": "2020-07-22T13:25:56.366Z",
          "lastUpdateTimestamp": "2020-07-22T13:25:56.366Z"
        }
      }
    ]
  },
  "serverTime": "2020-07-22T13:26:20.806Z"
}

Authorizations

APIKey
string
header
required

General API key with full access

Authent
string
header
required

Authentication string

Headers

algoId
string

ID of the algorithm that is making the request.

Query Parameters

processBefore
string<date-time>

The time before which the request should be processed, otherwise it is rejected.

order_id
string

The unique identifier of the order to be cancelled.

cliOrdId
string

The client unique identifier of the order to be cancelled.

Response

200 - application/json
cancelStatus
object
required

A structure containing information on the cancellation request.

result
enum<string>
required
Available options:
success
Example:

"success"

serverTime
string<date-time>
required

Server time in Coordinated Universal Time (UTC)

Example:

"2020-08-27T17:03:33.196Z"