curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/editorder \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/editorder"
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/editorder', 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/editorder"
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",
"editStatus": {
"status": "edited",
"orderId": "022774bc-2c4a-4f26-9317-436c8d85746d",
"receivedTime": "2019-09-05T16:47:47.521Z",
"orderEvents": [
{
"type": "EDIT",
"old": {
"orderId": "022774bc-2c4a-4f26-9317-436c8d85746d",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 1000,
"filled": 0,
"limitPrice": 9400,
"reduceOnly": false,
"timestamp": "2019-09-05T16:41:35.173Z",
"lastUpdateTimestamp": "2019-09-05T16:41:35.173Z"
},
"new": {
"orderId": "022774bc-2c4a-4f26-9317-436c8d85746d",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 1501,
"filled": 0,
"limitPrice": 7200,
"reduceOnly": false,
"timestamp": "2019-09-05T16:41:35.173Z",
"lastUpdateTimestamp": "2019-09-05T16:47:47.519Z"
},
"reducedQuantity": null
}
]
},
"serverTime": "2019-09-05T16:47:47.521Z"
}Edit order
This endpoint allows editing an existing order for a currently listed Futures contract.
When editing an order, if the trailingStopMaxDeviation and trailingStopDeviationUnit
parameters are sent unchanged, the system will recalculate a new stop price upon successful
order modification.
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/editorder \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/editorder"
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/editorder', 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/editorder"
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",
"editStatus": {
"status": "edited",
"orderId": "022774bc-2c4a-4f26-9317-436c8d85746d",
"receivedTime": "2019-09-05T16:47:47.521Z",
"orderEvents": [
{
"type": "EDIT",
"old": {
"orderId": "022774bc-2c4a-4f26-9317-436c8d85746d",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 1000,
"filled": 0,
"limitPrice": 9400,
"reduceOnly": false,
"timestamp": "2019-09-05T16:41:35.173Z",
"lastUpdateTimestamp": "2019-09-05T16:41:35.173Z"
},
"new": {
"orderId": "022774bc-2c4a-4f26-9317-436c8d85746d",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 1501,
"filled": 0,
"limitPrice": 7200,
"reduceOnly": false,
"timestamp": "2019-09-05T16:41:35.173Z",
"lastUpdateTimestamp": "2019-09-05T16:47:47.519Z"
},
"reducedQuantity": null
}
]
},
"serverTime": "2019-09-05T16:47:47.521Z"
}Authorizations
Query Parameters
Only relevant for trailing stop orders. Maximum value of 50%, minimum value of 0.1% for 'PERCENT' 'maxDeviationUnit'.
Is the maximum distance the trailing stop's trigger price may trail behind the requested trigger signal. It defines the threshold at which the trigger price updates.
0.1 <= x <= 50Only relevant for trailing stop orders.
This defines how the trailing trigger price is calculated from the requested trigger signal. For example, if the max deviation is set to 10, the unit is 'PERCENT', and the underlying order is a sell, then the trigger price will never be more then 10% below the trigger signal. Similarly, if the deviation is 100, the unit is 'QUOTE_CURRENCY', the underlying order is a sell, and the contract is quoted in USD, then the trigger price will never be more than $100 below the trigger signal.
PERCENT, QUOTE_CURRENCY Response
- Success Response
- Errors
Was this page helpful?