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"
}Order Management
Cancel order
This endpoint allows cancelling an open order for a Futures contract.
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
General API key with full access
Authentication string
Headers
ID of the algorithm that is making the request.
Query Parameters
The time before which the request should be processed, otherwise it is rejected.
The unique identifier of the order to be cancelled.
The client unique identifier of the order to be cancelled.
Response
200 - application/json
- Success Response
- Errors
Was this page helpful?