Batch order management
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/batchorder \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/batchorder"
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/batchorder', 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/batchorder"
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",
"batchStatus": [
{
"status": "placed",
"order_tag": "1",
"order_id": "022774bc-2c4a-4f26-9317-436c8d85746d",
"dateTimeReceived": "2019-09-05T16:41:35.173Z",
"orderEvents": [
{
"type": "PLACE",
"order": {
"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"
},
"reducedQuantity": null
}
]
},
{
"status": "edited",
"order_id": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"orderEvents": [
{
"type": "EDIT",
"old": {
"orderId": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 102,
"filled": 0,
"limitPrice": 8500,
"reduceOnly": false,
"timestamp": "2019-09-04T11:45:48.884Z",
"lastUpdateTimestamp": "2019-09-04T11:45:48.884Z"
},
"new": {
"orderId": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 1000,
"filled": 0,
"limitPrice": 9400,
"reduceOnly": false,
"timestamp": "2019-09-04T11:45:48.884Z",
"lastUpdateTimestamp": "2019-09-05T16:41:40.996Z"
},
"reducedQuantity": null
}
]
},
{
"status": "cancelled",
"order_id": "566942c8-a3b5-4184-a451-622b09493129",
"orderEvents": [
{
"type": "CANCEL",
"uid": "566942c8-a3b5-4184-a451-622b09493129",
"order": {
"orderId": "566942c8-a3b5-4184-a451-622b09493129",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 100,
"filled": 0,
"limitPrice": 8500,
"reduceOnly": false,
"timestamp": "2019-09-02T12:54:08.005Z",
"lastUpdateTimestamp": "2019-09-02T12:54:08.005Z"
}
}
]
}
],
"serverTime": "2019-09-05T16:41:40.996Z"
}Order Management
Batch order management
This endpoint allows sending limit or stop order(s) and/or cancelling open order(s) and/or editing open order(s) for a currently listed Futures contract in batch.
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.
POST
/
batchorder
Batch order management
curl --request POST \
--url https://futures.kraken.com/derivatives/api/v3/batchorder \
--header 'APIKey: <api-key>' \
--header 'Authent: <api-key>'import requests
url = "https://futures.kraken.com/derivatives/api/v3/batchorder"
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/batchorder', 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/batchorder"
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",
"batchStatus": [
{
"status": "placed",
"order_tag": "1",
"order_id": "022774bc-2c4a-4f26-9317-436c8d85746d",
"dateTimeReceived": "2019-09-05T16:41:35.173Z",
"orderEvents": [
{
"type": "PLACE",
"order": {
"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"
},
"reducedQuantity": null
}
]
},
{
"status": "edited",
"order_id": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"orderEvents": [
{
"type": "EDIT",
"old": {
"orderId": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 102,
"filled": 0,
"limitPrice": 8500,
"reduceOnly": false,
"timestamp": "2019-09-04T11:45:48.884Z",
"lastUpdateTimestamp": "2019-09-04T11:45:48.884Z"
},
"new": {
"orderId": "9c2cbcc8-14f6-42fe-a020-6e395babafd1",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 1000,
"filled": 0,
"limitPrice": 9400,
"reduceOnly": false,
"timestamp": "2019-09-04T11:45:48.884Z",
"lastUpdateTimestamp": "2019-09-05T16:41:40.996Z"
},
"reducedQuantity": null
}
]
},
{
"status": "cancelled",
"order_id": "566942c8-a3b5-4184-a451-622b09493129",
"orderEvents": [
{
"type": "CANCEL",
"uid": "566942c8-a3b5-4184-a451-622b09493129",
"order": {
"orderId": "566942c8-a3b5-4184-a451-622b09493129",
"cliOrdId": null,
"type": "lmt",
"symbol": "PI_XBTUSD",
"side": "buy",
"quantity": 100,
"filled": 0,
"limitPrice": 8500,
"reduceOnly": false,
"timestamp": "2019-09-02T12:54:08.005Z",
"lastUpdateTimestamp": "2019-09-02T12:54:08.005Z"
}
}
]
}
],
"serverTime": "2019-09-05T16:41:40.996Z"
}Authorizations
Query Parameters
Response
200 - application/json
- Success Response
- Errors
Was this page helpful?